diff options
author | jaydasika <jaydasika@chromium.org> | 2015-10-30 07:43:05 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-30 14:44:20 +0000 |
commit | 7919887134cb88c0ddb31dd52091f11604475e7b (patch) | |
tree | e94cb490fb0eff694a57b88a4bf4feb7dc1f0bfd /cc/trees/layer_tree_host_common.cc | |
parent | 7c26f04cf12c2c72fdab8e4764faf9305724c7ee (diff) | |
download | chromium_src-7919887134cb88c0ddb31dd52091f11604475e7b.zip chromium_src-7919887134cb88c0ddb31dd52091f11604475e7b.tar.gz chromium_src-7919887134cb88c0ddb31dd52091f11604475e7b.tar.bz2 |
Turn on property tree verification for PictureLayerImplTests
We were not clipping the render surface content rect computed using
property trees with maximum supported texture size. That resulted in
property tree verification failures on some PictureLayerImplTests. This
CL fixes that.
BUG=538260
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1418663006
Cr-Commit-Position: refs/heads/master@{#357101}
Diffstat (limited to 'cc/trees/layer_tree_host_common.cc')
-rw-r--r-- | cc/trees/layer_tree_host_common.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc index e02cf8b..5fcf03d 100644 --- a/cc/trees/layer_tree_host_common.cc +++ b/cc/trees/layer_tree_host_common.cc @@ -2434,6 +2434,7 @@ void CalculateRenderSurfaceLayerListInternal( bool subtree_visible_from_ancestor, const bool can_render_to_separate_surface, const int current_render_surface_layer_list_id, + const int max_texture_size, const bool verify_property_trees) { // This calculates top level Render Surface Layer List, and Layer List for all // Render Surfaces. @@ -2529,7 +2530,7 @@ void CalculateRenderSurfaceLayerListInternal( child_layer, property_trees, render_surface_layer_list, descendants, nearest_occlusion_immune_ancestor, layer_is_drawn, can_render_to_separate_surface, current_render_surface_layer_list_id, - verify_property_trees); + max_texture_size, verify_property_trees); // If the child is its own render target, then it has a render surface. if (child_layer->render_target() == child_layer && @@ -2583,6 +2584,12 @@ void CalculateRenderSurfaceLayerListInternal( surface_content_rect.Intersect(surface_clip_rect); } } + // The RenderSurfaceImpl backing texture cannot exceed the maximum + // supported texture size. + surface_content_rect.set_width( + std::min(surface_content_rect.width(), max_texture_size)); + surface_content_rect.set_height( + std::min(surface_content_rect.height(), max_texture_size)); layer->render_surface()->SetContentRectFromPropertyTrees( surface_content_rect); } @@ -2645,7 +2652,7 @@ void CalculateRenderSurfaceLayerList( inputs->root_layer, inputs->property_trees, inputs->render_surface_layer_list, nullptr, nullptr, subtree_visible_from_ancestor, inputs->can_render_to_separate_surface, - inputs->current_render_surface_layer_list_id, + inputs->current_render_surface_layer_list_id, inputs->max_texture_size, inputs->verify_property_trees); } |