| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/threading/thread_local.h" | 9 #include "base/threading/thread_local.h" |
| 10 #include "ui/gfx/gl/gl_context.h" | 10 #include "ui/gfx/gl/gl_context.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 | 74 |
| 75 void GLContext::SetCurrent(GLContext* context, GLSurface* surface) { | 75 void GLContext::SetCurrent(GLContext* context, GLSurface* surface) { |
| 76 current_context_.Set(context); | 76 current_context_.Set(context); |
| 77 GLSurface::SetCurrent(surface); | 77 GLSurface::SetCurrent(surface); |
| 78 } | 78 } |
| 79 | 79 |
| 80 bool GLContext::WasAllocatedUsingARBRobustness() { | 80 bool GLContext::WasAllocatedUsingARBRobustness() { |
| 81 return false; | 81 return false; |
| 82 } | 82 } |
| 83 | 83 |
| 84 bool GLContext::InitializeExtensionBindings() { |
| 85 DCHECK(IsCurrent(NULL)); |
| 86 static bool initialized = false; |
| 87 if (initialized) |
| 88 return initialized; |
| 89 initialized = InitializeGLExtensionBindings(GetGLImplementation(), this); |
| 90 if (!initialized) |
| 91 LOG(ERROR) << "Could not initialize extension bindings."; |
| 92 return initialized; |
| 93 } |
| 94 |
| 84 } // namespace gfx | 95 } // namespace gfx |
| OLD | NEW |