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

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

Issue 11275120: Virtual GL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
« 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 if (!InitializeExtensionBindings()) { 118 if (!InitializeExtensionBindings()) {
119 ReleaseCurrent(surface); 119 ReleaseCurrent(surface);
120 return false; 120 return false;
121 } 121 }
122 122
123 if (!surface->OnMakeCurrent(this)) { 123 if (!surface->OnMakeCurrent(this)) {
124 LOG(ERROR) << "Unable to make gl context current."; 124 LOG(ERROR) << "Unable to make gl context current.";
125 return false; 125 return false;
126 } 126 }
127 127
128 SetRealGLApi();
128 return true; 129 return true;
129 } 130 }
130 131
131 void GLContextCGL::ReleaseCurrent(GLSurface* surface) { 132 void GLContextCGL::ReleaseCurrent(GLSurface* surface) {
132 if (!IsCurrent(surface)) 133 if (!IsCurrent(surface))
133 return; 134 return;
134 135
135 SetCurrent(NULL, NULL); 136 SetCurrent(NULL, NULL);
136 CGLSetCurrentContext(NULL); 137 CGLSetCurrentContext(NULL);
137 } 138 }
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 219
219 GpuPreference GLContextCGL::GetGpuPreference() { 220 GpuPreference GLContextCGL::GetGpuPreference() {
220 return gpu_preference_; 221 return gpu_preference_;
221 } 222 }
222 223
223 void ScopedCGLDestroyRendererInfo::operator()(CGLRendererInfoObj x) const { 224 void ScopedCGLDestroyRendererInfo::operator()(CGLRendererInfoObj x) const {
224 CGLDestroyRendererInfo(x); 225 CGLDestroyRendererInfo(x);
225 } 226 }
226 227
227 } // namespace gfx 228 } // 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