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/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 // Create a GL surface that renders directly to a view. | 127 // Create a GL surface that renders directly to a view. |
128 static scoped_refptr<GLSurface> CreateViewGLSurface( | 128 static scoped_refptr<GLSurface> CreateViewGLSurface( |
129 gfx::AcceleratedWidget window); | 129 gfx::AcceleratedWidget window); |
130 | 130 |
131 // Create a GL surface used for offscreen rendering. | 131 // Create a GL surface used for offscreen rendering. |
132 static scoped_refptr<GLSurface> CreateOffscreenGLSurface( | 132 static scoped_refptr<GLSurface> CreateOffscreenGLSurface( |
133 const gfx::Size& size); | 133 const gfx::Size& size); |
134 | 134 |
135 static GLSurface* GetCurrent(); | 135 static GLSurface* GetCurrent(); |
136 | 136 |
| 137 virtual void SetSwapInterval(int interval); |
| 138 |
137 protected: | 139 protected: |
138 virtual ~GLSurface(); | 140 virtual ~GLSurface(); |
139 static bool InitializeOneOffImplementation(GLImplementation impl, | 141 static bool InitializeOneOffImplementation(GLImplementation impl, |
140 bool fallback_to_osmesa, | 142 bool fallback_to_osmesa, |
141 bool gpu_service_logging, | 143 bool gpu_service_logging, |
142 bool disable_gl_drawing); | 144 bool disable_gl_drawing); |
143 static bool InitializeOneOffInternal(); | 145 static bool InitializeOneOffInternal(); |
144 static void SetCurrent(GLSurface* surface); | 146 static void SetCurrent(GLSurface* surface); |
145 | 147 |
146 static bool ExtensionsContain(const char* extensions, const char* name); | 148 static bool ExtensionsContain(const char* extensions, const char* name); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 | 194 |
193 private: | 195 private: |
194 scoped_refptr<GLSurface> surface_; | 196 scoped_refptr<GLSurface> surface_; |
195 | 197 |
196 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); | 198 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); |
197 }; | 199 }; |
198 | 200 |
199 } // namespace gfx | 201 } // namespace gfx |
200 | 202 |
201 #endif // UI_GL_GL_SURFACE_H_ | 203 #endif // UI_GL_GL_SURFACE_H_ |
OLD | NEW |