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

Unified Diff: gpu/gles2_conform_support/egl/egl.cc

Issue 1220883008: Add command_buffer_gles2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: needed an additional function for skia Created 5 years, 4 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
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..4aa1ac8a40df7cff1da77e750216dab783705aaa 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();
+ // eglInitialze can be called multiple times, prevent InitializeOneOff from
no sievers 2015/08/27 19:21:28 nit: s/eglInitialze/eglInitialize
hendrikw 2015/08/27 20:34:44 Done.
+ // being called multiple times.
no sievers 2015/08/27 19:21:28 Actually InitializeOneOff() already seems to handl
hendrikw 2015/08/27 20:34:44 It DCHECKS if called more than once because of DCH
+ if (gfx::GetGLImplementation() == gfx::kGLImplementationNone) {
+ int argc = 1;
+ const char* const argv[] = {
+ "dummy"
+ };
+ base::CommandLine::Init(argc, argv);
+ gfx::GLSurface::InitializeOneOff();
+ }
*major = 1;
*minor = 4;

Powered by Google App Engine
This is Rietveld 408576698