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

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

Issue 2005463002: Attach YUV420 to RGB converter to GLContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 7 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 <string> 5 #include <string>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/cancelable_callback.h" 8 #include "base/cancelable_callback.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 return std::string(version ? version : ""); 83 return std::string(version ? version : "");
84 } 84 }
85 85
86 std::string GLContext::GetGLRenderer() { 86 std::string GLContext::GetGLRenderer() {
87 DCHECK(IsCurrent(nullptr)); 87 DCHECK(IsCurrent(nullptr));
88 const char *renderer = 88 const char *renderer =
89 reinterpret_cast<const char*>(glGetString(GL_RENDERER)); 89 reinterpret_cast<const char*>(glGetString(GL_RENDERER));
90 return std::string(renderer ? renderer : ""); 90 return std::string(renderer ? renderer : "");
91 } 91 }
92 92
93 gl::YUVToRGBConverter* GLContext::GetYUVToRGBConverter() {
94 return nullptr;
95 }
96
93 bool GLContext::HasExtension(const char* name) { 97 bool GLContext::HasExtension(const char* name) {
94 std::string extensions = GetExtensions(); 98 std::string extensions = GetExtensions();
95 extensions += " "; 99 extensions += " ";
96 100
97 std::string delimited_name(name); 101 std::string delimited_name(name);
98 delimited_name += " "; 102 delimited_name += " ";
99 103
100 return extensions.find(delimited_name) != std::string::npos; 104 return extensions.find(delimited_name) != std::string::npos;
101 } 105 }
102 106
(...skipping 114 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