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

Side by Side Diff: cc/trees/layer_tree_host_perftest.cc

Issue 584503005: Make scroll offset type of float in cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: link crbug to TODO Created 6 years, 2 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/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_host_unittest.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 virtual void BuildTree() OVERRIDE { 224 virtual void BuildTree() OVERRIDE {
225 LayerTreeHostPerfTestJsonReader::BuildTree(); 225 LayerTreeHostPerfTestJsonReader::BuildTree();
226 scrollable_ = layer_tree_host()->root_layer()->children()[1]; 226 scrollable_ = layer_tree_host()->root_layer()->children()[1];
227 ASSERT_TRUE(scrollable_.get()); 227 ASSERT_TRUE(scrollable_.get());
228 } 228 }
229 229
230 virtual void Layout() OVERRIDE { 230 virtual void Layout() OVERRIDE {
231 if (TestEnded()) 231 if (TestEnded())
232 return; 232 return;
233 static const gfx::Vector2d delta = gfx::Vector2d(0, 10); 233 static const gfx::Vector2d delta = gfx::Vector2d(0, 10);
234 scrollable_->SetScrollOffset(scrollable_->scroll_offset() + delta); 234 scrollable_->SetScrollOffset(
235 gfx::ScrollOffsetWithDelta(scrollable_->scroll_offset(), delta));
235 } 236 }
236 237
237 private: 238 private:
238 scoped_refptr<Layer> scrollable_; 239 scoped_refptr<Layer> scrollable_;
239 }; 240 };
240 241
241 TEST_F(ScrollingLayerTreePerfTest, LongScrollablePageSingleThread) { 242 TEST_F(ScrollingLayerTreePerfTest, LongScrollablePageSingleThread) {
242 SetTestName("long_scrollable_page"); 243 SetTestName("long_scrollable_page");
243 ReadTestFile("long_scrollable_page"); 244 ReadTestFile("long_scrollable_page");
244 RunTest(false, false, false); 245 RunTest(false, false, false);
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 TEST_F(LayerTreeHostPerfTestJsonReader, HeavyPageThreadedImplSide) { 329 TEST_F(LayerTreeHostPerfTestJsonReader, HeavyPageThreadedImplSide) {
329 begin_frame_driven_drawing_ = true; 330 begin_frame_driven_drawing_ = true;
330 measure_commit_cost_ = true; 331 measure_commit_cost_ = true;
331 SetTestName("heavy_page"); 332 SetTestName("heavy_page");
332 ReadTestFile("heavy_layer_tree"); 333 ReadTestFile("heavy_layer_tree");
333 RunTestWithImplSidePainting(); 334 RunTestWithImplSidePainting();
334 } 335 }
335 336
336 } // namespace 337 } // namespace
337 } // namespace cc 338 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698