Chromium Code Reviews| Index: ui/gl/gl_surface_egl.cc |
| diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc |
| index c54aa7048618b28c3a54d8ebb8b9af65646f6e79..e5f208162982e04f65a87f6ed738085d6e1ec284 100644 |
| --- a/ui/gl/gl_surface_egl.cc |
| +++ b/ui/gl/gl_surface_egl.cc |
| @@ -77,6 +77,11 @@ extern "C" { |
| #define EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE 0x320E |
| #endif /* EGL_ANGLE_platform_angle_opengl */ |
| +#ifndef EGL_ANGLE_platform_angle_null |
| +#define EGL_ANGLE_platform_angle_null 1 |
| +#define EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE 0x33AE |
| +#endif /* EGL_ANGLE_platform_angle_null */ |
| + |
| #ifndef EGL_ANGLE_x11_visual |
| #define EGL_ANGLE_x11_visual 1 |
| #define EGL_X11_VISUAL_ID_ANGLE 0x33A3 |
| @@ -173,6 +178,9 @@ EGLDisplay GetDisplayFromType(DisplayType display_type, |
| case ANGLE_OPENGLES: |
| return GetPlatformANGLEDisplay( |
| native_display, EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE, false); |
| + case ANGLE_NULL: |
| + return GetPlatformANGLEDisplay( |
| + native_display, EGL_PLATFORM_ANGLE_TYPE_NULL_ANGLE, false); |
| default: |
| NOTREACHED(); |
| return EGL_NO_DISPLAY; |
| @@ -193,6 +201,8 @@ const char* DisplayTypeString(DisplayType display_type) { |
| return "OpenGL"; |
| case ANGLE_OPENGLES: |
| return "OpenGLES"; |
| + case ANGLE_NULL: |
| + return "Null"; |
| default: |
| NOTREACHED(); |
| return "Err"; |
| @@ -363,6 +373,9 @@ void GetEGLInitDisplays(bool supports_angle_d3d, |
| !command_line->HasSwitch(switches::kUseANGLE) || |
| requested_renderer == kANGLEImplementationDefaultName; |
| + if (requested_renderer == kANGLEImplementationNullName) |
|
Geoff Lang
2016/10/19 16:23:09
We should check for the extension first.
piman
2016/10/19 18:03:01
Done.
|
| + init_displays->push_back(ANGLE_NULL); |
| + |
| if (supports_angle_d3d) { |
| if (use_angle_default) { |
| // Default mode for ANGLE - try D3D11, else try D3D9 |