| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 // Get the platfrom specific configuration for this surface, if available. | 95 // Get the platfrom specific configuration for this surface, if available. |
| 96 virtual void* GetConfig(); | 96 virtual void* GetConfig(); |
| 97 | 97 |
| 98 // Get the GL pixel format of the surface, if available. | 98 // Get the GL pixel format of the surface, if available. |
| 99 virtual unsigned GetFormat(); | 99 virtual unsigned GetFormat(); |
| 100 | 100 |
| 101 // Get access to a helper providing time of recent refresh and period | 101 // Get access to a helper providing time of recent refresh and period |
| 102 // of screen refresh. If unavailable, returns NULL. | 102 // of screen refresh. If unavailable, returns NULL. |
| 103 virtual VSyncProvider* GetVSyncProvider(); | 103 virtual VSyncProvider* GetVSyncProvider(); |
| 104 | 104 |
| 105 // Sets the maximum number of pending frames. |
| 106 // Passing '0' implies no limit. |
| 107 virtual void SetMaximumFrameLatency(unsigned int frames); |
| 108 |
| 105 // Create a GL surface that renders directly to a view. | 109 // Create a GL surface that renders directly to a view. |
| 106 static scoped_refptr<GLSurface> CreateViewGLSurface( | 110 static scoped_refptr<GLSurface> CreateViewGLSurface( |
| 107 bool software, | 111 bool software, |
| 108 gfx::AcceleratedWidget window); | 112 gfx::AcceleratedWidget window); |
| 109 | 113 |
| 110 // Create a GL surface used for offscreen rendering. | 114 // Create a GL surface used for offscreen rendering. |
| 111 static scoped_refptr<GLSurface> CreateOffscreenGLSurface( | 115 static scoped_refptr<GLSurface> CreateOffscreenGLSurface( |
| 112 bool software, | 116 bool software, |
| 113 const gfx::Size& size); | 117 const gfx::Size& size); |
| 114 | 118 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 165 |
| 162 private: | 166 private: |
| 163 scoped_refptr<GLSurface> surface_; | 167 scoped_refptr<GLSurface> surface_; |
| 164 | 168 |
| 165 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); | 169 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); |
| 166 }; | 170 }; |
| 167 | 171 |
| 168 } // namespace gfx | 172 } // namespace gfx |
| 169 | 173 |
| 170 #endif // UI_GL_GL_SURFACE_H_ | 174 #endif // UI_GL_GL_SURFACE_H_ |
| OLD | NEW |