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

Unified Diff: ui/gl/gl_context_egl.cc

Issue 988693005: Chromium roll (https://codereview.chromium.org/976353002) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: fixed bad android build patch Created 5 years, 9 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/android/surface_texture.cc ('k') | ui/gl/gl_image_memory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_context_egl.cc
diff --git a/ui/gl/gl_context_egl.cc b/ui/gl/gl_context_egl.cc
index 5fa2c4457e4125b2692d41b9c098f46a4e03adea..950558b97fc411c0bf4e9e020edb8ea2f42ad73f 100644
--- a/ui/gl/gl_context_egl.cc
+++ b/ui/gl/gl_context_egl.cc
@@ -4,6 +4,7 @@
#include "ui/gl/gl_context_egl.h"
+#include "base/command_line.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/trace_event/trace_event.h"
@@ -38,12 +39,18 @@ bool GLContextEGL::Initialize(
DCHECK(compatible_surface);
DCHECK(!context_);
- static const EGLint kContextAttributes[] = {
- EGL_CONTEXT_CLIENT_VERSION, 2,
+ EGLint context_client_version = 2;
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableUnsafeES3APIs)) {
+ context_client_version = 3;
+ }
+
+ const EGLint kContextAttributes[] = {
+ EGL_CONTEXT_CLIENT_VERSION, context_client_version,
EGL_NONE
};
- static const EGLint kContextRobustnessAttributes[] = {
- EGL_CONTEXT_CLIENT_VERSION, 2,
+ const EGLint kContextRobustnessAttributes[] = {
+ EGL_CONTEXT_CLIENT_VERSION, context_client_version,
EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT,
EGL_LOSE_CONTEXT_ON_RESET_EXT,
EGL_NONE
« no previous file with comments | « ui/gl/android/surface_texture.cc ('k') | ui/gl/gl_image_memory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698