| 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 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 } | 199 } |
| 200 } | 200 } |
| 201 renderer_id_ = renderer_id; | 201 renderer_id_ = renderer_id; |
| 202 } | 202 } |
| 203 } | 203 } |
| 204 return true; | 204 return true; |
| 205 } | 205 } |
| 206 | 206 |
| 207 YUVToRGBConverter* GLContextCGL::GetYUVToRGBConverter() { | 207 YUVToRGBConverter* GLContextCGL::GetYUVToRGBConverter() { |
| 208 if (!yuv_to_rgb_converter_) | 208 if (!yuv_to_rgb_converter_) |
| 209 yuv_to_rgb_converter_.reset(new YUVToRGBConverter); | 209 yuv_to_rgb_converter_.reset(new YUVToRGBConverter(*GetVersionInfo())); |
| 210 return yuv_to_rgb_converter_.get(); | 210 return yuv_to_rgb_converter_.get(); |
| 211 } | 211 } |
| 212 | 212 |
| 213 bool GLContextCGL::MakeCurrent(GLSurface* surface) { | 213 bool GLContextCGL::MakeCurrent(GLSurface* surface) { |
| 214 DCHECK(context_); | 214 DCHECK(context_); |
| 215 | 215 |
| 216 if (!ForceGpuSwitchIfNeeded()) | 216 if (!ForceGpuSwitchIfNeeded()) |
| 217 return false; | 217 return false; |
| 218 | 218 |
| 219 if (IsCurrent(surface)) | 219 if (IsCurrent(surface)) |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 | 280 |
| 281 GLContextCGL::~GLContextCGL() { | 281 GLContextCGL::~GLContextCGL() { |
| 282 Destroy(); | 282 Destroy(); |
| 283 } | 283 } |
| 284 | 284 |
| 285 GpuPreference GLContextCGL::GetGpuPreference() { | 285 GpuPreference GLContextCGL::GetGpuPreference() { |
| 286 return gpu_preference_; | 286 return gpu_preference_; |
| 287 } | 287 } |
| 288 | 288 |
| 289 } // namespace gl | 289 } // namespace gl |
| OLD | NEW |