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

Unified Diff: cc/tiled_layer_impl.cc

Issue 11882037: Activate LayerImpl tree with sync+push instead of pointer swap (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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/tiled_layer_impl.h ('k') | cc/tree_synchronizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiled_layer_impl.cc
diff --git a/cc/tiled_layer_impl.cc b/cc/tiled_layer_impl.cc
index f76faad5fe5c042524ecd5e97ef2147a1698611e..f84d32e944989aed632247adcfebf0e69089bbef 100644
--- a/cc/tiled_layer_impl.cc
+++ b/cc/tiled_layer_impl.cc
@@ -113,6 +113,29 @@ void TiledLayerImpl::getDebugBorderProperties(SkColor* color, float* width) cons
*width = DebugColors::TiledContentLayerBorderWidth(layerTreeImpl());
}
+scoped_ptr<LayerImpl> TiledLayerImpl::createLayerImpl(LayerTreeImpl* treeImpl)
+{
+ return TiledLayerImpl::create(treeImpl, id()).PassAs<LayerImpl>();
+}
+
+void TiledLayerImpl::pushPropertiesTo(LayerImpl* layer)
+{
+ LayerImpl::pushPropertiesTo(layer);
+
+ TiledLayerImpl* tiledLayer = static_cast<TiledLayerImpl*>(layer);
+
+ tiledLayer->setSkipsDraw(m_skipsDraw);
+ tiledLayer->setTilingData(*m_tiler);
+
+ for (LayerTilingData::TileMap::const_iterator iter = m_tiler->tiles().begin(); iter != m_tiler->tiles().end(); ++iter) {
+ int i = iter->first.first;
+ int j = iter->first.second;
+ DrawableTile* tile = static_cast<DrawableTile*>(iter->second);
+
+ tiledLayer->pushTileProperties(i, j, tile->resourceId(), tile->opaqueRect(), tile->contentsSwizzled());
+ }
+}
+
void TiledLayerImpl::appendQuads(QuadSink& quadSink, AppendQuadsData& appendQuadsData)
{
const gfx::Rect& contentRect = visibleContentRect();
« no previous file with comments | « cc/tiled_layer_impl.h ('k') | cc/tree_synchronizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698