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

Unified Diff: cc/nine_patch_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: 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
Index: cc/nine_patch_layer_impl.cc
diff --git a/cc/nine_patch_layer_impl.cc b/cc/nine_patch_layer_impl.cc
index 8b5415b200b4e46018dc2db10b7c9b426350e414..d9d454f5220e27edf391a0c322170fc4da9a6512 100644
--- a/cc/nine_patch_layer_impl.cc
+++ b/cc/nine_patch_layer_impl.cc
@@ -27,6 +27,23 @@ ResourceProvider::ResourceId NinePatchLayerImpl::contentsResourceId() const
return 0;
}
+scoped_ptr<LayerImpl> NinePatchLayerImpl::createLayerImpl(LayerTreeImpl* treeImpl)
+{
+ return NinePatchLayerImpl::create(treeImpl, id()).PassAs<LayerImpl>();
+}
+
+void NinePatchLayerImpl::pushPropertiesTo(LayerImpl* layer)
+{
+ LayerImpl::pushPropertiesTo(layer);
+ NinePatchLayerImpl* layerImpl = static_cast<NinePatchLayerImpl*>(layer);
+
+ if (!m_resourceId)
+ return;
+
+ layerImpl->setResourceId(m_resourceId);
+ layerImpl->setLayout(m_imageBounds, m_imageAperture);
+}
+
void NinePatchLayerImpl::willDraw(ResourceProvider* resourceProvider)
{
}

Powered by Google App Engine
This is Rietveld 408576698