OLD | NEW |
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/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 : LayerTreeHostPerfTestJsonReader() { | 221 : LayerTreeHostPerfTestJsonReader() { |
222 } | 222 } |
223 | 223 |
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()) |
| 232 return; |
231 static const gfx::Vector2d delta = gfx::Vector2d(0, 10); | 233 static const gfx::Vector2d delta = gfx::Vector2d(0, 10); |
232 scrollable_->SetScrollOffset(scrollable_->scroll_offset() + delta); | 234 scrollable_->SetScrollOffset(scrollable_->scroll_offset() + delta); |
233 } | 235 } |
234 | 236 |
235 private: | 237 private: |
236 scoped_refptr<Layer> scrollable_; | 238 scoped_refptr<Layer> scrollable_; |
237 }; | 239 }; |
238 | 240 |
239 TEST_F(ScrollingLayerTreePerfTest, LongScrollablePageSingleThread) { | 241 TEST_F(ScrollingLayerTreePerfTest, LongScrollablePageSingleThread) { |
240 SetTestName("long_scrollable_page"); | 242 SetTestName("long_scrollable_page"); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 TEST_F(LayerTreeHostPerfTestJsonReader, HeavyPageThreadedImplSide) { | 328 TEST_F(LayerTreeHostPerfTestJsonReader, HeavyPageThreadedImplSide) { |
327 animation_driven_drawing_ = true; | 329 animation_driven_drawing_ = true; |
328 measure_commit_cost_ = true; | 330 measure_commit_cost_ = true; |
329 SetTestName("heavy_page"); | 331 SetTestName("heavy_page"); |
330 ReadTestFile("heavy_layer_tree"); | 332 ReadTestFile("heavy_layer_tree"); |
331 RunTestWithImplSidePainting(); | 333 RunTestWithImplSidePainting(); |
332 } | 334 } |
333 | 335 |
334 } // namespace | 336 } // namespace |
335 } // namespace cc | 337 } // namespace cc |
OLD | NEW |