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

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: first round of tryfixes 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);
+#else
g_display = eglGetDisplay(g_native_display);
+#endif
if (!g_display) {
LOG(ERROR) << "eglGetDisplay failed with error " << GetLastEGLErrorString();
return false;

Powered by Google App Engine
This is Rietveld 408576698