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