Chromium Code Reviews| Index: cc/trees/property_tree_builder.cc |
| diff --git a/cc/trees/property_tree_builder.cc b/cc/trees/property_tree_builder.cc |
| index 2ad73f16529b919037f8de37bb3761280031b17b..5d2b1bea462908cb7d79281ab48cccb7552d58c1 100644 |
| --- a/cc/trees/property_tree_builder.cc |
| +++ b/cc/trees/property_tree_builder.cc |
| @@ -369,7 +369,7 @@ void AddClipNodeIfNeeded(const DataForRecursion<LayerType>& data_from_ancestor, |
| // of its own, but clips from ancestor nodes don't need to be considered |
| // when computing clip rects or visibility. |
| has_unclipped_surface = true; |
| - DCHECK(!parent->applies_local_clip); |
| + DCHECK(parent->clip_type != ClipNode::ClipType::APPLIES_LOCAL_CLIP); |
|
jaydasika
2016/10/21 23:20:58
Nit : You can use DCHECK_NE here.
ajuma
2016/10/21 23:35:30
Done.
|
| } |
| // A surface with unclipped descendants cannot be clipped by its ancestor |
| // clip at draw time since the unclipped descendants aren't affected by the |
| @@ -429,7 +429,10 @@ void AddClipNodeIfNeeded(const DataForRecursion<LayerType>& data_from_ancestor, |
| node.layer_clipping_uses_only_local_clip = false; |
| } |
| - node.applies_local_clip = layer_clips_subtree; |
| + if (layer_clips_subtree) |
| + node.clip_type = ClipNode::ClipType::APPLIES_LOCAL_CLIP; |
| + else |
| + node.clip_type = ClipNode::ClipType::NONE; |
| node.resets_clip = has_unclipped_surface; |
| node.target_is_clipped = data_for_children->target_is_clipped; |
| node.layers_are_clipped = layers_are_clipped; |
| @@ -1388,7 +1391,7 @@ void BuildPropertyTreesTopLevelInternal( |
| ClipNode root_clip; |
| root_clip.resets_clip = true; |
| - root_clip.applies_local_clip = true; |
| + root_clip.clip_type = ClipNode::ClipType::APPLIES_LOCAL_CLIP; |
| root_clip.clip = gfx::RectF(viewport); |
| root_clip.transform_id = kRootPropertyTreeNodeId; |
| data_for_recursion.clip_tree_parent = |