[chromium] Don't let invalidation for next frame prevent tile upload
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Feb 2012 22:35:01 +0000 (22:35 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Feb 2012 22:35:01 +0000 (22:35 +0000)
commitadf510540b72c694813783512b832eb6b3141257
tree5177fe82b4c9706308eafc93d4da7c37f792c2fc
parenta1abab4f416e1afcf08ba8ab04e564d498faf6a5
[chromium] Don't let invalidation for next frame prevent tile upload
https://bugs.webkit.org/show_bug.cgi?id=79841

Patch by Dana Jansens <danakj@chromium.org> on 2012-02-29
Reviewed by James Robinson.

Source/WebCore:

We currently don't push dirty tiles to the impl thread so there are no
tiles with garbage data on the impl thread. However, this judgement is
overzealous and blocks tiles that get invalidated by WebKit for the
next frame during the paint of the current frame.

Instead, check if a tile is dirty and was not painted for the current
frame when deciding to push the tile to the impl thread. This requires
that we know if a tile was painted during the current frame, which we
can do if we always reset m_updateRect to be empty each frame.

New unit tests: TiledLayerChromiumTest.pushTilesMarkedDirtyDuringPaint
                TiledLayerChromiumTest.pushTilesLayerMarkedDirtyDuringPaintOnNextLayer
                TiledLayerChromiumTest.pushTilesLayerMarkedDirtyDuringPaintOnPreviousLayer

* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::UpdatableTile::isDirtyForCurrentFrame):
(WebCore::TiledLayerChromium::pushPropertiesTo):
(WebCore::TiledLayerChromium::prepareToUpdateTiles):
(WebCore::TiledLayerChromium::resetUpdateState):
(WebCore):
(WebCore::TiledLayerChromium::prepareToUpdate):
* platform/graphics/chromium/TiledLayerChromium.h:
(TiledLayerChromium):

Source/WebKit/chromium:

* tests/TiledLayerChromiumTest.cpp:
(WTF::TEST):

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