| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <sstream> | 9 #include <sstream> |
| 10 | 10 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 if (TestEnded() || CleanUpStarted()) | 77 if (TestEnded() || CleanUpStarted()) |
| 78 return; | 78 return; |
| 79 draw_timer_.NextLap(); | 79 draw_timer_.NextLap(); |
| 80 if (draw_timer_.HasTimeLimitExpired()) { | 80 if (draw_timer_.HasTimeLimitExpired()) { |
| 81 CleanUpAndEndTest(); | 81 CleanUpAndEndTest(); |
| 82 return; | 82 return; |
| 83 } | 83 } |
| 84 if (!begin_frame_driven_drawing_) | 84 if (!begin_frame_driven_drawing_) |
| 85 host_impl->SetNeedsRedraw(); | 85 host_impl->SetNeedsRedraw(); |
| 86 if (full_damage_each_frame_) | 86 if (full_damage_each_frame_) |
| 87 host_impl->SetFullRootLayerDamage(); | 87 host_impl->SetFullViewportDamage(); |
| 88 } | 88 } |
| 89 | 89 |
| 90 virtual void CleanUpAndEndTest() { EndTest(); } | 90 virtual void CleanUpAndEndTest() { EndTest(); } |
| 91 | 91 |
| 92 virtual bool CleanUpStarted() { return false; } | 92 virtual bool CleanUpStarted() { return false; } |
| 93 | 93 |
| 94 virtual void BuildTree() {} | 94 virtual void BuildTree() {} |
| 95 | 95 |
| 96 void AfterTest() override { | 96 void AfterTest() override { |
| 97 CHECK(!test_name_.empty()) << "Must SetTestName() before AfterTest()."; | 97 CHECK(!test_name_.empty()) << "Must SetTestName() before AfterTest()."; |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 TEST_F(LayerTreeHostPerfTestJsonReader, HeavyPageThreaded) { | 344 TEST_F(LayerTreeHostPerfTestJsonReader, HeavyPageThreaded) { |
| 345 begin_frame_driven_drawing_ = true; | 345 begin_frame_driven_drawing_ = true; |
| 346 measure_commit_cost_ = true; | 346 measure_commit_cost_ = true; |
| 347 SetTestName("heavy_page"); | 347 SetTestName("heavy_page"); |
| 348 ReadTestFile("heavy_layer_tree"); | 348 ReadTestFile("heavy_layer_tree"); |
| 349 RunTest(CompositorMode::THREADED); | 349 RunTest(CompositorMode::THREADED); |
| 350 } | 350 } |
| 351 | 351 |
| 352 } // namespace | 352 } // namespace |
| 353 } // namespace cc | 353 } // namespace cc |
| OLD | NEW |