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

Side by Side Diff: ui/gl/gl_implementation.cc

Issue 16894002: Unset GL Api when releasing a context. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« ui/gl/gl_bindings.h ('K') | « ui/gl/gl_gl_api_implementation.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/gl/gl_implementation.h" 5 #include "ui/gl/gl_implementation.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 case kGLImplementationEGLGLES2: 56 case kGLImplementationEGLGLES2:
57 return false; 57 return false;
58 default: 58 default:
59 NOTREACHED(); 59 NOTREACHED();
60 return true; 60 return true;
61 } 61 }
62 } 62 }
63 63
64 } 64 }
65 65
66 GLApi* g_current_gl_context; 66 base::LazyInstance<base::ThreadLocalPointer<GLApi> > g_current_gl_context_tls =
67 LAZY_INSTANCE_INITIALIZER;
67 OSMESAApi* g_current_osmesa_context; 68 OSMESAApi* g_current_osmesa_context;
68 69
69 #if defined(OS_WIN) 70 #if defined(OS_WIN)
70 71
71 EGLApi* g_current_egl_context; 72 EGLApi* g_current_egl_context;
72 WGLApi* g_current_wgl_context; 73 WGLApi* g_current_wgl_context;
73 74
74 #elif defined(USE_X11) 75 #elif defined(USE_X11)
75 76
76 EGLApi* g_current_egl_context; 77 EGLApi* g_current_egl_context;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 if (!proc && g_get_proc_address) { 167 if (!proc && g_get_proc_address) {
167 proc = g_get_proc_address(name); 168 proc = g_get_proc_address(name);
168 if (proc) 169 if (proc)
169 return proc; 170 return proc;
170 } 171 }
171 172
172 return proc; 173 return proc;
173 } 174 }
174 175
175 } // namespace gfx 176 } // namespace gfx
OLDNEW
« ui/gl/gl_bindings.h ('K') | « ui/gl/gl_gl_api_implementation.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698