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

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

Issue 11414308: Add vsync notification command line switch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 9 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 | Annotate | Revision Log
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 // The scale factor for low resolution tile contents. 95 // The scale factor for low resolution tile contents.
96 const char kLowResolutionContentsScaleFactor[] = 96 const char kLowResolutionContentsScaleFactor[] =
97 "low-resolution-contents-scale-factor"; 97 "low-resolution-contents-scale-factor";
98 98
99 // Causes the compositor to render to textures which are then sent to the parent 99 // Causes the compositor to render to textures which are then sent to the parent
100 // through the texture mailbox mechanism. 100 // through the texture mailbox mechanism.
101 // Requires --enable-compositor-frame-message. 101 // Requires --enable-compositor-frame-message.
102 const char kCompositeToMailbox[] = "composite-to-mailbox"; 102 const char kCompositeToMailbox[] = "composite-to-mailbox";
103 103
104 // Use a vsync signal from the browser to the renderer to schedule rendering.
105 const char kEnableVsyncNotification[] = "enable-vsync-notification";
106
104 bool IsImplSidePaintingEnabled() { 107 bool IsImplSidePaintingEnabled() {
105 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 108 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
106 109
107 if (command_line.HasSwitch(cc::switches::kDisableImplSidePainting)) 110 if (command_line.HasSwitch(cc::switches::kDisableImplSidePainting))
108 return false; 111 return false;
109 else if (command_line.HasSwitch(cc::switches::kEnableImplSidePainting)) 112 else if (command_line.HasSwitch(cc::switches::kEnableImplSidePainting))
110 return true; 113 return true;
111 114
112 #if defined(OS_ANDROID) 115 #if defined(OS_ANDROID)
113 return true; 116 return true;
114 #else 117 #else
115 return false; 118 return false;
116 #endif 119 #endif
117 } 120 }
118 121
119 } // namespace switches 122 } // namespace switches
120 } // namespace cc 123 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698