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

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

Issue 13817003: Damage root layer when viewport or top controls changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix LayerTreeHostDelegatedTestLayerUsesFrameDamage Created 7 years, 8 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.cc ('k') | cc/trees/layer_tree_host_unittest_delegated.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 "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/string_piece.h" 10 #include "base/string_piece.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 start_time_ = base::TimeTicks::HighResNow(); 42 start_time_ = base::TimeTicks::HighResNow();
43 43
44 if (!start_time_.is_null() && (num_draws_ % kTimeCheckInterval) == 0) { 44 if (!start_time_.is_null() && (num_draws_ % kTimeCheckInterval) == 0) {
45 base::TimeDelta elapsed = base::TimeTicks::HighResNow() - start_time_; 45 base::TimeDelta elapsed = base::TimeTicks::HighResNow() - start_time_;
46 if (elapsed >= base::TimeDelta::FromMilliseconds(kTimeLimitMillis)) { 46 if (elapsed >= base::TimeDelta::FromMilliseconds(kTimeLimitMillis)) {
47 elapsed_ = elapsed; 47 elapsed_ = elapsed;
48 EndTest(); 48 EndTest();
49 return; 49 return;
50 } 50 }
51 } 51 }
52 impl->setNeedsRedraw(); 52 impl->SetNeedsRedraw();
53 if (full_damage_each_frame_) 53 if (full_damage_each_frame_)
54 impl->SetFullRootLayerDamage(); 54 impl->SetFullRootLayerDamage();
55 } 55 }
56 56
57 virtual void BuildTree() {} 57 virtual void BuildTree() {}
58 58
59 virtual void AfterTest() OVERRIDE { 59 virtual void AfterTest() OVERRIDE {
60 // Format matches chrome/test/perf/perf_test.h:PrintResult 60 // Format matches chrome/test/perf/perf_test.h:PrintResult
61 printf("*RESULT %s: frames= %.2f runs/s\n", 61 printf("*RESULT %s: frames= %.2f runs/s\n",
62 test_name_.c_str(), 62 test_name_.c_str(),
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 scoped_refptr<Layer> scrollable_; 136 scoped_refptr<Layer> scrollable_;
137 }; 137 };
138 138
139 TEST_F(ScrollingLayerTreePerfTest, LongScrollablePage) { 139 TEST_F(ScrollingLayerTreePerfTest, LongScrollablePage) {
140 ReadTestFile("long_scrollable_page"); 140 ReadTestFile("long_scrollable_page");
141 RunTest(false); 141 RunTest(false);
142 } 142 }
143 143
144 } // namespace 144 } // namespace
145 } // namespace cc 145 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest_delegated.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698