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

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

Issue 1766053002: Clean LayerImpl's scroll offset callers in unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 }; 236 };
237 237
238 LayerTreeHostCommonTest::LayerTreeHostCommonTest() 238 LayerTreeHostCommonTest::LayerTreeHostCommonTest()
239 : LayerTreeHostCommonTestBase(LayerTreeSettingsForCommonTest()) {} 239 : LayerTreeHostCommonTestBase(LayerTreeSettingsForCommonTest()) {}
240 240
241 LayerTreeHostCommonTest::LayerTreeHostCommonTest( 241 LayerTreeHostCommonTest::LayerTreeHostCommonTest(
242 const LayerTreeSettings& settings) 242 const LayerTreeSettings& settings)
243 : LayerTreeHostCommonTestBase(settings) { 243 : LayerTreeHostCommonTestBase(settings) {
244 } 244 }
245 245
246 void LayerTreeHostCommonTest::SetScrollOffsetDelta(
247 LayerImpl* layer_impl,
248 const gfx::Vector2dF& delta) {
249 layer_impl->SetCurrentScrollOffset(
250 layer_impl->synced_scroll_offset()->ActiveBase() +
251 gfx::ScrollOffset(delta));
252 }
253
246 } // namespace cc 254 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698