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

Unified Diff: cc/texture_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/texture_layer_impl.cc
diff --git a/cc/texture_layer_impl.cc b/cc/texture_layer_impl.cc
index b94fe1363d1c49e77447bc7f218c55e02b7dc89b..de3e62aab85337c3aec479d67e80cc58d14e73c6 100644
--- a/cc/texture_layer_impl.cc
+++ b/cc/texture_layer_impl.cc
@@ -54,6 +54,29 @@ void TextureLayerImpl::setTextureMailbox(const std::string& mailboxName, const b
m_pendingMailboxReleaseCallback = releaseCallback;
}
+scoped_ptr<LayerImpl> TextureLayerImpl::createLayerImpl(LayerTreeImpl* treeImpl)
+{
+ return TextureLayerImpl::create(treeImpl, id(), m_usesMailbox).PassAs<LayerImpl>();
+}
+
+void TextureLayerImpl::pushPropertiesTo(LayerImpl* layer)
+{
+ LayerImpl::pushPropertiesTo(layer);
+
+ TextureLayerImpl* textureLayer = static_cast<TextureLayerImpl*>(layer);
+ textureLayer->setFlipped(m_flipped);
+ textureLayer->setUVRect(m_uvRect);
+ textureLayer->setVertexOpacity(m_vertexOpacity);
+ textureLayer->setPremultipliedAlpha(m_premultipliedAlpha);
+ if (m_usesMailbox) {
+ textureLayer->setTextureMailbox(m_pendingMailboxName, m_pendingMailboxReleaseCallback);
+ m_pendingMailboxReleaseCallback.Reset();
+ } else {
+ textureLayer->setTextureId(m_textureId);
+ }
+}
+
+
void TextureLayerImpl::willDraw(ResourceProvider* resourceProvider)
{
if (!m_usesMailbox) {

Powered by Google App Engine
This is Rietveld 408576698