Index: gpu/gles2_conform_support/egl/egl.cc |
diff --git a/gpu/gles2_conform_support/egl/egl.cc b/gpu/gles2_conform_support/egl/egl.cc |
index 343937fa0f3d4eed3a0b25dfc7fc06b4871022a6..41601da3caff8424536eacdd4477cf28fac3842b 100644 |
--- a/gpu/gles2_conform_support/egl/egl.cc |
+++ b/gpu/gles2_conform_support/egl/egl.cc |
@@ -102,12 +102,16 @@ EGLBoolean eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor) { |
if (!display->Initialize()) |
return EglError(EGL_NOT_INITIALIZED, EGL_FALSE); |
- int argc = 1; |
- const char* const argv[] = { |
- "dummy" |
- }; |
- base::CommandLine::Init(argc, argv); |
- gfx::GLSurface::InitializeOneOff(); |
+ // eglInitialize can be called multiple times, prevent InitializeOneOff from |
+ // being called multiple times. |
+ if (gfx::GetGLImplementation() == gfx::kGLImplementationNone) { |
no sievers
2015/08/28 18:39:33
I think you can just run this code every time if y
|
+ int argc = 1; |
+ const char* const argv[] = { |
+ "dummy" |
+ }; |
+ base::CommandLine::Init(argc, argv); |
+ gfx::GLSurface::InitializeOneOff(); |
+ } |
*major = 1; |
*minor = 4; |