| 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 <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 130 |
| 131 // Returns the GL version string. The context must be current. | 131 // Returns the GL version string. The context must be current. |
| 132 virtual std::string GetGLVersion(); | 132 virtual std::string GetGLVersion(); |
| 133 | 133 |
| 134 // Returns the GL renderer string. The context must be current. | 134 // Returns the GL renderer string. The context must be current. |
| 135 virtual std::string GetGLRenderer(); | 135 virtual std::string GetGLRenderer(); |
| 136 | 136 |
| 137 // Returns a helper structure to convert YUV textures to RGB textures. | 137 // Returns a helper structure to convert YUV textures to RGB textures. |
| 138 virtual YUVToRGBConverter* GetYUVToRGBConverter(); | 138 virtual YUVToRGBConverter* GetYUVToRGBConverter(); |
| 139 | 139 |
| 140 virtual void SetPerformancePreference(GpuPerformancePreference pref); |
| 141 |
| 140 protected: | 142 protected: |
| 141 virtual ~GLContext(); | 143 virtual ~GLContext(); |
| 142 | 144 |
| 143 // Will release the current context when going out of scope, unless canceled. | 145 // Will release the current context when going out of scope, unless canceled. |
| 144 class ScopedReleaseCurrent { | 146 class ScopedReleaseCurrent { |
| 145 public: | 147 public: |
| 146 ScopedReleaseCurrent(); | 148 ScopedReleaseCurrent(); |
| 147 ~ScopedReleaseCurrent(); | 149 ~ScopedReleaseCurrent(); |
| 148 | 150 |
| 149 void Cancel(); | 151 void Cancel(); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 // scoped_refptr containing the initialized GLContext or nullptr if | 205 // scoped_refptr containing the initialized GLContext or nullptr if |
| 204 // initialization fails. | 206 // initialization fails. |
| 205 GL_EXPORT scoped_refptr<GLContext> InitializeGLContext( | 207 GL_EXPORT scoped_refptr<GLContext> InitializeGLContext( |
| 206 scoped_refptr<GLContext> context, | 208 scoped_refptr<GLContext> context, |
| 207 GLSurface* compatible_surface, | 209 GLSurface* compatible_surface, |
| 208 const GLContextAttribs& attribs); | 210 const GLContextAttribs& attribs); |
| 209 | 211 |
| 210 } // namespace gl | 212 } // namespace gl |
| 211 | 213 |
| 212 #endif // UI_GL_GL_CONTEXT_H_ | 214 #endif // UI_GL_GL_CONTEXT_H_ |
| OLD | NEW |