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

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: Fix for ChromeOS build 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') | no next file with comments »
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..c576db8e14d6433ab34798add0a33bde98c2462c 100644
--- a/ui/gl/gl_bindings.cc
+++ b/ui/gl/gl_bindings.cc
@@ -41,15 +41,10 @@ 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());
-#else
- g_driver_egl.fn.eglGetDisplayFn(GetPlatformDefaultEGLNativeDisplay());
-#endif
+ EGLDisplay display = GLSurfaceEGL::InitializeDisplay();
+ if (display == EGL_NO_DISPLAY)
+ return "";
- DCHECK(g_driver_egl.fn.eglInitializeFn);
- g_driver_egl.fn.eglInitializeFn(display, NULL, NULL);
DCHECK(g_driver_egl.fn.eglQueryStringFn);
const char* str = g_driver_egl.fn.eglQueryStringFn(display, EGL_EXTENSIONS);
return str ? std::string(str) : "";
@@ -57,6 +52,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698