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

Unified Diff: cc/trees/draw_property_utils.cc

Issue 2537053002: cc : Remove invalid DCHECK from draw_property_utils.cc (Closed)
Patch Set: 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 | « no previous file | cc/trees/layer_tree_host_common_unittest.cc » ('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 cc45ba11d8a03bb74a9a2bbed4960a59aece0af2..98286510f889abfb19387ec41a07af4f20505ce1 100644
--- a/cc/trees/draw_property_utils.cc
+++ b/cc/trees/draw_property_utils.cc
@@ -1229,10 +1229,15 @@ static void SetSurfaceClipRect(const ClipNode* parent_clip_node,
return;
}
- DCHECK_LT(parent_clip_node->target_transform_id,
- transform_tree.TargetId(transform_node->id));
- render_surface->SetClipRect(gfx::ToEnclosingRect(MathUtil::ProjectClippedRect(
- clip_parent_target_to_target, parent_clip_node->clip_in_target_space)));
+ if (parent_clip_node->target_transform_id <
+ transform_tree.TargetId(transform_node->id)) {
+ render_surface->SetClipRect(gfx::ToEnclosingRect(
+ MathUtil::ProjectClippedRect(clip_parent_target_to_target,
+ parent_clip_node->clip_in_target_space)));
+ } else {
+ render_surface->SetClipRect(gfx::ToEnclosingRect(MathUtil::MapClippedRect(
+ clip_parent_target_to_target, parent_clip_node->clip_in_target_space)));
+ }
}
template <typename LayerType>
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698