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

Unified Diff: cc/trees/layer_tree_host_common.cc

Issue 565353002: Propogate the clip rect for visible_content_rect into surfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: viewportsurface: . Created 6 years, 3 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/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/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(
« 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