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

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

Issue 2323123002: Make disable vsync run the renderer independently (Closed)
Patch Set: Rebase Created 4 years, 3 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/test/fake_external_begin_frame_source.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 <stdint.h> 7 #include <stdint.h>
8 8
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 28 matching lines...) Expand all
39 : draw_timer_(kWarmupRuns, 39 : draw_timer_(kWarmupRuns,
40 base::TimeDelta::FromMilliseconds(kTimeLimitMillis), 40 base::TimeDelta::FromMilliseconds(kTimeLimitMillis),
41 kTimeCheckInterval), 41 kTimeCheckInterval),
42 commit_timer_(0, base::TimeDelta(), 1), 42 commit_timer_(0, base::TimeDelta(), 1),
43 full_damage_each_frame_(false), 43 full_damage_each_frame_(false),
44 begin_frame_driven_drawing_(false), 44 begin_frame_driven_drawing_(false),
45 measure_commit_cost_(false) { 45 measure_commit_cost_(false) {
46 } 46 }
47 47
48 void InitializeSettings(LayerTreeSettings* settings) override { 48 void InitializeSettings(LayerTreeSettings* settings) override {
49 settings->wait_for_beginframe_interval = false; 49 // LayerTreeTests give the Display's BeginFrameSource directly to the
50 // LayerTreeHost like we do in the Browser process via
51 // TestDelegatingOutputSurface, so setting disable_display_vsync here
52 // unthrottles both the DisplayScheduler and the Scheduler.
50 settings->renderer_settings.disable_display_vsync = true; 53 settings->renderer_settings.disable_display_vsync = true;
51 } 54 }
52 55
53 void BeginTest() override { 56 void BeginTest() override {
54 BuildTree(); 57 BuildTree();
55 PostSetNeedsCommitToMainThread(); 58 PostSetNeedsCommitToMainThread();
56 } 59 }
57 60
58 void BeginMainFrame(const BeginFrameArgs& args) override { 61 void BeginMainFrame(const BeginFrameArgs& args) override {
59 if (begin_frame_driven_drawing_ && !TestEnded()) { 62 if (begin_frame_driven_drawing_ && !TestEnded()) {
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 TEST_F(LayerTreeHostPerfTestJsonReader, HeavyPageThreaded) { 348 TEST_F(LayerTreeHostPerfTestJsonReader, HeavyPageThreaded) {
346 begin_frame_driven_drawing_ = true; 349 begin_frame_driven_drawing_ = true;
347 measure_commit_cost_ = true; 350 measure_commit_cost_ = true;
348 SetTestName("heavy_page"); 351 SetTestName("heavy_page");
349 ReadTestFile("heavy_layer_tree"); 352 ReadTestFile("heavy_layer_tree");
350 RunTest(CompositorMode::THREADED); 353 RunTest(CompositorMode::THREADED);
351 } 354 }
352 355
353 } // namespace 356 } // namespace
354 } // namespace cc 357 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_external_begin_frame_source.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698