Changeset 252307 in webkit


Ignore:
Timestamp:
Nov 9, 2019 3:05:21 AM (4 years ago)
Author:
graouts@webkit.org
Message:

[Web Animations] Optimize animation resolution to not re-compute whether effects only contain accelerated animation properties
https://bugs.webkit.org/show_bug.cgi?id=204009

Reviewed by Dean Jackson.

A KeyframeEffect already exposes whether it only affects CSS properties that can be accelerated, so use this information instead
of iterating over an effect's animated properties during resolution to get at the same information.

No tests or changes to existed test expectations as this should not yield any change in behavior.

  • dom/Element.cpp:

(WebCore::Element::applyKeyframeEffects):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r252301 r252307  
     12019-11-08  Antoine Quint  <graouts@apple.com>
     2
     3        [Web Animations] Optimize animation resolution to not re-compute whether effects only contain accelerated animation properties
     4        https://bugs.webkit.org/show_bug.cgi?id=204009
     5
     6        Reviewed by Dean Jackson.
     7
     8        A KeyframeEffect already exposes whether it only affects CSS properties that can be accelerated, so use this information instead
     9        of iterating over an effect's animated properties during resolution to get at the same information.
     10
     11        No tests or changes to existed test expectations as this should not yield any change in behavior.
     12
     13        * dom/Element.cpp:
     14        (WebCore::Element::applyKeyframeEffects):
     15
    1162019-11-08  Chris Dumez  <cdumez@apple.com>
    217
  • trunk/Source/WebCore/dom/Element.cpp

    r252253 r252307  
    3232#include "CSSAnimationController.h"
    3333#include "CSSParser.h"
    34 #include "CSSPropertyAnimation.h"
    3534#include "Chrome.h"
    3635#include "ChromeClient.h"
     
    37043703        effect->animation()->resolve(targetStyle);
    37053704
    3706         if (hasNonAcceleratedAnimationProperty)
    3707             continue;
    3708 
    3709         // FIXME: https://bugs.webkit.org/show_bug.cgi?id=204009
    3710         // KeyframeEffectStack and KeyframeEffect should indicate whether it only contains accelerated animation properties
    3711         for (auto cssPropertyId : effect->animatedProperties()) {
    3712             if (!CSSPropertyAnimation::animationOfPropertyIsAccelerated(cssPropertyId)) {
    3713                 hasNonAcceleratedAnimationProperty = true;
    3714                 break;
    3715             }
    3716         }
     3705        if (!hasNonAcceleratedAnimationProperty && !effect->isAccelerated())
     3706            hasNonAcceleratedAnimationProperty = true;
    37173707    }
    37183708
Note: See TracChangeset for help on using the changeset viewer.