| 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/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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 return share_group_.get(); | 69 return share_group_.get(); |
| 70 } | 70 } |
| 71 | 71 |
| 72 bool GLContext::LosesAllContextsOnContextLost() { | 72 bool GLContext::LosesAllContextsOnContextLost() { |
| 73 switch (GetGLImplementation()) { | 73 switch (GetGLImplementation()) { |
| 74 case kGLImplementationDesktopGL: | 74 case kGLImplementationDesktopGL: |
| 75 return false; | 75 return false; |
| 76 case kGLImplementationEGLGLES2: | 76 case kGLImplementationEGLGLES2: |
| 77 return true; | 77 return true; |
| 78 case kGLImplementationOSMesaGL: | 78 case kGLImplementationOSMesaGL: |
| 79 case kGLImplementationAppleGL: |
| 79 return false; | 80 return false; |
| 80 case kGLImplementationMockGL: | 81 case kGLImplementationMockGL: |
| 81 return false; | 82 return false; |
| 82 default: | 83 default: |
| 83 NOTREACHED(); | 84 NOTREACHED(); |
| 84 return true; | 85 return true; |
| 85 } | 86 } |
| 86 } | 87 } |
| 87 | 88 |
| 88 GLContext* GLContext::GetCurrent() { | 89 GLContext* GLContext::GetCurrent() { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 103 static bool initialized = false; | 104 static bool initialized = false; |
| 104 if (initialized) | 105 if (initialized) |
| 105 return initialized; | 106 return initialized; |
| 106 initialized = InitializeGLExtensionBindings(GetGLImplementation(), this); | 107 initialized = InitializeGLExtensionBindings(GetGLImplementation(), this); |
| 107 if (!initialized) | 108 if (!initialized) |
| 108 LOG(ERROR) << "Could not initialize extension bindings."; | 109 LOG(ERROR) << "Could not initialize extension bindings."; |
| 109 return initialized; | 110 return initialized; |
| 110 } | 111 } |
| 111 | 112 |
| 112 } // namespace gfx | 113 } // namespace gfx |
| OLD | NEW |