Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Unified Diff: Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp

Issue 9697001: Merge 109263 - [chromium] Don't let invalidation for next frame prevent tile upload (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/platform/graphics/chromium/TiledLayerChromium.h ('k') | Source/WebKit/chromium/ChangeLog » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp
===================================================================
--- Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp (revision 110452)
+++ Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp (working copy)
@@ -64,6 +64,7 @@
m_updateRect = m_dirtyRect;
m_dirtyRect = IntRect();
}
+ bool isDirtyForCurrentFrame() { return !m_dirtyRect.isEmpty() && m_updateRect.isEmpty(); }
IntRect m_dirtyRect;
IntRect m_updateRect;
@@ -274,7 +275,7 @@
invalidTiles.append(tile);
continue;
}
- if (tile->isDirty())
+ if (tile->isDirtyForCurrentFrame())
continue;
tiledLayer->pushTileProperties(i, j, tile->managedTexture()->textureId(), tile->m_opaqueRect);
@@ -365,12 +366,6 @@
void TiledLayerChromium::prepareToUpdateTiles(bool idle, int left, int top, int right, int bottom)
{
- // Reset m_updateRect for all tiles.
- for (CCLayerTilingData::TileMap::const_iterator iter = m_tiler->tiles().begin(); iter != m_tiler->tiles().end(); ++iter) {
- UpdatableTile* tile = static_cast<UpdatableTile*>(iter->second.get());
- tile->m_updateRect = IntRect();
- }
-
// Create tiles as needed, expanding a dirty rect to contain all
// the dirty regions currently being drawn. All dirty tiles that are to be painted
// get their m_updateRect set to m_dirtyRect and m_dirtyRect cleared. This way if
@@ -488,6 +483,16 @@
}
}
+void TiledLayerChromium::resetUpdateState()
+{
+ // Reset m_updateRect for all tiles.
+ CCLayerTilingData::TileMap::const_iterator end = m_tiler->tiles().end();
+ for (CCLayerTilingData::TileMap::const_iterator iter = m_tiler->tiles().begin(); iter != end; ++iter) {
+ UpdatableTile* tile = static_cast<UpdatableTile*>(iter->second.get());
+ tile->m_updateRect = IntRect();
+ }
+}
+
void TiledLayerChromium::prepareToUpdate(const IntRect& layerRect)
{
m_skipsDraw = false;
@@ -497,6 +502,8 @@
updateBounds();
+ resetUpdateState();
+
if (layerRect.isEmpty() || !m_tiler->numTiles())
return;
« no previous file with comments | « Source/WebCore/platform/graphics/chromium/TiledLayerChromium.h ('k') | Source/WebKit/chromium/ChangeLog » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698