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

Side by Side 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, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
1 diff --git a/ui/gl/gl_surface.cc b/ui/gl/gl_surface.cc
2 index 620cee7..4459d48 100644
3 --- a/ui/gl/gl_surface.cc
4 +++ b/ui/gl/gl_surface.cc
5 @@ -28,7 +28,7 @@ base::LazyInstance<base::ThreadLocalPointer<GLSurface> >::Leak y
6 } // namespace
7
8 // static
9 -bool GLSurface::InitializeOneOff() {
10 +bool GLSurface::InitializeOneOff(GLImplementation impl) {
11 DCHECK_EQ(kGLImplementationNone, GetGLImplementation());
12
13 TRACE_EVENT0("gpu", "GLSurface::InitializeOneOff");
14 @@ -40,7 +40,8 @@ bool GLSurface::InitializeOneOff() {
15 CommandLine* cmd = CommandLine::ForCurrentProcess();
16
17 // The default implementation is always the first one in list.
18 - GLImplementation impl = allowed_impls[0];
19 + if (impl == kGLImplementationNone)
20 + impl = allowed_impls[0];
21 bool fallback_to_osmesa = false;
22 if (cmd->HasSwitch(switches::kOverrideUseGLWithOSMesaForTests)) {
23 impl = kGLImplementationOSMesaGL;
24 diff --git a/ui/gl/gl_surface.h b/ui/gl/gl_surface.h
25 index 54bcc37..d458063 100644
26 --- a/ui/gl/gl_surface.h
27 +++ b/ui/gl/gl_surface.h
28 @@ -72,7 +72,7 @@ class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> {
29 virtual bool PostSubBuffer(int x, int y, int width, int height);
30
31 // Initialize GL bindings.
32 - static bool InitializeOneOff();
33 + static bool InitializeOneOff(GLImplementation = kGLImplementationNone);
34
35 // Unit tests should call these instead of InitializeOneOff() to set up
36 // GL bindings appropriate for tests.
OLDNEW
« 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