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

Unified Diff: trunk/src/cc/layers/texture_layer.cc

Issue 23702010: Revert 220418 "cc: Block commit on activate by setting a flag on..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 4 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 | « trunk/src/cc/layers/texture_layer.h ('k') | trunk/src/cc/layers/texture_layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/cc/layers/texture_layer.cc
===================================================================
--- trunk/src/cc/layers/texture_layer.cc (revision 220454)
+++ trunk/src/cc/layers/texture_layer.cc (working copy)
@@ -138,9 +138,6 @@
holder_ref_.reset();
needs_set_mailbox_ = true;
SetNeedsCommit();
- // The active frame needs to be replaced and the mailbox returned before the
- // commit is called complete.
- SetNextCommitWaitsForActivation();
}
void TextureLayer::WillModifyTexture() {
@@ -164,24 +161,16 @@
}
if (layer_tree_host()) {
- if (texture_id_) {
+ if (texture_id_)
layer_tree_host()->AcquireLayerTextures();
- // The texture id needs to be removed from the active tree before the
- // commit is called complete.
- SetNextCommitWaitsForActivation();
- }
if (rate_limit_context_ && client_)
layer_tree_host()->StopRateLimiter(client_->Context3d());
}
// If we're removed from the tree, the TextureLayerImpl will be destroyed, and
// we will need to set the mailbox again on a new TextureLayerImpl the next
// time we push.
- if (!host && uses_mailbox_ && holder_ref_) {
+ if (!host && uses_mailbox_ && holder_ref_)
needs_set_mailbox_ = true;
- // The active frame needs to be replaced and the mailbox returned before the
- // commit is called complete.
- SetNextCommitWaitsForActivation();
- }
Layer::SetLayerTreeHost(host);
}
@@ -207,9 +196,6 @@
client_->Context3d()->getGraphicsResetStatusARB() != GL_NO_ERROR)
texture_id_ = 0;
updated = true;
- // The texture id needs to be removed from the active tree before the
- // commit is called complete.
- SetNextCommitWaitsForActivation();
}
}
@@ -255,6 +241,13 @@
return Region();
}
+bool TextureLayer::BlocksPendingCommit() const {
+ // Double-buffered texture layers need to be blocked until they can be made
+ // triple-buffered. Single-buffered layers already prevent draws, so
+ // can block too for simplicity.
+ return DrawsContent();
+}
+
bool TextureLayer::CanClipSelf() const {
return true;
}
« no previous file with comments | « trunk/src/cc/layers/texture_layer.h ('k') | trunk/src/cc/layers/texture_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698