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

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: Addressed zmo's feedback 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..cfd8c5106805ccb11e7cf9b1dd087cd948e1f66e 100644
--- a/ui/gl/gl_bindings.cc
+++ b/ui/gl/gl_bindings.cc
@@ -43,13 +43,17 @@ std::string DriverWGL::GetPlatformExtensions() {
std::string DriverEGL::GetPlatformExtensions() {
EGLDisplay display =
#if defined(OS_WIN)
- GLSurfaceEGL::GetPlatformDisplay(GetPlatformDefaultEGLNativeDisplay());
+ GLSurfaceEGL::InitializeDisplay();
+ if (display == EGL_NO_DISPLAY)
+ return "";
#else
- g_driver_egl.fn.eglGetDisplayFn(GetPlatformDefaultEGLNativeDisplay());
-#endif
-
+ g_driver_egl.fn.eglGetDisplayFn(GetPlatformDefaultEGLNativeDisplay());
+ if (display == EGL_NO_DISPLAY)
+ return "";
DCHECK(g_driver_egl.fn.eglInitializeFn);
g_driver_egl.fn.eglInitializeFn(display, NULL, NULL);
piman 2015/04/23 21:03:30 It would be easier to follow if both OS_WIN and !O
+#endif
+
DCHECK(g_driver_egl.fn.eglQueryStringFn);
const char* str = g_driver_egl.fn.eglQueryStringFn(display, EGL_EXTENSIONS);
return str ? std::string(str) : "";
@@ -57,6 +61,7 @@ std::string DriverEGL::GetPlatformExtensions() {
// static
std::string DriverEGL::GetClientExtensions() {
+ DCHECK(g_driver_egl.fn.eglQueryStringFn);
const char* str =
g_driver_egl.fn.eglQueryStringFn(EGL_NO_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