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

Unified Diff: cc/test/layer_test_common.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_test_common.cc
diff --git a/cc/test/layer_test_common.cc b/cc/test/layer_test_common.cc
index 73af7ec1a89b6ccff0fc851dbfdf8f4453b3b52e..b1eb320c9774e295675fd8af5ddb0070a2753545 100644
--- a/cc/test/layer_test_common.cc
+++ b/cc/test/layer_test_common.cc
@@ -129,8 +129,10 @@ LayerTestCommon::LayerImplTest::~LayerImplTest() {}
void LayerTestCommon::LayerImplTest::CalcDrawProps(
const gfx::Size& viewport_size) {
LayerImplList layer_list;
+ host_->host_impl()->active_tree()->IncrementRenderSurfaceListIdForTesting();
LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs(
- root_layer_impl_.get(), viewport_size, &layer_list);
+ root_layer_impl_.get(), viewport_size, &layer_list,
+ host_->host_impl()->active_tree()->current_render_surface_list_id());
LayerTreeHostCommon::CalculateDrawProperties(&inputs);
}
@@ -142,9 +144,8 @@ void LayerTestCommon::LayerImplTest::AppendQuadsWithOcclusion(
render_pass_->quad_list.clear();
render_pass_->shared_quad_state_list.clear();
- Occlusion occlusion(layer_impl->draw_transform(),
- SimpleEnclosedRegion(occluded),
- SimpleEnclosedRegion());
+ Occlusion occlusion(layer_impl->DrawTransform(),
+ SimpleEnclosedRegion(occluded), SimpleEnclosedRegion());
layer_impl->draw_properties().occlusion_in_content_space = occlusion;
layer_impl->WillDraw(DRAW_MODE_HARDWARE, resource_provider());
@@ -161,9 +162,8 @@ void LayerTestCommon::LayerImplTest::AppendQuadsForPassWithOcclusion(
given_render_pass->quad_list.clear();
given_render_pass->shared_quad_state_list.clear();
- Occlusion occlusion(layer_impl->draw_transform(),
- SimpleEnclosedRegion(occluded),
- SimpleEnclosedRegion());
+ Occlusion occlusion(layer_impl->DrawTransform(),
+ SimpleEnclosedRegion(occluded), SimpleEnclosedRegion());
layer_impl->draw_properties().occlusion_in_content_space = occlusion;
layer_impl->WillDraw(DRAW_MODE_HARDWARE, resource_provider());

Powered by Google App Engine
This is Rietveld 408576698