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

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: 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 | 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/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 *exit_code = 1; 112 *exit_code = 1;
113 return true; 113 return true;
114 } 114 }
115 } 115 }
116 if (command_line.HasSwitch(switches::kDumpRenderTree)) { 116 if (command_line.HasSwitch(switches::kDumpRenderTree)) {
117 EnableBrowserLayoutTestMode(); 117 EnableBrowserLayoutTestMode();
118 118
119 command_line.AppendSwitch(switches::kProcessPerTab); 119 command_line.AppendSwitch(switches::kProcessPerTab);
120 command_line.AppendSwitch(switches::kEnableLogging); 120 command_line.AppendSwitch(switches::kEnableLogging);
121 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles); 121 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles);
122 #if !defined(OS_ANDROID)
123 // OSMesa is not yet available for Android. http://crbug.com/248925
124 command_line.AppendSwitchASCII( 122 command_line.AppendSwitchASCII(
125 switches::kUseGL, gfx::kGLImplementationOSMesaName); 123 switches::kUseGL, gfx::kGLImplementationOSMesaName);
126 #endif
127 command_line.AppendSwitch(switches::kSkipGpuDataLoading); 124 command_line.AppendSwitch(switches::kSkipGpuDataLoading);
128 command_line.AppendSwitchASCII(switches::kTouchEvents, 125 command_line.AppendSwitchASCII(switches::kTouchEvents,
129 switches::kTouchEventsEnabled); 126 switches::kTouchEventsEnabled);
130 command_line.AppendSwitch(switches::kEnableGestureTapHighlight); 127 command_line.AppendSwitch(switches::kEnableGestureTapHighlight);
131 command_line.AppendSwitchASCII(switches::kForceDeviceScaleFactor, "1.0"); 128 command_line.AppendSwitchASCII(switches::kForceDeviceScaleFactor, "1.0");
132 #if defined(OS_ANDROID) 129 #if defined(OS_ANDROID)
133 command_line.AppendSwitch( 130 command_line.AppendSwitch(
134 switches::kDisableGestureRequirementForMediaPlayback); 131 switches::kDisableGestureRequirementForMediaPlayback);
135 // Capturing pixel results does not yet work when implementation-side
136 // painting is enabled. See http://crbug.com/250777
137 command_line.AppendSwitch(cc::switches::kDisableImplSidePainting);
138 #endif 132 #endif
139 133
140 if (!command_line.HasSwitch(switches::kStableReleaseMode)) { 134 if (!command_line.HasSwitch(switches::kStableReleaseMode)) {
141 command_line.AppendSwitch( 135 command_line.AppendSwitch(
142 switches::kEnableExperimentalWebPlatformFeatures); 136 switches::kEnableExperimentalWebPlatformFeatures);
143 command_line.AppendSwitch(switches::kEnableCssShaders); 137 command_line.AppendSwitch(switches::kEnableCssShaders);
144 } 138 }
145 139
146 if (!command_line.HasSwitch(switches::kEnableThreadedCompositing)) 140 if (!command_line.HasSwitch(switches::kEnableThreadedCompositing))
147 command_line.AppendSwitch(cc::switches::kDisableThreadedAnimation); 141 command_line.AppendSwitch(cc::switches::kDisableThreadedAnimation);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 browser_client_.reset(new ShellContentBrowserClient); 219 browser_client_.reset(new ShellContentBrowserClient);
226 return browser_client_.get(); 220 return browser_client_.get();
227 } 221 }
228 222
229 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { 223 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() {
230 renderer_client_.reset(new ShellContentRendererClient); 224 renderer_client_.reset(new ShellContentRendererClient);
231 return renderer_client_.get(); 225 return renderer_client_.get();
232 } 226 }
233 227
234 } // namespace content 228 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698