| 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/threading/thread_local.h" | 10 #include "base/threading/thread_local.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 bool GLContext::GetTotalGpuMemory(size_t* bytes) { | 39 bool GLContext::GetTotalGpuMemory(size_t* bytes) { |
| 40 DCHECK(bytes); | 40 DCHECK(bytes); |
| 41 *bytes = 0; | 41 *bytes = 0; |
| 42 return false; | 42 return false; |
| 43 } | 43 } |
| 44 | 44 |
| 45 void GLContext::SetSafeToForceGpuSwitch() { | 45 void GLContext::SetSafeToForceGpuSwitch() { |
| 46 } | 46 } |
| 47 | 47 |
| 48 void GLContext::SetRecreateSurfaceOnMakeCurrent() { |
| 49 NOTIMPLEMENTED(); |
| 50 } |
| 51 |
| 48 std::string GLContext::GetExtensions() { | 52 std::string GLContext::GetExtensions() { |
| 49 DCHECK(IsCurrent(NULL)); | 53 DCHECK(IsCurrent(NULL)); |
| 50 const char* ext = reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS)); | 54 const char* ext = reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS)); |
| 51 return std::string(ext ? ext : ""); | 55 return std::string(ext ? ext : ""); |
| 52 } | 56 } |
| 53 | 57 |
| 54 bool GLContext::HasExtension(const char* name) { | 58 bool GLContext::HasExtension(const char* name) { |
| 55 std::string extensions = GetExtensions(); | 59 std::string extensions = GetExtensions(); |
| 56 extensions += " "; | 60 extensions += " "; |
| 57 | 61 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 void GLContext::OnDestroyVirtualContext(GLContext* virtual_context) { | 130 void GLContext::OnDestroyVirtualContext(GLContext* virtual_context) { |
| 127 if (virtual_gl_api_) | 131 if (virtual_gl_api_) |
| 128 virtual_gl_api_->OnDestroyVirtualContext(virtual_context); | 132 virtual_gl_api_->OnDestroyVirtualContext(virtual_context); |
| 129 } | 133 } |
| 130 | 134 |
| 131 void GLContext::SetRealGLApi() { | 135 void GLContext::SetRealGLApi() { |
| 132 SetGLToRealGLApi(); | 136 SetGLToRealGLApi(); |
| 133 } | 137 } |
| 134 | 138 |
| 135 } // namespace gfx | 139 } // namespace gfx |
| OLD | NEW |