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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { | 47 virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { |
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()->SetNeedsAnimate(); |
| 59 layer_tree_host()->SetNextCommitForcesRedraw(); |
| 60 } |
59 } | 61 } |
60 | 62 |
61 virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { | 63 virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { |
62 if (measure_commit_cost_) | 64 if (measure_commit_cost_) |
63 commit_timer_.Start(); | 65 commit_timer_.Start(); |
64 } | 66 } |
65 | 67 |
66 virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { | 68 virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { |
67 if (measure_commit_cost_ && draw_timer_.IsWarmedUp()) { | 69 if (measure_commit_cost_ && draw_timer_.IsWarmedUp()) { |
68 commit_timer_.NextLap(); | 70 commit_timer_.NextLap(); |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 TEST_F(LayerTreeHostPerfTestJsonReader, HeavyPageThreadedImplSide) { | 325 TEST_F(LayerTreeHostPerfTestJsonReader, HeavyPageThreadedImplSide) { |
324 animation_driven_drawing_ = true; | 326 animation_driven_drawing_ = true; |
325 measure_commit_cost_ = true; | 327 measure_commit_cost_ = true; |
326 SetTestName("heavy_page"); | 328 SetTestName("heavy_page"); |
327 ReadTestFile("heavy_layer_tree"); | 329 ReadTestFile("heavy_layer_tree"); |
328 RunTestWithImplSidePainting(); | 330 RunTestWithImplSidePainting(); |
329 } | 331 } |
330 | 332 |
331 } // namespace | 333 } // namespace |
332 } // namespace cc | 334 } // namespace cc |
OLD | NEW |