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

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: 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/nine_patch_layer_impl.h ('k') | cc/picture_layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/nine_patch_layer_impl.cc
diff --git a/cc/nine_patch_layer_impl.cc b/cc/nine_patch_layer_impl.cc
index bc23e85c54dc2dc499264face48683822d677ccf..0fa0317d8a3cc07d36be33e24eb4a1fbf2da78e3 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)
{
}
« no previous file with comments | « cc/nine_patch_layer_impl.h ('k') | cc/picture_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698