| 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 #ifndef UI_GL_GL_CONTEXT_H_ | 5 #ifndef UI_GL_GL_CONTEXT_H_ |
| 6 #define UI_GL_GL_CONTEXT_H_ | 6 #define UI_GL_GL_CONTEXT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 GLShareGroup* share_group, | 63 GLShareGroup* share_group, |
| 64 GLSurface* compatible_surface, | 64 GLSurface* compatible_surface, |
| 65 GpuPreference gpu_preference); | 65 GpuPreference gpu_preference); |
| 66 | 66 |
| 67 static bool LosesAllContextsOnContextLost(); | 67 static bool LosesAllContextsOnContextLost(); |
| 68 | 68 |
| 69 static bool SupportsDualGpus(); | 69 static bool SupportsDualGpus(); |
| 70 | 70 |
| 71 static GLContext* GetCurrent(); | 71 static GLContext* GetCurrent(); |
| 72 | 72 |
| 73 virtual bool WasAllocatedUsingARBRobustness(); | 73 virtual bool WasAllocatedUsingRobustnessExtension(); |
| 74 | 74 |
| 75 protected: | 75 protected: |
| 76 virtual ~GLContext(); | 76 virtual ~GLContext(); |
| 77 static void SetCurrent(GLContext* context, GLSurface* surface); | 77 static void SetCurrent(GLContext* context, GLSurface* surface); |
| 78 | 78 |
| 79 // Initialize function pointers to extension functions in the GL | 79 // Initialize function pointers to extension functions in the GL |
| 80 // implementation. Should be called immediately after this context is made | 80 // implementation. Should be called immediately after this context is made |
| 81 // current. | 81 // current. |
| 82 bool InitializeExtensionBindings(); | 82 bool InitializeExtensionBindings(); |
| 83 | 83 |
| 84 private: | 84 private: |
| 85 friend class base::RefCounted<GLContext>; | 85 friend class base::RefCounted<GLContext>; |
| 86 | 86 |
| 87 scoped_refptr<GLShareGroup> share_group_; | 87 scoped_refptr<GLShareGroup> share_group_; |
| 88 | 88 |
| 89 DISALLOW_COPY_AND_ASSIGN(GLContext); | 89 DISALLOW_COPY_AND_ASSIGN(GLContext); |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 } // namespace gfx | 92 } // namespace gfx |
| 93 | 93 |
| 94 #endif // UI_GL_GL_CONTEXT_H_ | 94 #endif // UI_GL_GL_CONTEXT_H_ |
| OLD | NEW |