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

Unified Diff: ui/gl/gl_surface_egl.cc

Issue 2415663008: Expose Null ANGLE backend (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « ui/gl/gl_surface_egl.h ('k') | ui/gl/gl_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ui/gl/gl_surface_egl.h ('k') | ui/gl/gl_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698