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

Unified Diff: cc/trees/draw_property_utils.cc

Issue 2035863003: cc: Add mask and replica layer ids to the effect tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments 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 | « cc/trees/damage_tracker_unittest.cc ('k') | cc/trees/layer_tree_host_common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/draw_property_utils.cc
diff --git a/cc/trees/draw_property_utils.cc b/cc/trees/draw_property_utils.cc
index 24ac33a066a47bd2ec9b6f278bc7be75d5ba137c..6881a25cc1a3f323a0bbaaf55f6f9a04dcad94a5 100644
--- a/cc/trees/draw_property_utils.cc
+++ b/cc/trees/draw_property_utils.cc
@@ -33,13 +33,6 @@ static bool IsRootLayer(const LayerImpl* layer) {
}
#if DCHECK_IS_ON()
-static LayerImpl* EffectNodeOwner(LayerImpl* layer) {
- EffectNode* node =
- layer->layer_tree_impl()->property_trees()->effect_tree.Node(
- layer->effect_tree_index());
- return layer->layer_tree_impl()->LayerById(node->owner_id);
-}
-
static void ValidateRenderSurfaceForLayer(LayerImpl* layer) {
// This test verifies that there are no cases where a LayerImpl needs
// a render surface, but doesn't have one.
@@ -49,10 +42,13 @@ static void ValidateRenderSurfaceForLayer(LayerImpl* layer) {
DCHECK(layer->filters().IsEmpty()) << "layer: " << layer->id();
DCHECK(layer->background_filters().IsEmpty()) << "layer: " << layer->id();
DCHECK(!IsRootLayer(layer)) << "layer: " << layer->id();
- if (EffectNodeOwner(layer)->replica_layer() == layer)
+ EffectNode* effect_node =
+ layer->layer_tree_impl()->property_trees()->effect_tree.Node(
+ layer->effect_tree_index());
+ if (effect_node->owner_id != layer->id())
return;
- DCHECK(!layer->mask_layer()) << "layer: " << layer->id();
- DCHECK(!layer->replica_layer()) << "layer: " << layer->id();
+ DCHECK_EQ(effect_node->data.mask_layer_id, -1) << "layer: " << layer->id();
+ DCHECK_EQ(effect_node->data.replica_layer_id, -1) << "layer: " << layer->id();
}
#endif
« no previous file with comments | « cc/trees/damage_tracker_unittest.cc ('k') | cc/trees/layer_tree_host_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698