Changeset 233462 in webkit


Ignore:
Timestamp:
Jul 3, 2018 8:01:55 AM (6 years ago)
Author:
commit-queue@webkit.org
Message:

REGRESSION (r232186): Hardware-accelerated CSS animations using steps() timing function no longer work
https://bugs.webkit.org/show_bug.cgi?id=186129

Patch by Frederic Wang <fwang@igalia.com> on 2018-07-03
Reviewed by Antoine Quint.

Source/WebCore:

When the WebAnimationsCSSIntegration flag is enabled, animating the transform property with
a steps() timing function no longer works. This is because the WebAnimation code wrongly
assumes that the transform property can always be accelerated (for counterexamples, see
GraphicsLayerCA::animationCanBeAccelerated). For consistency with AnimationBase, we make
WebAnimation fallback to non-accelerated mode when RenderBoxModelObject::startAnimation
fails. This addresses the regression previously mentioned.

Test: http/wpt/css/css-animations/start-animation-001.html

  • animation/KeyframeEffectReadOnly.cpp:

(WebCore::KeyframeEffectReadOnly::applyPendingAcceleratedActions): Fallback to
non-accelerated mode if startAnimation failed.

LayoutTests:

Add a test to ensure that accelerated and non-accelerated animations are properly started
when WebAnimationsCSSIntegration is enabled. In particular, consider the case of animated
transform using steps() timing function.

  • http/wpt/css/css-animations/start-animation-001-expected.html: Added.
  • http/wpt/css/css-animations/start-animation-001.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r233460 r233462  
     12018-07-03  Frederic Wang  <fwang@igalia.com>
     2
     3        REGRESSION (r232186): Hardware-accelerated CSS animations using steps() timing function no longer work
     4        https://bugs.webkit.org/show_bug.cgi?id=186129
     5
     6        Reviewed by Antoine Quint.
     7
     8        Add a test to ensure that accelerated and non-accelerated animations are properly started
     9        when WebAnimationsCSSIntegration is enabled. In particular, consider the case of animated
     10        transform using steps() timing function.
     11
     12        * http/wpt/css/css-animations/start-animation-001-expected.html: Added.
     13        * http/wpt/css/css-animations/start-animation-001.html: Added.
     14
    1152018-07-03  Frederic Wang  <fred.wang@free.fr>
    216
  • trunk/Source/WebCore/ChangeLog

    r233461 r233462  
     12018-07-03  Frederic Wang  <fwang@igalia.com>
     2
     3        REGRESSION (r232186): Hardware-accelerated CSS animations using steps() timing function no longer work
     4        https://bugs.webkit.org/show_bug.cgi?id=186129
     5
     6        Reviewed by Antoine Quint.
     7
     8        When the WebAnimationsCSSIntegration flag is enabled, animating the transform property with
     9        a steps() timing function no longer works. This is because the WebAnimation code wrongly
     10        assumes that the transform property can always be accelerated (for counterexamples, see
     11        GraphicsLayerCA::animationCanBeAccelerated). For consistency with AnimationBase, we make
     12        WebAnimation fallback to non-accelerated mode when RenderBoxModelObject::startAnimation
     13        fails. This addresses the regression previously mentioned.
     14
     15        Test: http/wpt/css/css-animations/start-animation-001.html
     16
     17        * animation/KeyframeEffectReadOnly.cpp:
     18        (WebCore::KeyframeEffectReadOnly::applyPendingAcceleratedActions): Fallback to
     19        non-accelerated mode if startAnimation failed.
     20
    1212018-07-03  David Kilzer  <ddkilzer@apple.com>
    222
  • trunk/Source/WebCore/animation/KeyframeEffectReadOnly.cpp

    r233429 r233462  
    12551255        switch (action) {
    12561256        case AcceleratedAction::Play:
    1257             compositedRenderer->startAnimation(timeOffset, backingAnimationForCompositedRenderer().ptr(), m_blendingKeyframes);
     1257            if (!compositedRenderer->startAnimation(timeOffset, backingAnimationForCompositedRenderer().ptr(), m_blendingKeyframes)) {
     1258                m_shouldRunAccelerated = false;
     1259                m_lastRecordedAcceleratedAction = AcceleratedAction::Stop;
     1260                return;
     1261            }
    12581262            break;
    12591263        case AcceleratedAction::Pause:
Note: See TracChangeset for help on using the changeset viewer.