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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 74 |
75 GLContext* GLContext::GetCurrent() { | 75 GLContext* GLContext::GetCurrent() { |
76 return current_context_.Pointer()->Get(); | 76 return current_context_.Pointer()->Get(); |
77 } | 77 } |
78 | 78 |
79 void GLContext::SetCurrent(GLContext* context, GLSurface* surface) { | 79 void GLContext::SetCurrent(GLContext* context, GLSurface* surface) { |
80 current_context_.Pointer()->Set(context); | 80 current_context_.Pointer()->Set(context); |
81 GLSurface::SetCurrent(surface); | 81 GLSurface::SetCurrent(surface); |
82 } | 82 } |
83 | 83 |
84 bool GLContext::WasAllocatedUsingARBRobustness() { | 84 bool GLContext::WasAllocatedUsingRobustnessExtension() { |
85 return false; | 85 return false; |
86 } | 86 } |
87 | 87 |
88 bool GLContext::InitializeExtensionBindings() { | 88 bool GLContext::InitializeExtensionBindings() { |
89 DCHECK(IsCurrent(NULL)); | 89 DCHECK(IsCurrent(NULL)); |
90 static bool initialized = false; | 90 static bool initialized = false; |
91 if (initialized) | 91 if (initialized) |
92 return initialized; | 92 return initialized; |
93 initialized = InitializeGLExtensionBindings(GetGLImplementation(), this); | 93 initialized = InitializeGLExtensionBindings(GetGLImplementation(), this); |
94 if (!initialized) | 94 if (!initialized) |
95 LOG(ERROR) << "Could not initialize extension bindings."; | 95 LOG(ERROR) << "Could not initialize extension bindings."; |
96 return initialized; | 96 return initialized; |
97 } | 97 } |
98 | 98 |
99 } // namespace gfx | 99 } // namespace gfx |
OLD | NEW |