| 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.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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |