[WebAnimation] Optimize updateCSSTransitions#17897
Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom Sep 19, 2023
Merged
Conversation
Collaborator
|
EWS run on previous version of this PR (hash 70373d6) Details
|
70373d6 to
d4a69c1
Compare
Collaborator
|
EWS run on previous version of this PR (hash d4a69c1) Details
|
d4a69c1 to
cbaf507
Compare
Collaborator
|
EWS run on previous version of this PR (hash cbaf507) Details
|
1437603 to
b0eeb76
Compare
Collaborator
|
EWS run on previous version of this PR (hash b0eeb76) Details |
Collaborator
|
EWS run on previous version of this PR (hash 1437603) Details
|
b0eeb76 to
7e82d79
Compare
Collaborator
|
EWS run on previous version of this PR (hash 7e82d79) Details |
7e82d79 to
eeece84
Compare
Collaborator
|
EWS run on previous version of this PR (hash eeece84) Details
|
eeece84 to
bdc2485
Compare
Collaborator
|
EWS run on current version of this PR (hash bdc2485) Details |
https://bugs.webkit.org/show_bug.cgi?id=261715 rdar://115703255 Reviewed by Mark Lam. WebAnimation's updateCSSTransitions is inefficient, 1. We are repeatedly copying AnimationProperty while it is held. This is appearing much in the profiler. Let's not copy them. We use `const AnimationProperty&`. This is OK since 1.1. updateCSSTransitionsForStyleableAndProperty's owner is holding this ownership. Reference is always valid. 1.2. Other change immediately copies or uses switchOn to dispatch. So this is fine. 2. Avoid repeated call of `styleable.hasRunningTransitionForProperty` etc. This is really costly function since it involves HashMap lookup. We reorganize updateCSSTransitionsForStyleableAndProperty not to do wasteful operations multiple times. * Source/WebCore/animation/CSSPropertyAnimation.cpp: (WebCore::CSSPropertyBlendingContext::CSSPropertyBlendingContext): (WebCore::CSSPropertyAnimation::blendProperty): (WebCore::CSSPropertyAnimation::isPropertyAnimatable): (WebCore::CSSPropertyAnimation::isPropertyAdditiveOrCumulative): (WebCore::CSSPropertyAnimation::propertyRequiresBlendingForAccumulativeIteration): (WebCore::CSSPropertyAnimation::animationOfPropertyIsAccelerated): (WebCore::CSSPropertyAnimation::propertiesEqual): (WebCore::CSSPropertyAnimation::canPropertyBeInterpolated): * Source/WebCore/animation/CSSPropertyAnimation.h: * Source/WebCore/dom/Element.cpp: (WebCore::Element::hasCompletedTransitionForProperty const): (WebCore::Element::hasRunningTransitionForProperty const): * Source/WebCore/dom/Element.h: * Source/WebCore/style/Styleable.cpp: (WebCore::keyframeEffectForElementAndProperty): (WebCore::propertyInStyleMatchesValueForTransitionInMap): (WebCore::transitionMatchesProperty): (WebCore::updateCSSTransitionsForStyleableAndProperty): (WebCore::Styleable::updateCSSTransitions const): * Source/WebCore/style/Styleable.h: (WebCore::Styleable::hasCompletedTransitionForProperty const): (WebCore::Styleable::hasRunningTransitionForProperty const): Canonical link: https://commits.webkit.org/268113@main
bdc2485 to
7fd0774
Compare
Collaborator
|
Committed 268113@main (7fd0774): https://commits.webkit.org/268113@main Reviewed commits have been landed. Closing PR #17897 and removing active labels. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
7fd0774
bdc2485
🧪 wpe-wk2