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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 std::string delimited_name(name); | 62 std::string delimited_name(name); |
63 delimited_name += " "; | 63 delimited_name += " "; |
64 | 64 |
65 return extensions.find(delimited_name) != std::string::npos; | 65 return extensions.find(delimited_name) != std::string::npos; |
66 } | 66 } |
67 | 67 |
68 GLShareGroup* GLContext::share_group() { | 68 GLShareGroup* GLContext::share_group() { |
69 return share_group_.get(); | 69 return share_group_.get(); |
70 } | 70 } |
71 | 71 |
72 bool GLContext::LosesAllContextsOnContextLost() | 72 bool GLContext::LosesAllContextsOnContextLost() { |
73 { | |
74 switch (GetGLImplementation()) { | 73 switch (GetGLImplementation()) { |
75 case kGLImplementationDesktopGL: | 74 case kGLImplementationDesktopGL: |
76 return false; | 75 return false; |
77 case kGLImplementationEGLGLES2: | 76 case kGLImplementationEGLGLES2: |
78 return true; | 77 return true; |
79 case kGLImplementationOSMesaGL: | 78 case kGLImplementationOSMesaGL: |
80 return false; | 79 return false; |
81 case kGLImplementationMockGL: | 80 case kGLImplementationMockGL: |
82 return false; | 81 return false; |
83 default: | 82 default: |
(...skipping 20 matching lines...) Expand all Loading... |
104 static bool initialized = false; | 103 static bool initialized = false; |
105 if (initialized) | 104 if (initialized) |
106 return initialized; | 105 return initialized; |
107 initialized = InitializeGLExtensionBindings(GetGLImplementation(), this); | 106 initialized = InitializeGLExtensionBindings(GetGLImplementation(), this); |
108 if (!initialized) | 107 if (!initialized) |
109 LOG(ERROR) << "Could not initialize extension bindings."; | 108 LOG(ERROR) << "Could not initialize extension bindings."; |
110 return initialized; | 109 return initialized; |
111 } | 110 } |
112 | 111 |
113 } // namespace gfx | 112 } // namespace gfx |
OLD | NEW |