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

Side by Side Diff: content/shell/app/shell_main_delegate.cc

Issue 23868030: Make it possible to use OSMesa on Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 1 month 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 "content/shell/app/shell_main_delegate.h" 5 #include "content/shell/app/shell_main_delegate.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 // Disable <canvas> path antialiasing for consistency with Android Chrome. 133 // Disable <canvas> path antialiasing for consistency with Android Chrome.
134 command_line.AppendSwitch(switches::kDisable2dCanvasAntialiasing); 134 command_line.AppendSwitch(switches::kDisable2dCanvasAntialiasing);
135 #endif 135 #endif
136 136
137 if (command_line.HasSwitch(switches::kDumpRenderTree)) { 137 if (command_line.HasSwitch(switches::kDumpRenderTree)) {
138 EnableBrowserLayoutTestMode(); 138 EnableBrowserLayoutTestMode();
139 139
140 command_line.AppendSwitch(switches::kProcessPerTab); 140 command_line.AppendSwitch(switches::kProcessPerTab);
141 command_line.AppendSwitch(switches::kEnableLogging); 141 command_line.AppendSwitch(switches::kEnableLogging);
142 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles); 142 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles);
143 #if !defined(OS_ANDROID)
144 // OSMesa is not yet available for Android. http://crbug.com/248925
145 command_line.AppendSwitchASCII( 143 command_line.AppendSwitchASCII(
146 switches::kUseGL, gfx::kGLImplementationOSMesaName); 144 switches::kUseGL, gfx::kGLImplementationOSMesaName);
147 #endif
148 command_line.AppendSwitch(switches::kSkipGpuDataLoading); 145 command_line.AppendSwitch(switches::kSkipGpuDataLoading);
149 command_line.AppendSwitchASCII(switches::kTouchEvents, 146 command_line.AppendSwitchASCII(switches::kTouchEvents,
150 switches::kTouchEventsEnabled); 147 switches::kTouchEventsEnabled);
151 command_line.AppendSwitch(switches::kEnableGestureTapHighlight); 148 command_line.AppendSwitch(switches::kEnableGestureTapHighlight);
152 command_line.AppendSwitchASCII(switches::kForceDeviceScaleFactor, "1.0"); 149 command_line.AppendSwitchASCII(switches::kForceDeviceScaleFactor, "1.0");
153 #if defined(OS_ANDROID) 150 #if defined(OS_ANDROID)
154 command_line.AppendSwitch( 151 command_line.AppendSwitch(
155 switches::kDisableGestureRequirementForMediaPlayback); 152 switches::kDisableGestureRequirementForMediaPlayback);
156 // Capturing pixel results does not yet work when implementation-side
157 // painting is enabled. See http://crbug.com/250777
158 command_line.AppendSwitch(cc::switches::kDisableImplSidePainting);
159 #endif 153 #endif
160 154
161 if (!command_line.HasSwitch(switches::kStableReleaseMode)) { 155 if (!command_line.HasSwitch(switches::kStableReleaseMode)) {
162 command_line.AppendSwitch( 156 command_line.AppendSwitch(
163 switches::kEnableExperimentalWebPlatformFeatures); 157 switches::kEnableExperimentalWebPlatformFeatures);
164 } 158 }
165 159
166 if (!command_line.HasSwitch(switches::kEnableThreadedCompositing)) 160 if (!command_line.HasSwitch(switches::kEnableThreadedCompositing))
167 command_line.AppendSwitch(cc::switches::kDisableThreadedAnimation); 161 command_line.AppendSwitch(cc::switches::kDisableThreadedAnimation);
168 162
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 browser_client_.reset(new ShellContentBrowserClient); 275 browser_client_.reset(new ShellContentBrowserClient);
282 return browser_client_.get(); 276 return browser_client_.get();
283 } 277 }
284 278
285 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { 279 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() {
286 renderer_client_.reset(new ShellContentRendererClient); 280 renderer_client_.reset(new ShellContentRendererClient);
287 return renderer_client_.get(); 281 return renderer_client_.get();
288 } 282 }
289 283
290 } // namespace content 284 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698