OLD | NEW |
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 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 LayerSettings layer_settings_; | 152 LayerSettings layer_settings_; |
153 | 153 |
154 int render_surface_layer_list_count_; | 154 int render_surface_layer_list_count_; |
155 }; | 155 }; |
156 | 156 |
157 class LayerTreeHostCommonTest : public LayerTreeHostCommonTestBase, | 157 class LayerTreeHostCommonTest : public LayerTreeHostCommonTestBase, |
158 public testing::Test { | 158 public testing::Test { |
159 public: | 159 public: |
160 LayerTreeHostCommonTest(); | 160 LayerTreeHostCommonTest(); |
161 explicit LayerTreeHostCommonTest(const LayerTreeSettings& settings); | 161 explicit LayerTreeHostCommonTest(const LayerTreeSettings& settings); |
| 162 |
| 163 protected: |
| 164 static void SetScrollOffsetDelta(LayerImpl* layer_impl, |
| 165 const gfx::Vector2dF& delta) { |
| 166 layer_impl->SetCurrentScrollOffset( |
| 167 layer_impl->synced_scroll_offset()->ActiveBase() + |
| 168 gfx::ScrollOffset(delta)); |
| 169 } |
162 }; | 170 }; |
163 | 171 |
164 } // namespace cc | 172 } // namespace cc |
165 | 173 |
166 #endif // CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ | 174 #endif // CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ |
OLD | NEW |