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

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
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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 { 229 class LayerTreeSettingsForCommonTest : public LayerTreeSettings {
232 public: 230 public:
233 LayerTreeSettingsForCommonTest() { 231 LayerTreeSettingsForCommonTest() {}
ajuma 2016/03/11 00:40:54 This class can be deleted too.
loyso (OOO) 2016/03/11 03:26:57 Done.
234 use_compositor_animation_timelines = true;
235 }
236 }; 232 };
237 233
238 LayerTreeHostCommonTest::LayerTreeHostCommonTest() 234 LayerTreeHostCommonTest::LayerTreeHostCommonTest()
239 : LayerTreeHostCommonTestBase(LayerTreeSettingsForCommonTest()) {} 235 : LayerTreeHostCommonTestBase(LayerTreeSettingsForCommonTest()) {}
240 236
241 LayerTreeHostCommonTest::LayerTreeHostCommonTest( 237 LayerTreeHostCommonTest::LayerTreeHostCommonTest(
242 const LayerTreeSettings& settings) 238 const LayerTreeSettings& settings)
243 : LayerTreeHostCommonTestBase(settings) { 239 : LayerTreeHostCommonTestBase(settings) {
244 } 240 }
245 241
246 } // namespace cc 242 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698