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 | |
139 protected: | 137 protected: |
140 virtual ~GLSurface(); | 138 virtual ~GLSurface(); |
141 static bool InitializeOneOffImplementation(GLImplementation impl, | 139 static bool InitializeOneOffImplementation(GLImplementation impl, |
142 bool fallback_to_osmesa, | 140 bool fallback_to_osmesa, |
143 bool gpu_service_logging, | 141 bool gpu_service_logging, |
144 bool disable_gl_drawing); | 142 bool disable_gl_drawing); |
145 static bool InitializeOneOffInternal(); | 143 static bool InitializeOneOffInternal(); |
146 static void SetCurrent(GLSurface* surface); | 144 static void SetCurrent(GLSurface* surface); |
147 | 145 |
148 static bool ExtensionsContain(const char* extensions, const char* name); | 146 static bool ExtensionsContain(const char* extensions, const char* name); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 | 192 |
195 private: | 193 private: |
196 scoped_refptr<GLSurface> surface_; | 194 scoped_refptr<GLSurface> surface_; |
197 | 195 |
198 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); | 196 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); |
199 }; | 197 }; |
200 | 198 |
201 } // namespace gfx | 199 } // namespace gfx |
202 | 200 |
203 #endif // UI_GL_GL_SURFACE_H_ | 201 #endif // UI_GL_GL_SURFACE_H_ |
OLD | NEW |