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

Unified Diff: ui/gl/gl_bindings.cc

Issue 1051253008: gpu: Upgrade to new ANGLE Platform Display init. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Avoid repeated eglInitialize in gl_bindings Created 5 years, 8 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 | « no previous file | ui/gl/gl_surface_egl.h » ('j') | ui/gl/gl_surface_egl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_bindings.cc
diff --git a/ui/gl/gl_bindings.cc b/ui/gl/gl_bindings.cc
index 83b6b594e2dbbd2d967e6f551f173b7422f9983c..74282e19e38ecef991111f5d158d1296551c80fc 100644
--- a/ui/gl/gl_bindings.cc
+++ b/ui/gl/gl_bindings.cc
@@ -41,15 +41,17 @@ std::string DriverWGL::GetPlatformExtensions() {
#if defined(OS_WIN) || defined(USE_X11) || defined(OS_ANDROID) || defined(USE_OZONE)
std::string DriverEGL::GetPlatformExtensions() {
- EGLDisplay display =
#if defined(OS_WIN)
- GLSurfaceEGL::GetPlatformDisplay(GetPlatformDefaultEGLNativeDisplay());
+ EGLDisplay display = GLSurfaceEGL::InitializeDisplay();
+ if (display == EGL_NO_DISPLAY)
+ return "";
Jamie Madill 2015/04/20 18:33:11 I wasn't sure if I should put the NO_DISPLAY check
Zhenyao Mo 2015/04/20 19:51:47 If display isn't valid, eglQueryString just return
Jamie Madill 2015/04/20 20:20:09 One difference - if display is EGL_NO_DISPLAY and
#else
- g_driver_egl.fn.eglGetDisplayFn(GetPlatformDefaultEGLNativeDisplay());
-#endif
-
+ EGLDisplay display =
+ g_driver_egl.fn.eglGetDisplayFn(GetPlatformDefaultEGLNativeDisplay());
DCHECK(g_driver_egl.fn.eglInitializeFn);
g_driver_egl.fn.eglInitializeFn(display, NULL, NULL);
+#endif
+
DCHECK(g_driver_egl.fn.eglQueryStringFn);
const char* str = g_driver_egl.fn.eglQueryStringFn(display, EGL_EXTENSIONS);
return str ? std::string(str) : "";
« no previous file with comments | « no previous file | ui/gl/gl_surface_egl.h » ('j') | ui/gl/gl_surface_egl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698