OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |