| 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 "ui/gl/gl_implementation.h" | 5 #include "ui/gl/gl_implementation.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/at_exit.h" | 10 #include "base/at_exit.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 GLXApi* g_current_glx_context; | 62 GLXApi* g_current_glx_context; |
| 63 | 63 |
| 64 #elif defined(USE_OZONE) | 64 #elif defined(USE_OZONE) |
| 65 | 65 |
| 66 EGLApi* g_current_egl_context; | 66 EGLApi* g_current_egl_context; |
| 67 | 67 |
| 68 #elif defined(OS_ANDROID) | 68 #elif defined(OS_ANDROID) |
| 69 | 69 |
| 70 EGLApi* g_current_egl_context; | 70 EGLApi* g_current_egl_context; |
| 71 | 71 |
| 72 #elif defined(CHROMECAST_BUILD) |
| 73 |
| 74 EGLApi* g_current_egl_context; |
| 75 |
| 72 #endif | 76 #endif |
| 73 | 77 |
| 74 GLImplementation GetNamedGLImplementation(const std::string& name) { | 78 GLImplementation GetNamedGLImplementation(const std::string& name) { |
| 75 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kGLImplementationNamePairs); ++i) { | 79 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kGLImplementationNamePairs); ++i) { |
| 76 if (name == kGLImplementationNamePairs[i].name) | 80 if (name == kGLImplementationNamePairs[i].name) |
| 77 return kGLImplementationNamePairs[i].implementation; | 81 return kGLImplementationNamePairs[i].implementation; |
| 78 } | 82 } |
| 79 | 83 |
| 80 return kGLImplementationNone; | 84 return kGLImplementationNone; |
| 81 } | 85 } |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 } | 162 } |
| 159 | 163 |
| 160 DisableNullDrawGLBindings::~DisableNullDrawGLBindings() { | 164 DisableNullDrawGLBindings::~DisableNullDrawGLBindings() { |
| 161 SetNullDrawGLBindingsEnabledGL(initial_enabled_); | 165 SetNullDrawGLBindingsEnabledGL(initial_enabled_); |
| 162 } | 166 } |
| 163 | 167 |
| 164 GLWindowSystemBindingInfo::GLWindowSystemBindingInfo() | 168 GLWindowSystemBindingInfo::GLWindowSystemBindingInfo() |
| 165 : direct_rendering(true) {} | 169 : direct_rendering(true) {} |
| 166 | 170 |
| 167 } // namespace gfx | 171 } // namespace gfx |
| OLD | NEW |