Index: ui/gl/gl_surface_win.cc |
diff --git a/ui/gl/gl_surface_win.cc b/ui/gl/gl_surface_win.cc |
index 000110368d94a0cbe547213979675b1fcffef10c..3cde3ea9c7645ffd1dd9d20cf5ae19f603ccd9be 100644 |
--- a/ui/gl/gl_surface_win.cc |
+++ b/ui/gl/gl_surface_win.cc |
@@ -25,6 +25,15 @@ |
#define EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE \ |
reinterpret_cast<EGLNativeDisplayType>(-2) |
#endif |
+#if !defined(EGL_PLATFORM_ANGLE_ANGLE) |
+#define EGL_PLATFORM_ANGLE_ANGLE 0x3201 |
+#endif |
+#if !defined(EGL_PLATFORM_ANGLE_TYPE_ANGLE) |
+#define EGL_PLATFORM_ANGLE_TYPE_ANGLE 0x3202 |
+#endif |
+#if !defined(EGL_PLATFORM_ANGLE_TYPE_D3D11_WARP_ANGLE) |
+#define EGL_PLATFORM_ANGLE_TYPE_D3D11_WARP_ANGLE 0x3206 |
+#endif |
namespace gfx { |
@@ -294,10 +303,10 @@ scoped_refptr<GLSurface> GLSurface::CreateOffscreenGLSurface( |
} |
EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() { |
- if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableD3D11)) |
- return EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE; |
- |
- return EGL_DEFAULT_DISPLAY; |
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableD3D11) || |
+ CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseWarp)) |
+ return GetDC(NULL); |
+ return EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE; |
} |
} // namespace gfx |