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

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

Issue 812543002: Update from https://crrev.com/308331 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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_cgl.h ('k') | ui/gl/gl_context_egl.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 // 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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 if (!native_context_is_current) 231 if (!native_context_is_current)
232 return false; 232 return false;
233 233
234 return true; 234 return true;
235 } 235 }
236 236
237 void* GLContextCGL::GetHandle() { 237 void* GLContextCGL::GetHandle() {
238 return context_; 238 return context_;
239 } 239 }
240 240
241 void GLContextCGL::SetSwapInterval(int interval) { 241 void GLContextCGL::OnSetSwapInterval(int interval) {
242 DCHECK(IsCurrent(NULL)); 242 DCHECK(IsCurrent(NULL));
243 } 243 }
244 244
245 bool GLContextCGL::GetTotalGpuMemory(size_t* bytes) { 245 bool GLContextCGL::GetTotalGpuMemory(size_t* bytes) {
246 DCHECK(bytes); 246 DCHECK(bytes);
247 *bytes = 0; 247 *bytes = 0;
248 248
249 CGLContextObj context = reinterpret_cast<CGLContextObj>(context_); 249 CGLContextObj context = reinterpret_cast<CGLContextObj>(context_);
250 if (!context) 250 if (!context)
251 return false; 251 return false;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 302
303 GLContextCGL::~GLContextCGL() { 303 GLContextCGL::~GLContextCGL() {
304 Destroy(); 304 Destroy();
305 } 305 }
306 306
307 GpuPreference GLContextCGL::GetGpuPreference() { 307 GpuPreference GLContextCGL::GetGpuPreference() {
308 return gpu_preference_; 308 return gpu_preference_;
309 } 309 }
310 310
311 } // namespace gfx 311 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_context_cgl.h ('k') | ui/gl/gl_context_egl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698