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

Unified Diff: cc/test/layer_tree_host_common_test.cc

Issue 1479883002: cc: Fix draw transform computation for non-drawn layers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove LayerImpl::draw_transform() Created 5 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
Index: cc/test/layer_tree_host_common_test.cc
diff --git a/cc/test/layer_tree_host_common_test.cc b/cc/test/layer_tree_host_common_test.cc
index f8d1353926f715c685bcc05daa96740be3343a82..676dc080b000ac80b23be99310d5780481f52387 100644
--- a/cc/test/layer_tree_host_common_test.cc
+++ b/cc/test/layer_tree_host_common_test.cc
@@ -153,8 +153,10 @@ void LayerTreeHostCommonTestBase::ExecuteCalculateDrawProperties(
// We are probably not testing what is intended if the root_layer bounds are
// empty.
DCHECK(!root_layer->bounds().IsEmpty());
+ root_layer->layer_tree_impl()->IncrementRenderSurfaceListIdForTesting();
LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs(
- root_layer, device_viewport_size, render_surface_layer_list_impl_.get());
+ root_layer, device_viewport_size, render_surface_layer_list_impl_.get(),
+ root_layer->layer_tree_impl()->current_render_surface_list_id());
inputs.device_scale_factor = device_scale_factor;
inputs.page_scale_factor = page_scale_factor;
inputs.page_scale_layer = page_scale_layer;
@@ -162,9 +164,8 @@ void LayerTreeHostCommonTestBase::ExecuteCalculateDrawProperties(
inputs.layers_always_allowed_lcd_text = layers_always_allowed_lcd_text;
inputs.can_adjust_raster_scales = true;
- ++render_surface_layer_list_count_;
- inputs.current_render_surface_layer_list_id =
- render_surface_layer_list_count_;
+ render_surface_layer_list_count_ =
+ inputs.current_render_surface_layer_list_id;
LayerTreeHostCommon::CalculateDrawProperties(&inputs);
}
@@ -178,14 +179,15 @@ void LayerTreeHostCommonTestBase::
render_surface_layer_list_impl_.reset(new LayerImplList);
DCHECK(!root_layer->bounds().IsEmpty());
+ root_layer->layer_tree_impl()->IncrementRenderSurfaceListIdForTesting();
LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs(
- root_layer, device_viewport_size, render_surface_layer_list_impl_.get());
+ root_layer, device_viewport_size, render_surface_layer_list_impl_.get(),
+ root_layer->layer_tree_impl()->current_render_surface_list_id());
inputs.can_adjust_raster_scales = true;
inputs.can_render_to_separate_surface = false;
- ++render_surface_layer_list_count_;
- inputs.current_render_surface_layer_list_id =
- render_surface_layer_list_count_;
+ render_surface_layer_list_count_ =
+ inputs.current_render_surface_layer_list_id;
LayerTreeHostCommon::CalculateDrawProperties(&inputs);
}

Powered by Google App Engine
This is Rietveld 408576698