| Index: ui/gl/gl_surface_win.cc
|
| diff --git a/ui/gl/gl_surface_win.cc b/ui/gl/gl_surface_win.cc
|
| index 71812de087e2a5d1eb4aacabb31b6f28acde7e37..c0a223b76082056c42a2175ce8254ac90d1a0e35 100644
|
| --- a/ui/gl/gl_surface_win.cc
|
| +++ b/ui/gl/gl_surface_win.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include <dwmapi.h>
|
|
|
| +#include "base/command_line.h"
|
| #include "base/debug/trace_event.h"
|
| #include "base/logging.h"
|
| #include "base/memory/scoped_ptr.h"
|
| @@ -20,6 +21,12 @@
|
| #include "ui/gl/gl_surface_stub.h"
|
| #include "ui/gl/gl_surface_wgl.h"
|
|
|
| +// From ANGLE's egl/eglext.h.
|
| +#if !defined(EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE)
|
| +#define EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE \
|
| + reinterpret_cast<EGLNativeDisplayType>(-2)
|
| +#endif
|
| +
|
| namespace gfx {
|
|
|
| // This OSMesa GL surface can use GDI to swap the contents of the buffer to a
|
| @@ -287,4 +294,11 @@ scoped_refptr<GLSurface> GLSurface::CreateOffscreenGLSurface(
|
| }
|
| }
|
|
|
| +EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() {
|
| + if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableD3D11))
|
| + return EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE;
|
| +
|
| + return EGL_DEFAULT_DISPLAY;
|
| +}
|
| +
|
| } // namespace gfx
|
|
|