Skip to content
  • commit-queue@webkit.org's avatar
    Coordinated Graphics: Directly composited animated GIFs only render the first image. · 73c2f579
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=102043
    
    Patch by Huang Dongsung <luxtella@company100.net> on 2012-11-13
    Reviewed by Noam Rosenthal.
    
    .:
    
    Add a test to check that a gif animation can run on a compositing layer.
    
    * ManualTests/animated-gif-on-compositing-layer.html: Added.
    
    Source/WebKit2:
    
    CoordinatedGraphicsLayer::setContentsToImage() checks the pointer to the image,
    not nativeImagePtr, so Coordinated Graphics currently draws only the first frame
    of gif animations. This patch makes Coordinated Graphics draw gif animations.
    
    In addition, this patch modifies the style of direct image compositing
    code to match other parts of CoordinatedGraphicsLayer.
    
    Test: ManualTests/animated-gif-on-compositing-layer.html
    
    * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
    (WebCore::CoordinatedGraphicsLayer::didChangeImageBacking):
    (WebCore):
    (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
    (WebCore::CoordinatedGraphicsLayer::setContentsNeedsDisplay):
    (WebCore::CoordinatedGraphicsLayer::setContentsToImage):
    (WebCore::CoordinatedGraphicsLayer::syncImageBacking):
    (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
    (WebCore::CoordinatedGraphicsLayer::releaseImageBackingIfNeeded):
    (WebCore::CoordinatedGraphicsLayer::purgeBackingStores):
    (WebCore::CoordinatedGraphicsLayer::hasPendingVisibleChanges):
    * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
    (CoordinatedGraphicsLayer):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134376 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    73c2f579