[Webkit-unassigned] [Bug 146451] New: The animation is running in the background without stop.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 30 02:41:35 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=146451

            Bug ID: 146451
           Summary: The animation is running in the background without
                    stop.
    Classification: Unclassified
           Product: WebKit
           Version: 528+ (Nightly build)
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Animations
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mwang at opentv.com
                CC: dino at apple.com

This issue happens only if accelerated-compositing is enabled.

The attached simple test case is to load an iframe with 'display:none', which has some animations. Although nothing is displayed when it is loaded, 50% CPU is consumed (depends on different platform).  

If adding a log in ImplicitAnimation::timeToNextService() of ImplicitAnimation.cpp
double ImplicitAnimation::timeToNextService()
{
    printf("[LOG]ImplicitAnimation::timeToNextService(%p)\n", this);
    double t = AnimationBase::timeToNextService();
    ......
}

Lots of logs were outputted in the console, like 
    [LOG]ImplicitAnimation::timeToNextService(0x726e9ec8)
    [LOG]ImplicitAnimation::timeToNextService(0x726e9e70)
    [LOG]ImplicitAnimation::timeToNextService(0x726e9000)
    [LOG]ImplicitAnimation::timeToNextService(0x726e9058)
    [LOG]ImplicitAnimation::timeToNextService(0x726e9ec8)
    [LOG]ImplicitAnimation::timeToNextService(0x726e9e70)
    [LOG]ImplicitAnimation::timeToNextService(0x726e9f78)
    [LOG]ImplicitAnimation::timeToNextService(0x726e9f20)
    [LOG]ImplicitAnimation::timeToNextService(0x726e9058)
    [LOG]ImplicitAnimation::timeToNextService(0x726e9000)

How to reproduce this issue?
1/ unzip simple_case.zip
2/ enable accelerated-compositing
3/ load unzipped tbc.html 

The reason is in GraphicsLayerTextureMapper::addAnimation(). 
This issue is the side-effect of replacing m_animationStartedTimer.startOneShot(0) by notifyChange(AnimationStarted) in GraphicsLayerTextureMapper::addAnimation(). In fact, if the current GraphicsLayerTextureMapper object is not in GraphicsLayer tree, like the iframe in the attached simple case, it's GraphicsLayerTextureMapper::commitLayerChanges() can't be triggered, so AnimationStarted event can't be dispatched into AnimationController to stop the animation timer.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150630/939b7c28/attachment-0001.html>


More information about the webkit-unassigned mailing list