| 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_SURFACE_H_ | 5 #ifndef UI_GL_GL_SURFACE_H_ |
| 6 #define UI_GL_GL_SURFACE_H_ | 6 #define UI_GL_GL_SURFACE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 // Create a GL surface that renders directly to a view. | 155 // Create a GL surface that renders directly to a view. |
| 156 static scoped_refptr<GLSurface> CreateViewGLSurface( | 156 static scoped_refptr<GLSurface> CreateViewGLSurface( |
| 157 gfx::AcceleratedWidget window); | 157 gfx::AcceleratedWidget window); |
| 158 | 158 |
| 159 // Create a GL surface used for offscreen rendering. | 159 // Create a GL surface used for offscreen rendering. |
| 160 static scoped_refptr<GLSurface> CreateOffscreenGLSurface( | 160 static scoped_refptr<GLSurface> CreateOffscreenGLSurface( |
| 161 const gfx::Size& size); | 161 const gfx::Size& size); |
| 162 | 162 |
| 163 static GLSurface* GetCurrent(); | 163 static GLSurface* GetCurrent(); |
| 164 | 164 |
| 165 // Called when the swap interval for the associated context changes. |
| 166 virtual void OnSetSwapInterval(int interval); |
| 167 |
| 165 protected: | 168 protected: |
| 166 virtual ~GLSurface(); | 169 virtual ~GLSurface(); |
| 167 static bool InitializeOneOffImplementation(GLImplementation impl, | 170 static bool InitializeOneOffImplementation(GLImplementation impl, |
| 168 bool fallback_to_osmesa, | 171 bool fallback_to_osmesa, |
| 169 bool gpu_service_logging, | 172 bool gpu_service_logging, |
| 170 bool disable_gl_drawing); | 173 bool disable_gl_drawing); |
| 171 static bool InitializeOneOffInternal(); | 174 static bool InitializeOneOffInternal(); |
| 172 static void SetCurrent(GLSurface* surface); | 175 static void SetCurrent(GLSurface* surface); |
| 173 | 176 |
| 174 static bool ExtensionsContain(const char* extensions, const char* name); | 177 static bool ExtensionsContain(const char* extensions, const char* name); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 | 229 |
| 227 private: | 230 private: |
| 228 scoped_refptr<GLSurface> surface_; | 231 scoped_refptr<GLSurface> surface_; |
| 229 | 232 |
| 230 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); | 233 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); |
| 231 }; | 234 }; |
| 232 | 235 |
| 233 } // namespace gfx | 236 } // namespace gfx |
| 234 | 237 |
| 235 #endif // UI_GL_GL_SURFACE_H_ | 238 #endif // UI_GL_GL_SURFACE_H_ |
| OLD | NEW |