WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 214712
steps() timing function on a transform animation triggers a render every frame
https://bugs.webkit.org/show_bug.cgi?id=214712
Summary
steps() timing function on a transform animation triggers a render every frame
Simon Fraser (smfr)
Reported
2020-07-23 16:54:14 PDT
steps() timing function on a transform animation triggers a render every frame
Attachments
WIP
(7.20 KB, patch)
2020-07-23 16:54 PDT
,
Simon Fraser (smfr)
no flags
Details
Formatted Diff
Diff
Patch
(16.15 KB, patch)
2020-07-23 22:46 PDT
,
Simon Fraser (smfr)
thorton
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Simon Fraser (smfr)
Comment 1
2020-07-23 16:54:42 PDT
Created
attachment 405097
[details]
WIP
Simon Fraser (smfr)
Comment 2
2020-07-23 16:54:45 PDT
<
rdar://problem/62737868
>
Simon Fraser (smfr)
Comment 3
2020-07-23 22:46:23 PDT
Created
attachment 405129
[details]
Patch
Sam Weinig
Comment 4
2020-07-24 08:49:55 PDT
Comment on
attachment 405129
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=405129&action=review
> Source/WebCore/animation/KeyframeEffect.h:214 > + Optional<bool> m_isRunningAccelerated;
I'm really not a fan of using Optional<bool> (outside of a something decoding a bool value or similar uses). I almost never understand what it is trying to represent. In most cases an enum is much clearer. I think that would be true here too.
Tim Horton
Comment 5
2020-07-24 10:04:32 PDT
Comment on
attachment 405129
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=405129&action=review
> Source/WebCore/animation/KeyframeEffect.cpp:1558 > + computeSomeKeyframesUseStepsTimingFunction();
what an interesting function name! (but not new)
>> Source/WebCore/animation/KeyframeEffect.h:214 >> + Optional<bool> m_isRunningAccelerated; > > I'm really not a fan of using Optional<bool> (outside of a something decoding a bool value or similar uses). I almost never understand what it is trying to represent. In most cases an enum is much clearer. I think that would be true here too.
You'd rather a yes/no/IDK-yet tristate?
Darin Adler
Comment 6
2020-07-24 11:14:13 PDT
Comment on
attachment 405129
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=405129&action=review
>>> Source/WebCore/animation/KeyframeEffect.h:214 >>> + Optional<bool> m_isRunningAccelerated; >> >> I'm really not a fan of using Optional<bool> (outside of a something decoding a bool value or similar uses). I almost never understand what it is trying to represent. In most cases an enum is much clearer. I think that would be true here too. > > You'd rather a yes/no/IDK-yet tristate?
I don’t have the same problem with it that Sam does. But just reminding you that we do have <wtf/TriState.h> and of course we can make more enums "until the cows come home".
Geoffrey Garen
Comment 7
2020-07-24 11:30:13 PDT
Comment on
attachment 405129
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=405129&action=review
>>>> Source/WebCore/animation/KeyframeEffect.h:214 >>>> + Optional<bool> m_isRunningAccelerated; >>> >>> I'm really not a fan of using Optional<bool> (outside of a something decoding a bool value or similar uses). I almost never understand what it is trying to represent. In most cases an enum is much clearer. I think that would be true here too. >> >> You'd rather a yes/no/IDK-yet tristate? > > I don’t have the same problem with it that Sam does. But just reminding you that we do have <wtf/TriState.h> and of course we can make more enums "until the cows come home".
I believe the states are: { NotRunning, RunningUnaccelerated, RunningAccelerated }. IDK-yet / Indeterminate aren't a 100% fit here because we always know our state. Perhaps an enum would make this clearer. Or just two separate data members, m_isRunning and m_isAccelerated.
Darin Adler
Comment 8
2020-07-24 11:39:06 PDT
Comment on
attachment 405129
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=405129&action=review
>>>>> Source/WebCore/animation/KeyframeEffect.h:214 >>>>> + Optional<bool> m_isRunningAccelerated; >>>> >>>> I'm really not a fan of using Optional<bool> (outside of a something decoding a bool value or similar uses). I almost never understand what it is trying to represent. In most cases an enum is much clearer. I think that would be true here too. >>> >>> You'd rather a yes/no/IDK-yet tristate? >> >> I don’t have the same problem with it that Sam does. But just reminding you that we do have <wtf/TriState.h> and of course we can make more enums "until the cows come home". > > I believe the states are: { NotRunning, RunningUnaccelerated, RunningAccelerated }. IDK-yet / Indeterminate aren't a 100% fit here because we always know our state. Perhaps an enum would make this clearer. Or just two separate data members, m_isRunning and m_isAccelerated.
The code definitely implies that WTF::nullopt is used as an "I don’t know" state. animationDidChangeTimingProperties sets it to WTF::nullopt. That’s not "not running". I think we just proved that a custom enum would be better than the alternatives above; might help us clarify our thinking.
Simon Fraser (smfr)
Comment 9
2020-07-24 12:17:56 PDT
(In reply to Geoffrey Garen from
comment #7
)
> I believe the states are: { NotRunning, RunningUnaccelerated, > RunningAccelerated }. IDK-yet / Indeterminate aren't a 100% fit here because > we always know our state. Perhaps an enum would make this clearer. Or just > two separate data members, m_isRunning and m_isAccelerated.
I don't think it includes RunningUnaccelerated (that's surely state that's tracked elsewhere). It's more like "have I tried to run it accelerated: not yet/yes and failed/yes and succeeded".
Simon Fraser (smfr)
Comment 10
2020-07-24 14:04:28 PDT
https://trac.webkit.org/changeset/264856/webkit
Antoine Quint
Comment 11
2020-08-27 07:58:23 PDT
This caused
bug 215853
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug