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

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

Issue 9333004: Merge 106732 - [chromium] Fix multi-second hangs in compositor invalidating large layers (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 10 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 | « no previous file | no next file » | 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 106812)
+++ Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp (working copy)
@@ -264,18 +264,23 @@
tiledLayer->setSkipsDraw(m_skipsDraw);
tiledLayer->setContentsSwizzled(m_sampledTexelFormat != LayerTextureUpdater::SampledTexelFormatRGBA);
tiledLayer->setTilingData(*m_tiler);
+ Vector<UpdatableTile*> invalidTiles;
for (CCLayerTilingData::TileMap::const_iterator iter = m_tiler->tiles().begin(); iter != m_tiler->tiles().end(); ++iter) {
int i = iter->first.first;
int j = iter->first.second;
UpdatableTile* tile = static_cast<UpdatableTile*>(iter->second.get());
- if (!tile->managedTexture()->isValid(m_tiler->tileSize(), m_textureFormat))
+ if (!tile->managedTexture()->isValid(m_tiler->tileSize(), m_textureFormat)) {
+ invalidTiles.append(tile);
continue;
+ }
if (tile->isDirty())
continue;
tiledLayer->pushTileProperties(i, j, tile->managedTexture()->textureId(), tile->m_opaqueRect);
}
+ for (Vector<UpdatableTile*>::const_iterator iter = invalidTiles.begin(); iter != invalidTiles.end(); ++iter)
+ m_tiler->takeTile((*iter)->i(), (*iter)->j());
}
TextureManager* TiledLayerChromium::textureManager() const
@@ -325,17 +330,12 @@
if (m_tiler->isEmpty() || layerRect.isEmpty() || m_skipsDraw)
return;
- int left, top, right, bottom;
- m_tiler->layerRectToTileIndices(layerRect, left, top, right, bottom);
- for (int j = top; j <= bottom; ++j) {
- for (int i = left; i <= right; ++i) {
- UpdatableTile* tile = tileAt(i, j);
- if (!tile)
- continue;
- IntRect bound = m_tiler->tileRect(tile);
- bound.intersect(layerRect);
- tile->m_dirtyRect.unite(bound);
- }
+ for (CCLayerTilingData::TileMap::const_iterator iter = m_tiler->tiles().begin(); iter != m_tiler->tiles().end(); ++iter) {
+ UpdatableTile* tile = static_cast<UpdatableTile*>(iter->second.get());
+ ASSERT(tile);
+ IntRect bound = m_tiler->tileRect(tile);
+ bound.intersect(layerRect);
+ tile->m_dirtyRect.unite(bound);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698