[chromium] Layers with animating transforms should prepaint even if they are not...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Mar 2012 06:02:56 +0000 (06:02 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Mar 2012 06:02:56 +0000 (06:02 +0000)
commit390d8e566c7a593c26ab9618a9021c7b504edeb1
tree91f4843e2653c694ac1da8d74b1a1935a4384876
parente519aa849c9751dbd4cabe50fe62a258e9ee9b83
[chromium] Layers with animating transforms should prepaint even if they are not visible yet
https://bugs.webkit.org/show_bug.cgi?id=82117

Patch by Dana Jansens <danakj@chromium.org> on 2012-03-25
Reviewed by Adrienne Walker.

Source/WebCore:

For animating transforms, instead of early-outing when the layer's
visible rect is empty, let it prepaint regardless.

For now, we just only paint the outermost tiles, and only for small
layers, with at most 9 tiles.

This changes the behaviour of ContentLayerChromium's
idlePaintContentsIfDirty() so I've guarded the behaviour of the two
prepainting functions that it calls to ensure the old behaviour holds
without animations, and the new behaviour works with them.

Unit test: TiledLayerChromiumTest.idlePaintZeroSizedLayer
           TiledLayerChromiumTest.idlePaintZeroSizedAnimatingLayer
           TiledLayerChromiumTest.idlePaintNonVisibleLayers
           TiledLayerChromiumTest.idlePaintNonVisibleAnimatingLayers

* platform/graphics/chromium/ContentLayerChromium.cpp:
(WebCore::ContentLayerChromium::idlePaintContentsIfDirty):
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::prepareToUpdateIdle):
(WebCore::TiledLayerChromium::needsIdlePaint):
(WebCore::TiledLayerChromium::idlePaintRect):
* platform/graphics/chromium/TiledLayerChromium.h:
(WebCore::TiledLayerChromium::numPaintedTiles):
(TiledLayerChromium):

Source/WebKit/chromium:

* tests/TiledLayerChromiumTest.cpp:
(WTF::FakeTiledLayerChromium::FakeTiledLayerChromium):
(WTF::FakeTiledLayerChromium::tileSize):
(FakeTiledLayerChromium):
(WTF::TEST):
(WTF):
(WTF::idlePaintRepeat):
(WTF::testHaveOuterTiles):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@112049 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/TiledLayerChromium.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp