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

Unified Diff: cc/layers/layer.cc

Issue 2467043002: cc/blimp: Eliminate Layer updates for common cases. (Closed)
Patch Set: test update Created 4 years, 1 month 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/blimp/layer_tree_host_remote_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index 517a1c6a634511b8774f01d285dcac06f1038d5d..1d53e26d30301008dbd46ad4b5421e03e1a2f58b 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -420,6 +420,9 @@ void Layer::SetMaskLayer(Layer* mask_layer) {
}
inputs_.mask_layer = mask_layer;
if (inputs_.mask_layer.get()) {
+ // The mask layer should not have any children.
+ DCHECK(inputs_.mask_layer->children().empty());
+
inputs_.mask_layer->RemoveFromParent();
DCHECK(!inputs_.mask_layer->parent());
inputs_.mask_layer->SetParent(this);
« no previous file with comments | « cc/blimp/layer_tree_host_remote_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698