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

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

Issue 2129043003: Make dynamic mock bindings initialization consistent with other GL implementations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « 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 9
10 #include <memory> 10 #include <memory>
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 if (CGLSetCurrentContext( 225 if (CGLSetCurrentContext(
226 static_cast<CGLContextObj>(context_)) != kCGLNoError) { 226 static_cast<CGLContextObj>(context_)) != kCGLNoError) {
227 LOG(ERROR) << "Unable to make gl context current."; 227 LOG(ERROR) << "Unable to make gl context current.";
228 return false; 228 return false;
229 } 229 }
230 230
231 // Set this as soon as the context is current, since we might call into GL. 231 // Set this as soon as the context is current, since we might call into GL.
232 SetRealGLApi(); 232 SetRealGLApi();
233 233
234 SetCurrent(surface); 234 SetCurrent(surface);
235 if (!InitializeDynamicBindings()) { 235 InitializeDynamicBindings();
236 return false;
237 }
238 236
239 if (!surface->OnMakeCurrent(this)) { 237 if (!surface->OnMakeCurrent(this)) {
240 LOG(ERROR) << "Unable to make gl context current."; 238 LOG(ERROR) << "Unable to make gl context current.";
241 return false; 239 return false;
242 } 240 }
243 241
244 release_current.Cancel(); 242 release_current.Cancel();
245 return true; 243 return true;
246 } 244 }
247 245
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 280
283 GLContextCGL::~GLContextCGL() { 281 GLContextCGL::~GLContextCGL() {
284 Destroy(); 282 Destroy();
285 } 283 }
286 284
287 GpuPreference GLContextCGL::GetGpuPreference() { 285 GpuPreference GLContextCGL::GetGpuPreference() {
288 return gpu_preference_; 286 return gpu_preference_;
289 } 287 }
290 288
291 } // namespace gl 289 } // namespace gl
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