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

Unified Diff: ui/gl/gl_context_egl.cc

Issue 2695063003: Hook up the ANGLE extensions for disabling client-side data. (Closed)
Patch Set: Rebase Created 3 years, 10 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
Index: ui/gl/gl_context_egl.cc
diff --git a/ui/gl/gl_context_egl.cc b/ui/gl/gl_context_egl.cc
index ca34e4b7eaee933c2112f6b67a629556a06e0ce1..3cabb4d5b5339131e3e033177615e767b573d021 100644
--- a/ui/gl/gl_context_egl.cc
+++ b/ui/gl/gl_context_egl.cc
@@ -32,6 +32,11 @@ extern "C" {
#define EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE 0x3AAC
#endif /* EGL_ANGLE_create_context_webgl_compatibility */
+#ifndef EGL_ANGLE_create_context_client_arrays
+#define EGL_ANGLE_create_context_client_arrays 1
+#define EGL_CONTEXT_CLIENT_ARRAYS_ENABLED_ANGLE 0x3452
+#endif /* EGL_ANGLE_create_context_client_arrays */
+
using ui::GetLastEGLErrorString;
namespace gl {
@@ -105,6 +110,12 @@ bool GLContextEGL::Initialize(GLSurface* compatible_surface,
DCHECK(!attribs.webgl_compatibility_context);
}
+ if (GLSurfaceEGL::HasEGLExtension("EGL_ANGLE_create_context_client_arrays")) {
+ // Disable client arrays if the context supports it
+ context_attributes.push_back(EGL_CONTEXT_CLIENT_ARRAYS_ENABLED_ANGLE);
+ context_attributes.push_back(EGL_FALSE);
+ }
+
// Append final EGL_NONE to signal the context attributes are finished
context_attributes.push_back(EGL_NONE);
context_attributes.push_back(EGL_NONE);
« gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc ('K') | « ui/gl/gl_bindings.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698