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

Unified Diff: cc/test/layer_test_common.cc

Issue 2480203002: ui: Cleanup class/struct forward declarations (Closed)
Patch Set: Sync CL to position 430550 Created 4 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
« no previous file with comments | « cc/test/layer_test_common.h ('k') | cc/test/layer_tree_host_remote_for_testing.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/layer_test_common.cc
diff --git a/cc/test/layer_test_common.cc b/cc/test/layer_test_common.cc
index 0b26ead82f04a3b71295d1359d764cf296be1901..c191bda665f9814ed3a9f3c9c65f37281ac4df5e 100644
--- a/cc/test/layer_test_common.cc
+++ b/cc/test/layer_test_common.cc
@@ -120,7 +120,11 @@ LayerTestCommon::LayerImplTest::LayerImplTest()
LayerTestCommon::LayerImplTest::LayerImplTest(const LayerTreeSettings& settings)
: compositor_frame_sink_(FakeCompositorFrameSink::Create3d()),
- host_(FakeLayerTreeHost::Create(&client_, &task_graph_runner_, settings)),
+ animation_host_(AnimationHost::CreateForTesting(ThreadInstance::MAIN)),
+ host_(FakeLayerTreeHost::Create(&client_,
+ &task_graph_runner_,
+ animation_host_.get(),
+ settings)),
render_pass_(RenderPass::Create()),
layer_impl_id_(2) {
std::unique_ptr<LayerImpl> root =
@@ -133,16 +137,15 @@ LayerTestCommon::LayerImplTest::LayerImplTest(const LayerTreeSettings& settings)
const int timeline_id = AnimationIdProvider::NextTimelineId();
timeline_ = AnimationTimeline::Create(timeline_id);
- host_->GetLayerTree()->animation_host()->AddAnimationTimeline(timeline_);
+ animation_host_->AddAnimationTimeline(timeline_);
// Create impl-side instance.
- host_->GetLayerTree()->animation_host()->PushPropertiesTo(
- host_->host_impl()->animation_host());
+ animation_host_->PushPropertiesTo(host_->host_impl()->animation_host());
timeline_impl_ =
host_->host_impl()->animation_host()->GetTimelineById(timeline_id);
}
LayerTestCommon::LayerImplTest::~LayerImplTest() {
- host_->GetLayerTree()->animation_host()->RemoveAnimationTimeline(timeline_);
+ animation_host_->RemoveAnimationTimeline(timeline_);
timeline_ = nullptr;
host_->host_impl()->ReleaseCompositorFrameSink();
}
« no previous file with comments | « cc/test/layer_test_common.h ('k') | cc/test/layer_tree_host_remote_for_testing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698