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

Unified Diff: cc/TiledLayerChromium.cpp

Issue 10915298: Add CCDelegatingRenderer, and corresponding IPCs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix clang Created 8 years, 2 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 | « cc/ScrollbarLayerChromium.cpp ('k') | cc/TreeSynchronizer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « cc/ScrollbarLayerChromium.cpp ('k') | cc/TreeSynchronizer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698