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: cc/layers/layer_impl.cc

Issue 2087963003: cc: Stop creating unused 0 property tree nodes other than transform Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | cc/layers/render_surface_impl.cc » ('j') | cc/trees/draw_property_utils.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 900ee29e5747f32de7d18699977f3abfee5440c2..52f79ccba01bee0cccfcddbb3a0dcc3d5d1b97c1 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -1241,13 +1241,13 @@ bool LayerImpl::InsideReplica() const {
EffectTree& effect_tree = layer_tree_impl_->property_trees()->effect_tree;
EffectNode* node = effect_tree.Node(effect_tree_index_);
- while (node->id > 0) {
- if (node->data.replica_layer_id != -1)
+ while (node->id > EffectTree::kRootNodeId) {
+ if (node->data.replica_layer_id != EffectTree::kInvalidNodeId)
ajuma 2016/06/22 13:29:50 Layer::INVALID_ID since this is a layer id
return true;
node = effect_tree.Node(node->data.target_id);
}
- return false;
+ return node->data.replica_layer_id != EffectTree::kInvalidNodeId;
ajuma 2016/06/22 13:29:50 Here too, Layer::INVALID_ID
}
float LayerImpl::GetIdealContentsScale() const {
« no previous file with comments | « no previous file | cc/layers/render_surface_impl.cc » ('j') | cc/trees/draw_property_utils.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698