Index: cc/trees/layer_tree_host_common.cc |
diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc |
index 840a32b2ef4a59037f22e33e251c9edee72bc649..8d25539725914ee4d495f5ac580b86ae70aec0d4 100644 |
--- a/cc/trees/layer_tree_host_common.cc |
+++ b/cc/trees/layer_tree_host_common.cc |
@@ -1945,8 +1945,11 @@ static void CalculateDrawPropertiesInternal( |
// here, or DCHECK that the transform is invertible. |
} |
+ gfx::Rect surface_clip_rect_in_target_space = gfx::IntersectRects( |
+ data_from_ancestor.clip_rect_of_target_surface_in_target_space, |
+ ancestor_clip_rect_in_target_space); |
gfx::Rect projected_surface_rect = MathUtil::ProjectEnclosingClippedRect( |
- inverse_surface_draw_transform, ancestor_clip_rect_in_target_space); |
+ inverse_surface_draw_transform, surface_clip_rect_in_target_space); |
if (layer_draw_properties.num_unclipped_descendants > 0) { |
// If we have unclipped descendants, we cannot count on the render |
@@ -2327,7 +2330,7 @@ static void CalculateDrawPropertiesInternal( |
layer->render_target()->render_surface()-> |
AddContributingDelegatedRenderPassLayer(layer); |
} |
-} |
+} // NOLINT(readability/fn_size) |
template <typename LayerType, typename RenderSurfaceLayerListType> |
static void ProcessCalcDrawPropsInputs( |