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

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

Issue 2170293002: Use GLVersionInfo instead of gl::GetGLImplementation() to decide GL paths (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment Created 4 years, 5 months 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 | « gpu/perftests/texture_upload_perftest.cc ('k') | ui/gl/gl_fence.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 9
10 #include <memory> 10 #include <memory>
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « gpu/perftests/texture_upload_perftest.cc ('k') | ui/gl/gl_fence.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698