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

Unified Diff: ui/gl/init/gl_factory.cc

Issue 2690113010: Abstract OSMesa from the Layout tests (Closed)
Patch Set: Renamed "Renderer" to "GL" Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gl/init/gl_factory.h ('k') | ui/gl/test/gl_surface_test_support.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/init/gl_factory.cc
diff --git a/ui/gl/init/gl_factory.cc b/ui/gl/init/gl_factory.cc
index 376ab44952cc30137ecf5865aef88e6921eef7f3..20da613e0a610284f99e71eca70f98735cf64f7c 100644
--- a/ui/gl/init/gl_factory.cc
+++ b/ui/gl/init/gl_factory.cc
@@ -29,14 +29,14 @@ bool InitializeGLOneOff() {
// The default implementation is always the first one in list.
GLImplementation impl = allowed_impls[0];
- bool fallback_to_osmesa = false;
- if (cmd->HasSwitch(switches::kOverrideUseGLWithOSMesaForTests)) {
- impl = kGLImplementationOSMesaGL;
+ bool fallback_to_software_gl = false;
+ if (cmd->HasSwitch(switches::kOverrideUseSoftwareGLForTests)) {
+ impl = GetSoftwareGLImplementation();
} else if (cmd->HasSwitch(switches::kUseGL)) {
std::string requested_implementation_name =
cmd->GetSwitchValueASCII(switches::kUseGL);
if (requested_implementation_name == "any") {
- fallback_to_osmesa = true;
+ fallback_to_software_gl = true;
} else if (requested_implementation_name ==
kGLImplementationSwiftShaderName) {
impl = kGLImplementationSwiftShaderGL;
@@ -57,18 +57,18 @@ bool InitializeGLOneOff() {
bool disable_gl_drawing = cmd->HasSwitch(switches::kDisableGLDrawingForTests);
return InitializeGLOneOffImplementation(
- impl, fallback_to_osmesa, gpu_service_logging, disable_gl_drawing);
+ impl, fallback_to_software_gl, gpu_service_logging, disable_gl_drawing);
}
bool InitializeGLOneOffImplementation(GLImplementation impl,
- bool fallback_to_osmesa,
+ bool fallback_to_software_gl,
bool gpu_service_logging,
bool disable_gl_drawing) {
bool initialized =
InitializeStaticGLBindings(impl) && InitializeGLOneOffPlatform();
- if (!initialized && fallback_to_osmesa) {
+ if (!initialized && fallback_to_software_gl) {
ShutdownGL();
- initialized = InitializeStaticGLBindings(kGLImplementationOSMesaGL) &&
+ initialized = InitializeStaticGLBindings(GetSoftwareGLImplementation()) &&
InitializeGLOneOffPlatform();
}
if (!initialized)
« no previous file with comments | « ui/gl/init/gl_factory.h ('k') | ui/gl/test/gl_surface_test_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698