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

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

Issue 1177383005: cc: Add command line for frame production throttle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: hope to be final patch Created 5 years, 5 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/surfaces/onscreen_display_client.cc ('k') | cc/trees/layer_tree_host_unittest.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 <sstream> 7 #include <sstream>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 26 matching lines...) Expand all
37 : draw_timer_(kWarmupRuns, 37 : draw_timer_(kWarmupRuns,
38 base::TimeDelta::FromMilliseconds(kTimeLimitMillis), 38 base::TimeDelta::FromMilliseconds(kTimeLimitMillis),
39 kTimeCheckInterval), 39 kTimeCheckInterval),
40 commit_timer_(0, base::TimeDelta(), 1), 40 commit_timer_(0, base::TimeDelta(), 1),
41 full_damage_each_frame_(false), 41 full_damage_each_frame_(false),
42 begin_frame_driven_drawing_(false), 42 begin_frame_driven_drawing_(false),
43 measure_commit_cost_(false) { 43 measure_commit_cost_(false) {
44 } 44 }
45 45
46 void InitializeSettings(LayerTreeSettings* settings) override { 46 void InitializeSettings(LayerTreeSettings* settings) override {
47 settings->renderer_settings.disable_gpu_vsync = true; 47 settings->renderer_settings.disable_display_vsync = true;
48 } 48 }
49 49
50 void BeginTest() override { 50 void BeginTest() override {
51 BuildTree(); 51 BuildTree();
52 PostSetNeedsCommitToMainThread(); 52 PostSetNeedsCommitToMainThread();
53 } 53 }
54 54
55 void BeginMainFrame(const BeginFrameArgs& args) override { 55 void BeginMainFrame(const BeginFrameArgs& args) override {
56 if (begin_frame_driven_drawing_ && !TestEnded()) { 56 if (begin_frame_driven_drawing_ && !TestEnded()) {
57 layer_tree_host()->SetNeedsAnimate(); 57 layer_tree_host()->SetNeedsAnimate();
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 TEST_F(LayerTreeHostPerfTestJsonReader, HeavyPageThreaded) { 336 TEST_F(LayerTreeHostPerfTestJsonReader, HeavyPageThreaded) {
337 begin_frame_driven_drawing_ = true; 337 begin_frame_driven_drawing_ = true;
338 measure_commit_cost_ = true; 338 measure_commit_cost_ = true;
339 SetTestName("heavy_page"); 339 SetTestName("heavy_page");
340 ReadTestFile("heavy_layer_tree"); 340 ReadTestFile("heavy_layer_tree");
341 RunTest(true, false); 341 RunTest(true, false);
342 } 342 }
343 343
344 } // namespace 344 } // namespace
345 } // namespace cc 345 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/onscreen_display_client.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698