| 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..e16464315d608130e7df5a3907fba9d9158f423d 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,23 @@ scoped_refptr<GLSurface> GLSurface::CreateOffscreenGLSurface(
|
| }
|
|
|
| EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() {
|
| - if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableD3D11))
|
| - return EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE;
|
| + return GetDC(NULL);
|
| +}
|
| +
|
| +static const EGLint kDisplayAttribsWarp[] {
|
| + EGL_PLATFORM_ANGLE_TYPE_ANGLE,
|
| + EGL_PLATFORM_ANGLE_TYPE_D3D11_WARP_ANGLE,
|
| + EGL_NONE
|
| +};
|
| +
|
| +const EGLenum GetPlatformDefaultEGLNativePlatform() {
|
| + return EGL_PLATFORM_ANGLE_ANGLE;
|
| +}
|
|
|
| - return EGL_DEFAULT_DISPLAY;
|
| +const EGLint* GetPlatformDefaultEGLNativeDisplayAttributes() {
|
| + if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseWarp))
|
| + return kDisplayAttribsWarp;
|
| + return NULL;
|
| }
|
|
|
| } // namespace gfx
|
|
|