Index: cc/TiledLayerChromium.cpp |
diff --git a/cc/TiledLayerChromium.cpp b/cc/TiledLayerChromium.cpp |
index 1ab8f62eefb5ec6533199b15d342aadcab7ee23d..fe2ec48fdf92da9955368a743747c35bf3964fb5 100644 |
--- a/cc/TiledLayerChromium.cpp |
+++ b/cc/TiledLayerChromium.cpp |
@@ -11,7 +11,9 @@ |
#include "CCLayerImpl.h" |
#include "CCLayerTreeHost.h" |
+#include "CCLayerTreeHostImpl.h" |
#include "CCOverdrawMetrics.h" |
+#include "CCResourceProvider.h" |
#include "CCTextureUpdateQueue.h" |
#include "CCTiledLayerImpl.h" |
#include "GraphicsContext3D.h" |
@@ -203,6 +205,7 @@ void TiledLayerChromium::pushPropertiesTo(CCLayerImpl* layer) |
tiledLayer->setContentsSwizzled(m_sampledTexelFormat != LayerTextureUpdater::SampledTexelFormatRGBA); |
tiledLayer->setTilingData(*m_tiler); |
Vector<UpdatableTile*> invalidTiles; |
+ CCResourceProvider* resourceProvider = tiledLayer->layerTreeHostImpl()->resourceProvider(); |
for (CCLayerTilingData::TileMap::const_iterator iter = m_tiler->tiles().begin(); iter != m_tiler->tiles().end(); ++iter) { |
#if WTF_NEW_HASHMAP_ITERATORS_INTERFACE |
@@ -217,18 +220,19 @@ void TiledLayerChromium::pushPropertiesTo(CCLayerImpl* layer) |
// FIXME: This should not ever be null. |
if (!tile) |
continue; |
- |
- tile->isInUseOnImpl = false; |
- |
if (!tile->managedTexture()->haveBackingTexture()) { |
// Evicted tiles get deleted from both layers |
invalidTiles.append(tile); |
+ tile->isInUseOnImpl = false; |
continue; |
} |
- |
if (!tile->validForFrame) { |
// Invalidated tiles are set so they can get different debug colors. |
tiledLayer->pushInvalidTile(i, j); |
+ CCResourceProvider::ResourceId id = tile->managedTexture()->resourceId(); |
+ ASSERT(id); |
+ if (!resourceProvider->inUseByConsumer(id) /* && ubercomp */) |
+ tile->isInUseOnImpl = false; |
continue; |
} |
@@ -614,7 +618,7 @@ void TiledLayerChromium::setTexturePriorities(const CCPriorityCalculator& priori |
// Also, minimally create all tiles for small animated layers and also |
// double-buffer them since we have limited their size to be reasonable. |
IntRect doubleBufferedRect = visibleContentRect(); |
- if (smallAnimatedLayer) |
+ if (smallAnimatedLayer || true /* s/true/ubercomp */) |
doubleBufferedRect = IntRect(IntPoint::zero(), contentBounds()); |
// Create additional textures for double-buffered updates when needed. |