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

Side by Side Diff: cc/test/layer_tree_host_common_test.cc

Issue 1783613004: CC Animation: Erase cc::LayerSettings everywhere. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@eraseandroid
Patch Set: Rebase. 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 unified diff | Download patch
« no previous file with comments | « cc/test/layer_tree_host_common_test.h ('k') | cc/test/layer_tree_json_parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/test/layer_tree_host_common_test.h" 5 #include "cc/test/layer_tree_host_common_test.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "cc/layers/layer.h" 9 #include "cc/layers/layer.h"
10 #include "cc/layers/layer_impl.h" 10 #include "cc/layers/layer_impl.h"
11 #include "cc/test/fake_layer_tree_host.h" 11 #include "cc/test/fake_layer_tree_host.h"
12 #include "cc/trees/draw_property_utils.h" 12 #include "cc/trees/draw_property_utils.h"
13 #include "cc/trees/layer_tree_host_common.h" 13 #include "cc/trees/layer_tree_host_common.h"
14 14
15 namespace cc { 15 namespace cc {
16 LayerTreeHostCommonTestBase::LayerTreeHostCommonTestBase( 16 LayerTreeHostCommonTestBase::LayerTreeHostCommonTestBase(
17 const LayerTreeSettings& settings) 17 const LayerTreeSettings& settings)
18 : LayerTestCommon::LayerImplTest(settings), 18 : LayerTestCommon::LayerImplTest(settings),
19 render_surface_layer_list_count_(0) { 19 render_surface_layer_list_count_(0) {
20 layer_settings_.use_compositor_animation_timelines =
21 settings.use_compositor_animation_timelines;
22 } 20 }
23 21
24 LayerTreeHostCommonTestBase::~LayerTreeHostCommonTestBase() { 22 LayerTreeHostCommonTestBase::~LayerTreeHostCommonTestBase() {
25 } 23 }
26 24
27 void LayerTreeHostCommonTestBase::SetLayerPropertiesForTesting( 25 void LayerTreeHostCommonTestBase::SetLayerPropertiesForTesting(
28 Layer* layer, 26 Layer* layer,
29 const gfx::Transform& transform, 27 const gfx::Transform& transform,
30 const gfx::Point3F& transform_origin, 28 const gfx::Point3F& transform_origin,
31 const gfx::PointF& position, 29 const gfx::PointF& position,
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 } 219 }
222 220
223 bool LayerTreeHostCommonTestBase::UpdateLayerListContains(int id) const { 221 bool LayerTreeHostCommonTestBase::UpdateLayerListContains(int id) const {
224 for (size_t i = 0; i < update_layer_list_.size(); ++i) { 222 for (size_t i = 0; i < update_layer_list_.size(); ++i) {
225 if (update_layer_list_[i]->id() == id) 223 if (update_layer_list_[i]->id() == id)
226 return true; 224 return true;
227 } 225 }
228 return false; 226 return false;
229 } 227 }
230 228
231 class LayerTreeSettingsForCommonTest : public LayerTreeSettings {
232 public:
233 LayerTreeSettingsForCommonTest() {
234 use_compositor_animation_timelines = true;
235 }
236 };
237
238 LayerTreeHostCommonTest::LayerTreeHostCommonTest() 229 LayerTreeHostCommonTest::LayerTreeHostCommonTest()
239 : LayerTreeHostCommonTestBase(LayerTreeSettingsForCommonTest()) {} 230 : LayerTreeHostCommonTestBase(LayerTreeSettings()) {}
240 231
241 LayerTreeHostCommonTest::LayerTreeHostCommonTest( 232 LayerTreeHostCommonTest::LayerTreeHostCommonTest(
242 const LayerTreeSettings& settings) 233 const LayerTreeSettings& settings)
243 : LayerTreeHostCommonTestBase(settings) { 234 : LayerTreeHostCommonTestBase(settings) {
244 } 235 }
245 236
246 } // namespace cc 237 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/layer_tree_host_common_test.h ('k') | cc/test/layer_tree_json_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698