| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 settings->throttle_frame_production = false; | 48 settings->throttle_frame_production = false; |
| 49 } | 49 } |
| 50 | 50 |
| 51 virtual void BeginTest() OVERRIDE { | 51 virtual void BeginTest() OVERRIDE { |
| 52 BuildTree(); | 52 BuildTree(); |
| 53 PostSetNeedsCommitToMainThread(); | 53 PostSetNeedsCommitToMainThread(); |
| 54 } | 54 } |
| 55 | 55 |
| 56 virtual void Animate(base::TimeTicks monotonic_time) OVERRIDE { | 56 virtual void Animate(base::TimeTicks monotonic_time) OVERRIDE { |
| 57 if (animation_driven_drawing_ && !TestEnded()) | 57 if (animation_driven_drawing_ && !TestEnded()) |
| 58 layer_tree_host()->SetNeedsAnimate(); | 58 layer_tree_host()->SetNeedsUpdateLayers(); |
| 59 } | 59 } |
| 60 | 60 |
| 61 virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { | 61 virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { |
| 62 if (measure_commit_cost_) | 62 if (measure_commit_cost_) |
| 63 commit_timer_.Start(); | 63 commit_timer_.Start(); |
| 64 } | 64 } |
| 65 | 65 |
| 66 virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { | 66 virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { |
| 67 if (measure_commit_cost_ && draw_timer_.IsWarmedUp()) { | 67 if (measure_commit_cost_ && draw_timer_.IsWarmedUp()) { |
| 68 commit_timer_.NextLap(); | 68 commit_timer_.NextLap(); |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 | 388 |
| 389 TEST_F(PageScaleImplSidePaintingPerfTest, HeavyPage) { | 389 TEST_F(PageScaleImplSidePaintingPerfTest, HeavyPage) { |
| 390 measure_commit_cost_ = true; | 390 measure_commit_cost_ = true; |
| 391 SetTestName("heavy_page_page_scale"); | 391 SetTestName("heavy_page_page_scale"); |
| 392 ReadTestFile("heavy_layer_tree"); | 392 ReadTestFile("heavy_layer_tree"); |
| 393 RunTestWithImplSidePainting(); | 393 RunTestWithImplSidePainting(); |
| 394 } | 394 } |
| 395 | 395 |
| 396 } // namespace | 396 } // namespace |
| 397 } // namespace cc | 397 } // namespace cc |
| OLD | NEW |