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

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

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_test_common.cc ('k') | cc/test/layer_tree_host_common_test.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 #ifndef CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ 5 #ifndef CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_
6 #define CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ 6 #define CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "cc/layers/layer_lists.h" 12 #include "cc/layers/layer_lists.h"
13 #include "cc/layers/layer_settings.h"
14 #include "cc/test/fake_layer_tree_host_client.h" 13 #include "cc/test/fake_layer_tree_host_client.h"
15 #include "cc/test/layer_test_common.h" 14 #include "cc/test/layer_test_common.h"
16 #include "cc/test/test_task_graph_runner.h" 15 #include "cc/test/test_task_graph_runner.h"
17 #include "cc/trees/layer_tree_settings.h" 16 #include "cc/trees/layer_tree_settings.h"
18 #include "cc/trees/property_tree.h" 17 #include "cc/trees/property_tree.h"
19 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
20 19
21 namespace gfx { 20 namespace gfx {
22 class PointF; 21 class PointF;
23 class Point3F; 22 class Point3F;
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 [id](LayerImpl* layer) { return layer->id() == id; }) != 0; 135 [id](LayerImpl* layer) { return layer->id() == id; }) != 0;
137 } 136 }
138 137
139 const LayerList& update_layer_list() const { return update_layer_list_; } 138 const LayerList& update_layer_list() const { return update_layer_list_; }
140 bool UpdateLayerListContains(int id) const; 139 bool UpdateLayerListContains(int id) const;
141 140
142 int render_surface_layer_list_count() const { 141 int render_surface_layer_list_count() const {
143 return render_surface_layer_list_count_; 142 return render_surface_layer_list_count_;
144 } 143 }
145 144
146 const LayerSettings& layer_settings() { return layer_settings_; }
147
148 private: 145 private:
149 scoped_ptr<std::vector<LayerImpl*>> render_surface_layer_list_impl_; 146 scoped_ptr<std::vector<LayerImpl*>> render_surface_layer_list_impl_;
150 LayerList update_layer_list_; 147 LayerList update_layer_list_;
151 scoped_ptr<LayerImplList> update_layer_list_impl_; 148 scoped_ptr<LayerImplList> update_layer_list_impl_;
152 LayerSettings layer_settings_;
153 149
154 int render_surface_layer_list_count_; 150 int render_surface_layer_list_count_;
155 }; 151 };
156 152
157 class LayerTreeHostCommonTest : public LayerTreeHostCommonTestBase, 153 class LayerTreeHostCommonTest : public LayerTreeHostCommonTestBase,
158 public testing::Test { 154 public testing::Test {
159 public: 155 public:
160 LayerTreeHostCommonTest(); 156 LayerTreeHostCommonTest();
161 explicit LayerTreeHostCommonTest(const LayerTreeSettings& settings); 157 explicit LayerTreeHostCommonTest(const LayerTreeSettings& settings);
162 158
163 protected: 159 protected:
164 static void SetScrollOffsetDelta(LayerImpl* layer_impl, 160 static void SetScrollOffsetDelta(LayerImpl* layer_impl,
165 const gfx::Vector2dF& delta) { 161 const gfx::Vector2dF& delta) {
166 layer_impl->SetCurrentScrollOffset( 162 layer_impl->SetCurrentScrollOffset(
167 layer_impl->synced_scroll_offset()->ActiveBase() + 163 layer_impl->synced_scroll_offset()->ActiveBase() +
168 gfx::ScrollOffset(delta)); 164 gfx::ScrollOffset(delta));
169 } 165 }
170 }; 166 };
171 167
172 } // namespace cc 168 } // namespace cc
173 169
174 #endif // CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ 170 #endif // CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_
OLDNEW
« no previous file with comments | « cc/test/layer_test_common.cc ('k') | cc/test/layer_tree_host_common_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698