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

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

Issue 94963003: Take GL version and extensions correctly into account when binding functions (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Improve Windows initialization and renderBufferMultisample explanation Created 7 years 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 | « ui/gl/gl_context.cc ('k') | ui/gl/gl_context_egl.cc » ('j') | 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_context_cgl.h" 5 #include "ui/gl/gl_context_cgl.h"
6 6
7 #include <OpenGL/CGLRenderers.h> 7 #include <OpenGL/CGLRenderers.h>
8 #include <OpenGL/CGLTypes.h> 8 #include <OpenGL/CGLTypes.h>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 if (CGLSetCurrentContext( 183 if (CGLSetCurrentContext(
184 static_cast<CGLContextObj>(context_)) != kCGLNoError) { 184 static_cast<CGLContextObj>(context_)) != kCGLNoError) {
185 LOG(ERROR) << "Unable to make gl context current."; 185 LOG(ERROR) << "Unable to make gl context current.";
186 return false; 186 return false;
187 } 187 }
188 188
189 // Set this as soon as the context is current, since we might call into GL. 189 // Set this as soon as the context is current, since we might call into GL.
190 SetRealGLApi(); 190 SetRealGLApi();
191 191
192 SetCurrent(surface); 192 SetCurrent(surface);
193 if (!InitializeExtensionBindings()) { 193 if (!InitializeDynamicBindings()) {
194 ReleaseCurrent(surface); 194 ReleaseCurrent(surface);
195 return false; 195 return false;
196 } 196 }
197 197
198 if (!surface->OnMakeCurrent(this)) { 198 if (!surface->OnMakeCurrent(this)) {
199 LOG(ERROR) << "Unable to make gl context current."; 199 LOG(ERROR) << "Unable to make gl context current.";
200 return false; 200 return false;
201 } 201 }
202 202
203 return true; 203 return true;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 295
296 GLContextCGL::~GLContextCGL() { 296 GLContextCGL::~GLContextCGL() {
297 Destroy(); 297 Destroy();
298 } 298 }
299 299
300 GpuPreference GLContextCGL::GetGpuPreference() { 300 GpuPreference GLContextCGL::GetGpuPreference() {
301 return gpu_preference_; 301 return gpu_preference_;
302 } 302 }
303 303
304 } // namespace gfx 304 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_context.cc ('k') | ui/gl/gl_context_egl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698