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

Side by Side Diff: mojo/tools/roll/ui_gl_init.patch

Issue 817653003: Update from https://crrev.com/309717 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « mojo/tools/roll/cc_strip_video.patch ('k') | net/base/layered_network_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 diff --git a/ui/gl/gl_surface.cc b/ui/gl/gl_surface.cc 1 diff --git a/ui/gl/gl_surface.cc b/ui/gl/gl_surface.cc
2 index 620cee7..4459d48 100644 2 index e1369e5..f4cb61c 100644
3 --- a/ui/gl/gl_surface.cc 3 --- a/ui/gl/gl_surface.cc
4 +++ b/ui/gl/gl_surface.cc 4 +++ b/ui/gl/gl_surface.cc
5 @@ -28,7 +28,7 @@ base::LazyInstance<base::ThreadLocalPointer<GLSurface> >::Leak y 5 @@ -28,7 +28,7 @@ base::LazyInstance<base::ThreadLocalPointer<GLSurface> >::Leak y
6 } // namespace 6 } // namespace
7 7
8 // static 8 // static
9 -bool GLSurface::InitializeOneOff() { 9 -bool GLSurface::InitializeOneOff() {
10 +bool GLSurface::InitializeOneOff(GLImplementation impl) { 10 +bool GLSurface::InitializeOneOff(GLImplementation impl) {
11 DCHECK_EQ(kGLImplementationNone, GetGLImplementation()); 11 DCHECK_EQ(kGLImplementationNone, GetGLImplementation());
12 12
13 TRACE_EVENT0("gpu", "GLSurface::InitializeOneOff"); 13 TRACE_EVENT0("gpu", "GLSurface::InitializeOneOff");
14 @@ -40,7 +40,8 @@ bool GLSurface::InitializeOneOff() { 14 @@ -40,7 +40,8 @@ bool GLSurface::InitializeOneOff() {
15 CommandLine* cmd = CommandLine::ForCurrentProcess(); 15 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess();
16 16
17 // The default implementation is always the first one in list. 17 // The default implementation is always the first one in list.
18 - GLImplementation impl = allowed_impls[0]; 18 - GLImplementation impl = allowed_impls[0];
19 + if (impl == kGLImplementationNone) 19 + if (impl == kGLImplementationNone)
20 + impl = allowed_impls[0]; 20 + impl = allowed_impls[0];
21 bool fallback_to_osmesa = false; 21 bool fallback_to_osmesa = false;
22 if (cmd->HasSwitch(switches::kOverrideUseGLWithOSMesaForTests)) { 22 if (cmd->HasSwitch(switches::kOverrideUseGLWithOSMesaForTests)) {
23 impl = kGLImplementationOSMesaGL; 23 impl = kGLImplementationOSMesaGL;
24 diff --git a/ui/gl/gl_surface.h b/ui/gl/gl_surface.h 24 diff --git a/ui/gl/gl_surface.h b/ui/gl/gl_surface.h
25 index 54bcc37..d458063 100644 25 index 8993845..220bda6 100644
26 --- a/ui/gl/gl_surface.h 26 --- a/ui/gl/gl_surface.h
27 +++ b/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> { 28 @@ -96,7 +96,7 @@ class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> {
29 virtual bool PostSubBuffer(int x, int y, int width, int height); 29 const SwapCompletionCallback& callback);
30 30
31 // Initialize GL bindings. 31 // Initialize GL bindings.
32 - static bool InitializeOneOff(); 32 - static bool InitializeOneOff();
33 + static bool InitializeOneOff(GLImplementation = kGLImplementationNone); 33 + static bool InitializeOneOff(GLImplementation = kGLImplementationNone);
34 34
35 // Unit tests should call these instead of InitializeOneOff() to set up 35 // Unit tests should call these instead of InitializeOneOff() to set up
36 // GL bindings appropriate for tests. 36 // GL bindings appropriate for tests.
OLDNEW
« no previous file with comments | « mojo/tools/roll/cc_strip_video.patch ('k') | net/base/layered_network_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698