Coordinated Graphics: Directly composited animated GIFs only render the first image.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Nov 2012 08:11:18 +0000 (08:11 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Nov 2012 08:11:18 +0000 (08:11 +0000)
commitcb407c30b77382212881fa0d8500ebe16d675c90
tree252dc4fef005d89b7c12753990913184271ec4b8
parenta168297943d54d257a0e9474f3d2e1c2d1e512b4
Coordinated Graphics: Directly composited animated GIFs only render the first image.
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: https://svn.webkit.org/repository/webkit/trunk@134376 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ChangeLog
ManualTests/animated-gif-on-compositing-layer.html [new file with mode: 0644]
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h