OLD | NEW |
(Empty) | |
| 1 diff --git a/ui/gl/gl_surface.cc b/ui/gl/gl_surface.cc |
| 2 index 620cee7..4459d48 100644 |
| 3 --- a/ui/gl/gl_surface.cc |
| 4 +++ b/ui/gl/gl_surface.cc |
| 5 @@ -28,7 +28,7 @@ base::LazyInstance<base::ThreadLocalPointer<GLSurface> >::Leak
y |
| 6 } // namespace |
| 7 |
| 8 // static |
| 9 -bool GLSurface::InitializeOneOff() { |
| 10 +bool GLSurface::InitializeOneOff(GLImplementation impl) { |
| 11 DCHECK_EQ(kGLImplementationNone, GetGLImplementation()); |
| 12 |
| 13 TRACE_EVENT0("gpu", "GLSurface::InitializeOneOff"); |
| 14 @@ -40,7 +40,8 @@ bool GLSurface::InitializeOneOff() { |
| 15 CommandLine* cmd = CommandLine::ForCurrentProcess(); |
| 16 |
| 17 // The default implementation is always the first one in list. |
| 18 - GLImplementation impl = allowed_impls[0]; |
| 19 + if (impl == kGLImplementationNone) |
| 20 + impl = allowed_impls[0]; |
| 21 bool fallback_to_osmesa = false; |
| 22 if (cmd->HasSwitch(switches::kOverrideUseGLWithOSMesaForTests)) { |
| 23 impl = kGLImplementationOSMesaGL; |
| 24 diff --git a/ui/gl/gl_surface.h b/ui/gl/gl_surface.h |
| 25 index 54bcc37..d458063 100644 |
| 26 --- a/ui/gl/gl_surface.h |
| 27 +++ b/ui/gl/gl_surface.h |
| 28 @@ -72,7 +72,7 @@ class GL_EXPORT GLSurface : public base::RefCounted<GLSurface>
{ |
| 29 virtual bool PostSubBuffer(int x, int y, int width, int height); |
| 30 |
| 31 // Initialize GL bindings. |
| 32 - static bool InitializeOneOff(); |
| 33 + static bool InitializeOneOff(GLImplementation = kGLImplementationNone); |
| 34 |
| 35 // Unit tests should call these instead of InitializeOneOff() to set up |
| 36 // GL bindings appropriate for tests. |
OLD | NEW |