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

Side by Side Diff: cc/base/switches.cc

Issue 23796002: cc: Implement deadine scheduling disabled by default (Closed) Base URL: http://git.chromium.org/chromium/src.git@schedReadback4
Patch Set: Enable by default on Aura Created 7 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/base/switches.h ('k') | cc/output/begin_frame_args.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/base/switches.h" 5 #include "cc/base/switches.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 8
9 namespace cc { 9 namespace cc {
10 namespace switches { 10 namespace switches {
(...skipping 15 matching lines...) Expand all
26 // Paint content on the main thread instead of the compositor thread. 26 // Paint content on the main thread instead of the compositor thread.
27 // Overrides the kEnableImplSidePainting flag. 27 // Overrides the kEnableImplSidePainting flag.
28 const char kDisableImplSidePainting[] = "disable-impl-side-painting"; 28 const char kDisableImplSidePainting[] = "disable-impl-side-painting";
29 29
30 // Enables LCD text. 30 // Enables LCD text.
31 const char kEnableLCDText[] = "enable-lcd-text"; 31 const char kEnableLCDText[] = "enable-lcd-text";
32 32
33 // Paint content on the compositor thread instead of the main thread. 33 // Paint content on the compositor thread instead of the main thread.
34 const char kEnableImplSidePainting[] = "enable-impl-side-painting"; 34 const char kEnableImplSidePainting[] = "enable-impl-side-painting";
35 35
36 // Disables the deadline scheduler.
37 // Overrides the kEnableDeadlineScheduling flag.
38 const char kDisableDeadlineScheduling[] = "disable-deadline-scheduling";
39
40 // Deadline scheduling gives children compositors and the main thread an
41 // interval over which they can produce content instead of always consuming
42 // their input on the next BeginFrame. This allows a total pipeline latency
43 // of less than 1 vsync if their intervals are properly nested.
44 const char kEnableDeadlineScheduling[] = "enable-deadline-scheduling";
45
36 const char kEnableTopControlsPositionCalculation[] = 46 const char kEnableTopControlsPositionCalculation[] =
37 "enable-top-controls-position-calculation"; 47 "enable-top-controls-position-calculation";
38 48
39 // For any layers that can get drawn directly to screen, draw them with the Skia 49 // For any layers that can get drawn directly to screen, draw them with the Skia
40 // GPU backend. Only valid with gl rendering + threaded compositing + impl-side 50 // GPU backend. Only valid with gl rendering + threaded compositing + impl-side
41 // painting. 51 // painting.
42 const char kForceDirectLayerDrawing[] = "force-direct-layer-drawing"; 52 const char kForceDirectLayerDrawing[] = "force-direct-layer-drawing";
43 53
44 // The height of the movable top controls. 54 // The height of the movable top controls.
45 const char kTopControlsHeight[] = "top-controls-height"; 55 const char kTopControlsHeight[] = "top-controls-height";
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 184 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
175 185
176 if (command_line.HasSwitch(cc::switches::kDisableMapImage)) 186 if (command_line.HasSwitch(cc::switches::kDisableMapImage))
177 return false; 187 return false;
178 else if (command_line.HasSwitch(cc::switches::kEnableMapImage)) 188 else if (command_line.HasSwitch(cc::switches::kEnableMapImage))
179 return true; 189 return true;
180 190
181 return false; 191 return false;
182 } 192 }
183 193
194 bool IsDeadlineSchedulingEnabled() {
195 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
196
197 if (command_line.HasSwitch(cc::switches::kDisableDeadlineScheduling))
198 return false;
199 else if (command_line.HasSwitch(cc::switches::kEnableDeadlineScheduling))
200 return true;
201
202 #if defined(OS_ANDROID) || defined (USE_AURA)
brianderson 2013/09/17 01:35:53 piman: Is it ok to enable by default on Aura using
203 return true;
204 #else
205 return false;
206 #endif
207 }
208
184 } // namespace switches 209 } // namespace switches
185 } // namespace cc 210 } // namespace cc
OLDNEW
« no previous file with comments | « cc/base/switches.h ('k') | cc/output/begin_frame_args.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698