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

Unified Diff: mojo/tools/roll/ui_gl_init.patch

Issue 669813003: Update from chromium https://crrev.com/301725/ (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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
Index: mojo/tools/roll/ui_gl_init.patch
diff --git a/mojo/tools/roll/ui_gl_init.patch b/mojo/tools/roll/ui_gl_init.patch
new file mode 100644
index 0000000000000000000000000000000000000000..2b16af8c5f0f78a7dda5d4d6d95e0dde5b3b3ccd
--- /dev/null
+++ b/mojo/tools/roll/ui_gl_init.patch
@@ -0,0 +1,36 @@
+diff --git a/ui/gl/gl_surface.cc b/ui/gl/gl_surface.cc
+index 620cee7..4459d48 100644
+--- a/ui/gl/gl_surface.cc
++++ b/ui/gl/gl_surface.cc
+@@ -28,7 +28,7 @@ base::LazyInstance<base::ThreadLocalPointer<GLSurface> >::Leaky
+ } // namespace
+
+ // static
+-bool GLSurface::InitializeOneOff() {
++bool GLSurface::InitializeOneOff(GLImplementation impl) {
+ DCHECK_EQ(kGLImplementationNone, GetGLImplementation());
+
+ TRACE_EVENT0("gpu", "GLSurface::InitializeOneOff");
+@@ -40,7 +40,8 @@ bool GLSurface::InitializeOneOff() {
+ CommandLine* cmd = CommandLine::ForCurrentProcess();
+
+ // The default implementation is always the first one in list.
+- GLImplementation impl = allowed_impls[0];
++ if (impl == kGLImplementationNone)
++ impl = allowed_impls[0];
+ bool fallback_to_osmesa = false;
+ if (cmd->HasSwitch(switches::kOverrideUseGLWithOSMesaForTests)) {
+ impl = kGLImplementationOSMesaGL;
+diff --git a/ui/gl/gl_surface.h b/ui/gl/gl_surface.h
+index 54bcc37..d458063 100644
+--- a/ui/gl/gl_surface.h
++++ b/ui/gl/gl_surface.h
+@@ -72,7 +72,7 @@ class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> {
+ virtual bool PostSubBuffer(int x, int y, int width, int height);
+
+ // Initialize GL bindings.
+- static bool InitializeOneOff();
++ static bool InitializeOneOff(GLImplementation = kGLImplementationNone);
+
+ // Unit tests should call these instead of InitializeOneOff() to set up
+ // GL bindings appropriate for tests.
« no previous file with comments | « mojo/tools/roll/cc_strip_video.patch ('k') | net/android/java/src/org/chromium/net/NetworkChangeNotifier.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698