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

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

Issue 1882953006: Attach YUV420 to RGB converter to GLContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move output arg Created 4 years, 8 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 | « ui/gl/gl_context.h ('k') | ui/gl/gl_context_cgl.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.h" 5 #include "ui/gl/gl_context.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/cancelable_callback.h" 10 #include "base/cancelable_callback.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 return std::string(version ? version : ""); 85 return std::string(version ? version : "");
86 } 86 }
87 87
88 std::string GLContext::GetGLRenderer() { 88 std::string GLContext::GetGLRenderer() {
89 DCHECK(IsCurrent(nullptr)); 89 DCHECK(IsCurrent(nullptr));
90 const char *renderer = 90 const char *renderer =
91 reinterpret_cast<const char*>(glGetString(GL_RENDERER)); 91 reinterpret_cast<const char*>(glGetString(GL_RENDERER));
92 return std::string(renderer ? renderer : ""); 92 return std::string(renderer ? renderer : "");
93 } 93 }
94 94
95 gl::YUVToRGBConverter* GLContext::GetYUVToRGBConverter() {
96 return nullptr;
97 }
98
95 bool GLContext::HasExtension(const char* name) { 99 bool GLContext::HasExtension(const char* name) {
96 std::string extensions = GetExtensions(); 100 std::string extensions = GetExtensions();
97 extensions += " "; 101 extensions += " ";
98 102
99 std::string delimited_name(name); 103 std::string delimited_name(name);
100 delimited_name += " "; 104 delimited_name += " ";
101 105
102 return extensions.find(delimited_name) != std::string::npos; 106 return extensions.find(delimited_name) != std::string::npos;
103 } 107 }
104 108
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 } 221 }
218 222
219 GLContextReal::~GLContextReal() {} 223 GLContextReal::~GLContextReal() {}
220 224
221 void GLContextReal::SetCurrent(GLSurface* surface) { 225 void GLContextReal::SetCurrent(GLSurface* surface) {
222 GLContext::SetCurrent(surface); 226 GLContext::SetCurrent(surface);
223 current_real_context_.Pointer()->Set(surface ? this : nullptr); 227 current_real_context_.Pointer()->Set(surface ? this : nullptr);
224 } 228 }
225 229
226 } // namespace gfx 230 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_context.h ('k') | ui/gl/gl_context_cgl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698