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

Unified Diff: trunk/src/cc/layers/delegated_renderer_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/delegated_renderer_layer.h ('k') | trunk/src/cc/layers/layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/cc/layers/delegated_renderer_layer.cc
===================================================================
--- trunk/src/cc/layers/delegated_renderer_layer.cc (revision 220454)
+++ trunk/src/cc/layers/delegated_renderer_layer.cc (working copy)
@@ -29,23 +29,6 @@
tree_impl, layer_id_).PassAs<LayerImpl>();
}
-void DelegatedRendererLayer::SetLayerTreeHost(LayerTreeHost* host) {
- if (layer_tree_host() == host) {
- Layer::SetLayerTreeHost(host);
- return;
- }
-
- if (!host) {
- // The active frame needs to be removed from the active tree and resources
- // returned before the commit is called complete.
- // TODO(danakj): Don't need to do this if the last frame commited was empty
- // or we never commited a frame with resources.
- SetNextCommitWaitsForActivation();
- }
-
- Layer::SetLayerTreeHost(host);
-}
-
bool DelegatedRendererLayer::DrawsContent() const {
return Layer::DrawsContent() && !frame_size_.IsEmpty();
}
@@ -100,9 +83,6 @@
frame_size_ = gfx::Size();
}
SetNeedsCommit();
- // The active frame needs to be replaced and resources returned before the
- // commit is called complete.
- SetNextCommitWaitsForActivation();
}
void DelegatedRendererLayer::TakeUnusedResourcesForChildCompositor(
@@ -113,4 +93,12 @@
array->swap(unused_resources_for_child_compositor_);
}
+bool DelegatedRendererLayer::BlocksPendingCommit() const {
+ // The active frame needs to be replaced and resources returned before the
+ // commit is called complete. This is true even whenever there may be
+ // resources to return, regardless of if the layer will draw in its new
+ // state.
+ return true;
+}
+
} // namespace cc
« no previous file with comments | « trunk/src/cc/layers/delegated_renderer_layer.h ('k') | trunk/src/cc/layers/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698