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

Side by Side Diff: chrome/browser/chromeos/login/chrome_restart_request.cc

Issue 196473007: Add --disable-low-res-tiling. Disable low res tiling to save power. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments from enne and piman Created 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/chromeos/login/chrome_restart_request.h" 5 #include "chrome/browser/chromeos/login/chrome_restart_request.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // - Forward a given switches list to new command; 59 // - Forward a given switches list to new command;
60 // - Set start url if given; 60 // - Set start url if given;
61 // - Append/override switches using |new_switches|; 61 // - Append/override switches using |new_switches|;
62 std::string DeriveCommandLine(const GURL& start_url, 62 std::string DeriveCommandLine(const GURL& start_url,
63 const CommandLine& base_command_line, 63 const CommandLine& base_command_line,
64 const base::DictionaryValue& new_switches, 64 const base::DictionaryValue& new_switches,
65 CommandLine* command_line) { 65 CommandLine* command_line) {
66 DCHECK_NE(&base_command_line, command_line); 66 DCHECK_NE(&base_command_line, command_line);
67 67
68 static const char* kForwardSwitches[] = { 68 static const char* kForwardSwitches[] = {
69 ::switches::kDisableAccelerated2dCanvas, 69 ::switches::kDisableAccelerated2dCanvas,
70 ::switches::kDisableAcceleratedOverflowScroll, 70 ::switches::kDisableAcceleratedOverflowScroll,
71 ::switches::kDisableAcceleratedVideoDecode, 71 ::switches::kDisableAcceleratedVideoDecode,
72 ::switches::kDisableBrowserPluginCompositing, 72 ::switches::kDisableBrowserPluginCompositing,
73 ::switches::kDisableDelegatedRenderer, 73 ::switches::kDisableDelegatedRenderer,
74 ::switches::kDisableFiltersOverIPC, 74 ::switches::kDisableFiltersOverIPC,
75 ::switches::kDisableForceCompositingMode, 75 ::switches::kDisableForceCompositingMode,
76 ::switches::kDisableGpuShaderDiskCache, 76 ::switches::kDisableGpuShaderDiskCache,
77 ::switches::kDisableGpuWatchdog, 77 ::switches::kDisableGpuWatchdog,
78 ::switches::kDisableGpuCompositing, 78 ::switches::kDisableGpuCompositing,
79 ::switches::kDisableGpuRasterization, 79 ::switches::kDisableGpuRasterization,
80 ::switches::kDisableImplSidePainting, 80 ::switches::kDisableImplSidePainting,
81 ::switches::kDisableMapImage, 81 ::switches::kDisableLowResTiling,
82 ::switches::kDisablePrefixedEncryptedMedia, 82 ::switches::kDisableMapImage,
83 ::switches::kDisablePanelFitting, 83 ::switches::kDisablePrefixedEncryptedMedia,
84 ::switches::kDisableRepaintAfterLayout, 84 ::switches::kDisablePanelFitting,
85 ::switches::kDisableSeccompFilterSandbox, 85 ::switches::kDisableRepaintAfterLayout,
86 ::switches::kDisableSetuidSandbox, 86 ::switches::kDisableSeccompFilterSandbox,
87 ::switches::kDisableThreadedCompositing, 87 ::switches::kDisableSetuidSandbox,
88 ::switches::kDisableTouchDragDrop, 88 ::switches::kDisableThreadedCompositing,
89 ::switches::kDisableTouchEditing, 89 ::switches::kDisableTouchDragDrop,
90 ::switches::kDisableUniversalAcceleratedOverflowScroll, 90 ::switches::kDisableTouchEditing,
91 ::switches::kDisableUnprefixedMediaSource, 91 ::switches::kDisableUniversalAcceleratedOverflowScroll,
92 ::switches::kDisableWebKitMediaSource, 92 ::switches::kDisableUnprefixedMediaSource,
93 ::switches::kDisableAcceleratedFixedRootBackground, 93 ::switches::kDisableWebKitMediaSource,
94 ::switches::kEnableAcceleratedFixedRootBackground, 94 ::switches::kDisableAcceleratedFixedRootBackground,
95 ::switches::kEnableAcceleratedOverflowScroll, 95 ::switches::kEnableAcceleratedFixedRootBackground,
96 ::switches::kEnableBeginFrameScheduling, 96 ::switches::kEnableAcceleratedOverflowScroll,
97 ::switches::kEnableCompositingForFixedPosition, 97 ::switches::kEnableBeginFrameScheduling,
98 ::switches::kEnableDelegatedRenderer, 98 ::switches::kEnableCompositingForFixedPosition,
99 ::switches::kEnableEncryptedMedia, 99 ::switches::kEnableDelegatedRenderer,
100 ::switches::kEnableGestureTapHighlight, 100 ::switches::kEnableEncryptedMedia,
101 ::switches::kDisableGestureTapHighlight, 101 ::switches::kEnableGestureTapHighlight,
102 ::switches::kDisableGpuSandbox, 102 ::switches::kDisableGestureTapHighlight,
103 ::switches::kEnableDeferredFilters, 103 ::switches::kDisableGpuSandbox,
104 ::switches::kEnableGpuRasterization, 104 ::switches::kEnableDeferredFilters,
105 ::switches::kEnableImplSidePainting, 105 ::switches::kEnableGpuRasterization,
106 ::switches::kEnableLogging, 106 ::switches::kEnableImplSidePainting,
107 ::switches::kEnableMapImage, 107 ::switches::kEnableLogging,
108 ::switches::kEnablePinch, 108 ::switches::kEnableLowResTiling,
109 ::switches::kEnableRepaintAfterLayout, 109 ::switches::kEnableMapImage,
110 ::switches::kEnableThreadedCompositing, 110 ::switches::kEnablePinch,
111 ::switches::kEnableTouchDragDrop, 111 ::switches::kEnableRepaintAfterLayout,
112 ::switches::kEnableTouchEditing, 112 ::switches::kEnableThreadedCompositing,
113 ::switches::kEnableUniversalAcceleratedOverflowScroll, 113 ::switches::kEnableTouchDragDrop,
114 ::switches::kEnableViewport, 114 ::switches::kEnableTouchEditing,
115 ::switches::kEnableViewportMeta, 115 ::switches::kEnableUniversalAcceleratedOverflowScroll,
116 ::switches::kMainFrameResizesAreOrientationChanges, 116 ::switches::kEnableViewport,
117 ::switches::kForceDeviceScaleFactor, 117 ::switches::kEnableViewportMeta,
118 ::switches::kForceGpuRasterization, 118 ::switches::kMainFrameResizesAreOrientationChanges,
119 ::switches::kGpuStartupDialog, 119 ::switches::kForceDeviceScaleFactor,
120 ::switches::kGpuSandboxAllowSysVShm, 120 ::switches::kForceGpuRasterization,
121 ::switches::kGpuSandboxFailuresFatal, 121 ::switches::kGpuStartupDialog,
122 ::switches::kMultiProfiles, 122 ::switches::kGpuSandboxAllowSysVShm,
123 ::switches::kNoSandbox, 123 ::switches::kGpuSandboxFailuresFatal,
124 ::switches::kNumRasterThreads, 124 ::switches::kMultiProfiles,
125 ::switches::kPpapiFlashArgs, 125 ::switches::kNoSandbox,
126 ::switches::kPpapiFlashPath, 126 ::switches::kNumRasterThreads,
127 ::switches::kPpapiFlashVersion, 127 ::switches::kPpapiFlashArgs,
128 ::switches::kPpapiInProcess, 128 ::switches::kPpapiFlashPath,
129 ::switches::kRendererStartupDialog, 129 ::switches::kPpapiFlashVersion,
130 ::switches::kEnableShareGroupAsyncTextureUpload, 130 ::switches::kPpapiInProcess,
131 ::switches::kTabCaptureUpscaleQuality, 131 ::switches::kRendererStartupDialog,
132 ::switches::kTabCaptureDownscaleQuality, 132 ::switches::kEnableShareGroupAsyncTextureUpload,
133 ::switches::kTabCaptureUpscaleQuality,
134 ::switches::kTabCaptureDownscaleQuality,
133 #if defined(USE_XI2_MT) 135 #if defined(USE_XI2_MT)
134 ::switches::kTouchCalibration, 136 ::switches::kTouchCalibration,
135 #endif 137 #endif
136 ::switches::kTouchDevices, 138 ::switches::kTouchDevices,
137 ::switches::kTouchEvents, 139 ::switches::kTouchEvents,
138 ::switches::kTouchOptimizedUI, 140 ::switches::kTouchOptimizedUI,
139 ::switches::kUIDisableThreadedCompositing, 141 ::switches::kUIDisableThreadedCompositing,
140 ::switches::kUIPrioritizeInGpuProcess, 142 ::switches::kUIPrioritizeInGpuProcess,
141 #if defined(USE_CRAS) 143 #if defined(USE_CRAS)
142 ::switches::kUseCras, 144 ::switches::kUseCras,
143 #endif 145 #endif
144 ::switches::kUseDiscardableMemory, 146 ::switches::kUseDiscardableMemory,
145 ::switches::kUseGL, 147 ::switches::kUseGL,
146 ::switches::kUserDataDir, 148 ::switches::kUserDataDir,
147 ::switches::kV, 149 ::switches::kV,
148 ::switches::kVModule, 150 ::switches::kVModule,
149 ::switches::kWebGLCommandBufferSizeKb, 151 ::switches::kWebGLCommandBufferSizeKb,
150 ::switches::kEnableWebGLDraftExtensions, 152 ::switches::kEnableWebGLDraftExtensions,
151 #if defined(ENABLE_WEBRTC) 153 #if defined(ENABLE_WEBRTC)
152 ::switches::kDisableWebRtcHWDecoding, 154 ::switches::kDisableWebRtcHWDecoding,
153 ::switches::kDisableWebRtcHWEncoding, 155 ::switches::kDisableWebRtcHWEncoding,
154 ::switches::kEnableAudioTrackProcessing, 156 ::switches::kEnableAudioTrackProcessing,
155 ::switches::kEnableWebRtcHWVp8Encoding, 157 ::switches::kEnableWebRtcHWVp8Encoding,
156 #endif 158 #endif
157 ash::switches::kAshDefaultWallpaperLarge, 159 ash::switches::kAshDefaultWallpaperLarge,
158 ash::switches::kAshDefaultWallpaperSmall, 160 ash::switches::kAshDefaultWallpaperSmall,
159 ash::switches::kAshGuestWallpaperLarge, 161 ash::switches::kAshGuestWallpaperLarge,
160 ash::switches::kAshGuestWallpaperSmall, 162 ash::switches::kAshGuestWallpaperSmall,
161 ash::switches::kAshHostWindowBounds, 163 ash::switches::kAshHostWindowBounds,
162 ash::switches::kAshTouchHud, 164 ash::switches::kAshTouchHud,
163 ash::switches::kAuraLegacyPowerButton, 165 ash::switches::kAuraLegacyPowerButton,
164 // Please keep these in alphabetical order. Non-UI Compositor switches 166 // Please keep these in alphabetical order. Non-UI Compositor switches
165 // here should also be added to 167 // here should also be added to
166 // content/browser/renderer_host/render_process_host_impl.cc. 168 // content/browser/renderer_host/render_process_host_impl.cc.
167 cc::switches::kCompositeToMailbox, 169 cc::switches::kCompositeToMailbox,
168 cc::switches::kDisableCompositedAntialiasing, 170 cc::switches::kDisableCompositedAntialiasing,
169 cc::switches::kDisableCompositorTouchHitTesting, 171 cc::switches::kDisableCompositorTouchHitTesting,
170 cc::switches::kDisableThreadedAnimation, 172 cc::switches::kDisableThreadedAnimation,
171 cc::switches::kEnableGpuBenchmarking, 173 cc::switches::kEnableGpuBenchmarking,
172 cc::switches::kEnablePinchVirtualViewport, 174 cc::switches::kEnablePinchVirtualViewport,
173 cc::switches::kEnableTopControlsPositionCalculation, 175 cc::switches::kEnableTopControlsPositionCalculation,
174 cc::switches::kMaxTilesForInterestArea, 176 cc::switches::kMaxTilesForInterestArea,
175 cc::switches::kMaxUnusedResourceMemoryUsagePercentage, 177 cc::switches::kMaxUnusedResourceMemoryUsagePercentage,
176 cc::switches::kShowCompositedLayerBorders, 178 cc::switches::kShowCompositedLayerBorders,
177 cc::switches::kShowFPSCounter, 179 cc::switches::kShowFPSCounter,
178 cc::switches::kShowLayerAnimationBounds, 180 cc::switches::kShowLayerAnimationBounds,
179 cc::switches::kShowNonOccludingRects, 181 cc::switches::kShowNonOccludingRects,
180 cc::switches::kShowOccludingRects, 182 cc::switches::kShowOccludingRects,
181 cc::switches::kShowPropertyChangedRects, 183 cc::switches::kShowPropertyChangedRects,
182 cc::switches::kShowReplicaScreenSpaceRects, 184 cc::switches::kShowReplicaScreenSpaceRects,
183 cc::switches::kShowScreenSpaceRects, 185 cc::switches::kShowScreenSpaceRects,
184 cc::switches::kShowSurfaceDamageRects, 186 cc::switches::kShowSurfaceDamageRects,
185 cc::switches::kSlowDownRasterScaleFactor, 187 cc::switches::kSlowDownRasterScaleFactor,
186 cc::switches::kTraceOverdraw, 188 cc::switches::kTraceOverdraw,
187 cc::switches::kUIDisablePartialSwap, 189 cc::switches::kUIDisablePartialSwap,
188 chromeos::switches::kDbusStub, 190 chromeos::switches::kDbusStub,
189 chromeos::switches::kDisableLoginAnimations, 191 chromeos::switches::kDisableLoginAnimations,
190 chromeos::switches::kDisableOobeAnimation, 192 chromeos::switches::kDisableOobeAnimation,
191 chromeos::switches::kHasChromeOSDiamondKey, 193 chromeos::switches::kHasChromeOSDiamondKey,
192 chromeos::switches::kHasChromeOSKeyboard, 194 chromeos::switches::kHasChromeOSKeyboard,
193 chromeos::switches::kLoginProfile, 195 chromeos::switches::kLoginProfile,
194 chromeos::switches::kNaturalScrollDefault, 196 chromeos::switches::kNaturalScrollDefault,
195 ::switches::kEnableBrowserTextSubpixelPositioning, 197 ::switches::kEnableBrowserTextSubpixelPositioning,
196 ::switches::kEnableWebkitTextSubpixelPositioning, 198 ::switches::kEnableWebkitTextSubpixelPositioning,
197 policy::switches::kDeviceManagementUrl, 199 policy::switches::kDeviceManagementUrl,
198 views::corewm::switches::kWindowAnimationsDisabled, 200 views::corewm::switches::kWindowAnimationsDisabled,
199 }; 201 };
200 command_line->CopySwitchesFrom(base_command_line, 202 command_line->CopySwitchesFrom(base_command_line,
201 kForwardSwitches, 203 kForwardSwitches,
202 arraysize(kForwardSwitches)); 204 arraysize(kForwardSwitches));
203 205
204 if (start_url.is_valid()) 206 if (start_url.is_valid())
205 command_line->AppendArg(start_url.spec()); 207 command_line->AppendArg(start_url.spec());
206 208
207 for (base::DictionaryValue::Iterator it(new_switches); 209 for (base::DictionaryValue::Iterator it(new_switches);
208 !it.IsAtEnd(); 210 !it.IsAtEnd();
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 // Relaunch chrome without session manager on dev box. 352 // Relaunch chrome without session manager on dev box.
351 ReLaunch(command_line); 353 ReLaunch(command_line);
352 return; 354 return;
353 } 355 }
354 356
355 // ChromeRestartRequest deletes itself after request sent to session manager. 357 // ChromeRestartRequest deletes itself after request sent to session manager.
356 (new ChromeRestartRequest(command_line))->Start(); 358 (new ChromeRestartRequest(command_line))->Start();
357 } 359 }
358 360
359 } // namespace chromeos 361 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698