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

Unified Diff: ui/gl/gl_surface_egl.cc

Issue 435383002: adds WARP support to Chromium, for Metro mode only, on Windows 8 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: don't check command line if it isn't there Created 6 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: ui/gl/gl_surface_egl.cc
diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc
index 5a0538e0adda45cc8264c9fc78aea58e4b2e00ee..28b96ae04ecbe47a3c9ba0f730c7fc92c3f69eb0 100644
--- a/ui/gl/gl_surface_egl.cc
+++ b/ui/gl/gl_surface_egl.cc
@@ -98,7 +98,14 @@ bool GLSurfaceEGL::InitializeOneOff() {
return true;
g_native_display = GetPlatformDefaultEGLNativeDisplay();
+
+#if defined(OS_WIN)
+ const EGLenum platform = GetPlatformDefaultEGLNativePlatform();
+ const EGLint* attributes = GetPlatformDefaultEGLNativeDisplayAttributes();
+ g_display = eglGetPlatformDisplayEXT(platform, g_native_display, attributes);
Geoff Lang 2014/08/27 21:05:04 You should check for the existence of the extensio
luken 2014/08/27 21:38:17 Don't you need the display object returned by eglG
Geoff Lang 2014/08/28 13:45:54 Yea, you're able to use eglQueryString(EGL_NO_DISP
luken 2014/08/28 23:50:33 Cool, will do, thanks.
+#else
g_display = eglGetDisplay(g_native_display);
+#endif
if (!g_display) {
LOG(ERROR) << "eglGetDisplay failed with error " << GetLastEGLErrorString();
return false;
« no previous file with comments | « ui/gl/gl_surface_egl.h ('k') | ui/gl/gl_surface_win.cc » ('j') | ui/gl/gl_surface_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698