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

Unified Diff: cc/animation/animation_host_perftest.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 | « build/toolchain/toolchain.gni ('k') | cc/blimp/compositor_state_deserializer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/animation_host_perftest.cc
diff --git a/cc/animation/animation_host_perftest.cc b/cc/animation/animation_host_perftest.cc
index c20fcd97f9b2d7c8aa072c4f6939ba0bc378aa5e..4e8bb38a461b5490411f7af4cb858b3316fea379 100644
--- a/cc/animation/animation_host_perftest.cc
+++ b/cc/animation/animation_host_perftest.cc
@@ -32,8 +32,9 @@ class AnimationHostPerfTest : public testing::Test {
void SetUp() override {
LayerTreeSettings settings;
- layer_tree_host_ =
- FakeLayerTreeHost::Create(&fake_client_, &task_graph_runner_, settings);
+ animation_host_ = AnimationHost::CreateForTesting(ThreadInstance::MAIN);
+ layer_tree_host_ = FakeLayerTreeHost::Create(
+ &fake_client_, &task_graph_runner_, animation_host_.get(), settings);
layer_tree_host_->InitializeSingleThreaded(
&single_thread_client_, base::ThreadTaskRunnerHandle::Get());
@@ -51,9 +52,7 @@ class AnimationHostPerfTest : public testing::Test {
layer_tree_host_ = nullptr;
}
- AnimationHost* host() const {
- return layer_tree_host_->GetLayerTree()->animation_host();
- }
+ AnimationHost* host() const { return animation_host_.get(); }
AnimationHost* host_impl() const {
return layer_tree_host_->host_impl()->animation_host();
}
@@ -137,6 +136,7 @@ class AnimationHostPerfTest : public testing::Test {
private:
StubLayerTreeHostSingleThreadClient single_thread_client_;
FakeLayerTreeHostClient fake_client_;
+ std::unique_ptr<AnimationHost> animation_host_;
std::unique_ptr<FakeLayerTreeHost> layer_tree_host_;
scoped_refptr<Layer> root_layer_;
LayerImpl* root_layer_impl_;
« no previous file with comments | « build/toolchain/toolchain.gni ('k') | cc/blimp/compositor_state_deserializer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698