haikuwebkit/ManualTests/animated-gif-on-compositing...

14 lines
403 B
HTML
Raw Permalink Normal View History

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): Canonical link: https://commits.webkit.org/120115@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@134376 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-11-13 08:11:18 +00:00
<html><head>
<title>Animated GIF on a compositing layer</title>
<style type="text/css" media="screen">
.compositing {
top: 0px;
left: 0px;
-webkit-transform:translateZ(0);
}
</style>
</head><body>
<p>This test checks that a gif animation can run on a compositing layer. The test passes if the gif animation runs.</p>
<img class="compositing" src="./resources/animated-infinite.gif" />
</body></html>