summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2012-05-11 16:03:54 -0700
committerChris Craik <ccraik@google.com>2012-05-14 11:15:04 -0700
commit425ef23631e3468c61a5740dd4e4bae3052cec48 (patch)
tree756f4ce43978ca025638653a06024d1d8661ffce /Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp
parentd236e597b13a93d21eafa2edeacb5092076937e1 (diff)
downloadexternal_webkit-425ef23631e3468c61a5740dd4e4bae3052cec48.zip
external_webkit-425ef23631e3468c61a5740dd4e4bae3052cec48.tar.gz
external_webkit-425ef23631e3468c61a5740dd4e4bae3052cec48.tar.bz2
Fix stale tile problem
bug:6483791 Update tile painter of outstanding operations Always schedule a paint operation if we can't update an outstanding one Remove old interruption code, as it's no longer used Change-Id: Ibcdb142d3d9b4ee7a52c78b5c121056089913211
Diffstat (limited to 'Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp')
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp b/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp
index 7680fc9..d0a9f27 100644
--- a/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp
+++ b/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp
@@ -241,11 +241,17 @@ void TileGrid::prepareTile(int x, int y, TilePainter* painter,
if (tile->isDirty() || !tile->frontTexture())
tile->reserveTexture();
- if (tile->backTexture() && tile->isDirty() && !tile->isRepaintPending()) {
+ if (tile->backTexture() && tile->isDirty()) {
+ TilesManager* tilesManager = TilesManager::instance();
+
+ // if a scheduled repaint is still outstanding, update it with the new painter
+ if (tile->isRepaintPending() && tilesManager->tryUpdateOperationWithPainter(tile, painter))
+ return;
+
ALOGV("painting TG %p's tile %d %d for LG %p", this, x, y, painter);
PaintTileOperation *operation = new PaintTileOperation(tile, painter,
state, isLowResPrefetch);
- TilesManager::instance()->scheduleOperation(operation);
+ tilesManager->scheduleOperation(operation);
}
}