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

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: 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/texture_layer_impl.h ('k') | cc/tiled_layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/texture_layer_impl.cc
diff --git a/cc/texture_layer_impl.cc b/cc/texture_layer_impl.cc
index 6ea69bc9ab66fa72d2633f66536874fc688fa358..279decc948123f6dbd50908bb4a57ccb96ecf598 100644
--- a/cc/texture_layer_impl.cc
+++ b/cc/texture_layer_impl.cc
@@ -54,6 +54,29 @@ void TextureLayerImpl::setTextureMailbox(const TextureMailbox& mailbox)
m_hasPendingMailbox = true;
}
+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->setUVTopLeft(m_uvTopLeft);
+ textureLayer->setUVBottomRight(m_uvBottomRight);
+ textureLayer->setVertexOpacity(m_vertexOpacity);
+ textureLayer->setPremultipliedAlpha(m_premultipliedAlpha);
+ if (m_usesMailbox) {
+ textureLayer->setTextureMailbox(m_pendingTextureMailbox);
+ } else {
+ textureLayer->setTextureId(m_textureId);
+ }
+}
+
+
void TextureLayerImpl::willDraw(ResourceProvider* resourceProvider)
{
if (!m_usesMailbox) {
« no previous file with comments | « cc/texture_layer_impl.h ('k') | cc/tiled_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698