Chromium Code Reviews| Index: ui/gl/test/gl_surface_test_support.cc |
| diff --git a/ui/gl/test/gl_surface_test_support.cc b/ui/gl/test/gl_surface_test_support.cc |
| index a610c2af88394c306a4b84949da0e4e96d43a34d..db5cf5966ad7f2dcbe9016984a45983e8f30f2f0 100644 |
| --- a/ui/gl/test/gl_surface_test_support.cc |
| +++ b/ui/gl/test/gl_surface_test_support.cc |
| @@ -34,18 +34,18 @@ void GLSurfaceTestSupport::InitializeOneOff() { |
| #endif |
| ui::test::EnableTestConfigForPlatformWindows(); |
| - bool use_osmesa = true; |
| + bool use_software_renderer = true; |
|
Ken Russell (switch to Gerrit)
2017/02/15 02:32:15
Similar here.
|
| - // We usually use OSMesa as this works on all bots. The command line can |
| - // override this behaviour to use hardware GL. |
| + // We usually use a software renderer as this works on all bots. The |
| + // command line can override this behaviour to use hardware GL. |
| if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| switches::kUseGpuInTests)) { |
| - use_osmesa = false; |
| + use_software_renderer = false; |
| } |
| #if defined(OS_ANDROID) |
| // On Android we always use hardware GL. |
| - use_osmesa = false; |
| + use_software_renderer = false; |
| #endif |
| std::vector<GLImplementation> allowed_impls = |
| @@ -53,24 +53,25 @@ void GLSurfaceTestSupport::InitializeOneOff() { |
| DCHECK(!allowed_impls.empty()); |
| GLImplementation impl = allowed_impls[0]; |
| - if (use_osmesa) |
| - impl = kGLImplementationOSMesaGL; |
| + if (use_software_renderer) |
| + impl = gl::GetSoftwareGLImplementation(); |
| DCHECK(!base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseGL)) |
| << "kUseGL has not effect in tests"; |
| - bool fallback_to_osmesa = false; |
| + bool fallback_to_software_rendering = false; |
| bool gpu_service_logging = false; |
| bool disable_gl_drawing = true; |
| CHECK(init::InitializeGLOneOffImplementation( |
| - impl, fallback_to_osmesa, gpu_service_logging, disable_gl_drawing)); |
| + impl, fallback_to_software_rendering, gpu_service_logging, |
| + disable_gl_drawing)); |
| } |
| // static |
| void GLSurfaceTestSupport::InitializeOneOffImplementation( |
| GLImplementation impl, |
| - bool fallback_to_osmesa) { |
| + bool fallback_to_software_rendering) { |
| DCHECK(!base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseGL)) |
| << "kUseGL has not effect in tests"; |
| @@ -82,7 +83,8 @@ void GLSurfaceTestSupport::InitializeOneOffImplementation( |
| bool disable_gl_drawing = false; |
| CHECK(init::InitializeGLOneOffImplementation( |
| - impl, fallback_to_osmesa, gpu_service_logging, disable_gl_drawing)); |
| + impl, fallback_to_software_rendering, gpu_service_logging, |
| + disable_gl_drawing)); |
| } |
| // static |