| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 GLImage* image, | 149 GLImage* image, |
| 150 const Rect& bounds_rect, | 150 const Rect& bounds_rect, |
| 151 const RectF& crop_rect); | 151 const RectF& crop_rect); |
| 152 | 152 |
| 153 virtual bool IsSurfaceless() const; | 153 virtual bool IsSurfaceless() const; |
| 154 | 154 |
| 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 #ifdef USE_OZONE |
| 160 // Create a GL surface that renders directly into a window with surfaceless |
| 161 // semantics - there is no default framebuffer and the primary surface must |
| 162 // be presented as an overlay. |
| 163 static scoped_refptr<GLSurface> CreateSurfacelessViewGLSurface( |
| 164 gfx::AcceleratedWidget window); |
| 165 #endif // USE_OZONE |
| 166 |
| 159 // Create a GL surface used for offscreen rendering. | 167 // Create a GL surface used for offscreen rendering. |
| 160 static scoped_refptr<GLSurface> CreateOffscreenGLSurface( | 168 static scoped_refptr<GLSurface> CreateOffscreenGLSurface( |
| 161 const gfx::Size& size); | 169 const gfx::Size& size); |
| 162 | 170 |
| 163 static GLSurface* GetCurrent(); | 171 static GLSurface* GetCurrent(); |
| 164 | 172 |
| 165 // Called when the swap interval for the associated context changes. | 173 // Called when the swap interval for the associated context changes. |
| 166 virtual void OnSetSwapInterval(int interval); | 174 virtual void OnSetSwapInterval(int interval); |
| 167 | 175 |
| 168 protected: | 176 protected: |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 | 237 |
| 230 private: | 238 private: |
| 231 scoped_refptr<GLSurface> surface_; | 239 scoped_refptr<GLSurface> surface_; |
| 232 | 240 |
| 233 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); | 241 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); |
| 234 }; | 242 }; |
| 235 | 243 |
| 236 } // namespace gfx | 244 } // namespace gfx |
| 237 | 245 |
| 238 #endif // UI_GL_GL_SURFACE_H_ | 246 #endif // UI_GL_GL_SURFACE_H_ |
| OLD | NEW |