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

Side by Side Diff: cc/animation/animation_host_perftest.cc

Issue 2216203002: Refactor MutatorHostClient from LayerTreeHost to LayerTree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes according to code review. Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | cc/debug/invalidation_benchmark.cc » ('j') | cc/trees/layer_tree_host.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/animation/animation_host.h" 5 #include "cc/animation/animation_host.h"
6 6
7 #include "base/threading/thread_task_runner_handle.h" 7 #include "base/threading/thread_task_runner_handle.h"
8 #include "cc/animation/animation_id_provider.h" 8 #include "cc/animation/animation_id_provider.h"
9 #include "cc/animation/animation_player.h" 9 #include "cc/animation/animation_player.h"
10 #include "cc/animation/animation_timeline.h" 10 #include "cc/animation/animation_timeline.h"
(...skipping 26 matching lines...) Expand all
37 } 37 }
38 38
39 void TearDown() override { 39 void TearDown() override {
40 root_layer_ = nullptr; 40 root_layer_ = nullptr;
41 root_layer_impl_ = nullptr; 41 root_layer_impl_ = nullptr;
42 42
43 layer_tree_host_->SetRootLayer(nullptr); 43 layer_tree_host_->SetRootLayer(nullptr);
44 layer_tree_host_ = nullptr; 44 layer_tree_host_ = nullptr;
45 } 45 }
46 46
47 AnimationHost* host() const { return layer_tree_host_->animation_host(); } 47 AnimationHost* host() const {
48 return layer_tree_host_->GetLayerTree()->animation_host();
49 }
48 AnimationHost* host_impl() const { 50 AnimationHost* host_impl() const {
49 return layer_tree_host_->host_impl()->animation_host(); 51 return layer_tree_host_->host_impl()->animation_host();
50 } 52 }
51 53
52 void CreatePlayers(const int num_players) { 54 void CreatePlayers(const int num_players) {
53 scoped_refptr<AnimationTimeline> timeline = 55 scoped_refptr<AnimationTimeline> timeline =
54 AnimationTimeline::Create(AnimationIdProvider::NextTimelineId()); 56 AnimationTimeline::Create(AnimationIdProvider::NextTimelineId());
55 host()->AddAnimationTimeline(timeline); 57 host()->AddAnimationTimeline(timeline);
56 58
57 const int first_player_id = AnimationIdProvider::NextPlayerId(); 59 const int first_player_id = AnimationIdProvider::NextPlayerId();
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 CreateTimelines(10); 134 CreateTimelines(10);
133 DoTest(); 135 DoTest();
134 } 136 }
135 137
136 TEST_F(AnimationHostPerfTest, Push1000TimelinesPropertiesTo) { 138 TEST_F(AnimationHostPerfTest, Push1000TimelinesPropertiesTo) {
137 CreateTimelines(1000); 139 CreateTimelines(1000);
138 DoTest(); 140 DoTest();
139 } 141 }
140 142
141 } // namespace cc 143 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/debug/invalidation_benchmark.cc » ('j') | cc/trees/layer_tree_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698