| 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 | 225 |
| 226 return true; | 226 return true; |
| 227 } | 227 } |
| 228 | 228 |
| 229 void* GLContextCGL::GetHandle() { | 229 void* GLContextCGL::GetHandle() { |
| 230 return context_; | 230 return context_; |
| 231 } | 231 } |
| 232 | 232 |
| 233 void GLContextCGL::SetSwapInterval(int interval) { | 233 void GLContextCGL::SetSwapInterval(int interval) { |
| 234 DCHECK(IsCurrent(NULL)); | 234 DCHECK(IsCurrent(NULL)); |
| 235 LOG(WARNING) << "GLContex: GLContextCGL::SetSwapInterval is ignored."; | |
| 236 } | 235 } |
| 237 | 236 |
| 238 | |
| 239 bool GLContextCGL::GetTotalGpuMemory(size_t* bytes) { | 237 bool GLContextCGL::GetTotalGpuMemory(size_t* bytes) { |
| 240 DCHECK(bytes); | 238 DCHECK(bytes); |
| 241 *bytes = 0; | 239 *bytes = 0; |
| 242 | 240 |
| 243 CGLContextObj context = reinterpret_cast<CGLContextObj>(context_); | 241 CGLContextObj context = reinterpret_cast<CGLContextObj>(context_); |
| 244 if (!context) | 242 if (!context) |
| 245 return false; | 243 return false; |
| 246 | 244 |
| 247 // Retrieve the current renderer ID | 245 // Retrieve the current renderer ID |
| 248 GLint current_renderer_id = 0; | 246 GLint current_renderer_id = 0; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 | 294 |
| 297 GLContextCGL::~GLContextCGL() { | 295 GLContextCGL::~GLContextCGL() { |
| 298 Destroy(); | 296 Destroy(); |
| 299 } | 297 } |
| 300 | 298 |
| 301 GpuPreference GLContextCGL::GetGpuPreference() { | 299 GpuPreference GLContextCGL::GetGpuPreference() { |
| 302 return gpu_preference_; | 300 return gpu_preference_; |
| 303 } | 301 } |
| 304 | 302 |
| 305 } // namespace gfx | 303 } // namespace gfx |
| OLD | NEW |