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

Unified Diff: cc/test/layer_test_common.cc

Issue 1823833002: cc : Update render surfaces using LayerListIterator instead of treewalk (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
Index: cc/test/layer_test_common.cc
diff --git a/cc/test/layer_test_common.cc b/cc/test/layer_test_common.cc
index 2979d5e46f31e8c02b7d75284703603179cdb77f..0e3020ec59fb1ec3dd5c4908de83f793116c87a2 100644
--- a/cc/test/layer_test_common.cc
+++ b/cc/test/layer_test_common.cc
@@ -123,10 +123,12 @@ LayerTestCommon::LayerImplTest::LayerImplTest(const LayerTreeSettings& settings)
: client_(FakeLayerTreeHostClient::DIRECT_3D),
output_surface_(FakeOutputSurface::Create3d()),
host_(FakeLayerTreeHost::Create(&client_, &task_graph_runner_, settings)),
- root_layer_impl_(LayerImpl::Create(host_->host_impl()->active_tree(), 1)),
render_pass_(RenderPass::Create()),
layer_impl_id_(2) {
- root_layer_impl_->SetHasRenderSurface(true);
+ scoped_ptr<LayerImpl> root_layer_impl =
+ LayerImpl::Create(host_->host_impl()->active_tree(), 1);
+ root_layer_impl->SetHasRenderSurface(true);
+ host_->host_impl()->active_tree()->SetRootLayer(std::move(root_layer_impl));
host_->host_impl()->SetVisible(true);
host_->host_impl()->InitializeRenderer(output_surface_.get());
@@ -150,7 +152,8 @@ void LayerTestCommon::LayerImplTest::CalcDrawProps(
LayerImplList layer_list;
host_->host_impl()->active_tree()->IncrementRenderSurfaceListIdForTesting();
LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs(
- root_layer_impl_.get(), viewport_size, &layer_list,
+ host_->host_impl()->active_tree()->root_layer(), viewport_size,
+ &layer_list,
host_->host_impl()->active_tree()->current_render_surface_list_id());
LayerTreeHostCommon::CalculateDrawProperties(&inputs);
}
@@ -211,7 +214,8 @@ void LayerTestCommon::LayerImplTest::RequestCopyOfOutput() {
std::vector<scoped_ptr<CopyOutputRequest>> copy_requests;
copy_requests.push_back(
CopyOutputRequest::CreateRequest(base::Bind(&EmptyCopyOutputCallback)));
- root_layer_impl_->PassCopyRequests(&copy_requests);
+ host_->host_impl()->active_tree()->root_layer()->PassCopyRequests(
+ &copy_requests);
}
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698