| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 92 |
| 93 // Get the GL pixel format of the surface, if available. | 93 // Get the GL pixel format of the surface, if available. |
| 94 virtual unsigned GetFormat(); | 94 virtual unsigned GetFormat(); |
| 95 | 95 |
| 96 // Get access to a helper providing time of recent refresh and period | 96 // Get access to a helper providing time of recent refresh and period |
| 97 // of screen refresh. If unavailable, returns NULL. | 97 // of screen refresh. If unavailable, returns NULL. |
| 98 virtual VSyncProvider* GetVSyncProvider(); | 98 virtual VSyncProvider* GetVSyncProvider(); |
| 99 | 99 |
| 100 // Create a GL surface that renders directly to a view. | 100 // Create a GL surface that renders directly to a view. |
| 101 static scoped_refptr<GLSurface> CreateViewGLSurface( | 101 static scoped_refptr<GLSurface> CreateViewGLSurface( |
| 102 bool software, | |
| 103 gfx::AcceleratedWidget window); | 102 gfx::AcceleratedWidget window); |
| 104 | 103 |
| 105 // Create a GL surface used for offscreen rendering. | 104 // Create a GL surface used for offscreen rendering. |
| 106 static scoped_refptr<GLSurface> CreateOffscreenGLSurface( | 105 static scoped_refptr<GLSurface> CreateOffscreenGLSurface( |
| 107 bool software, | |
| 108 const gfx::Size& size); | 106 const gfx::Size& size); |
| 109 | 107 |
| 110 static GLSurface* GetCurrent(); | 108 static GLSurface* GetCurrent(); |
| 111 | 109 |
| 112 protected: | 110 protected: |
| 113 virtual ~GLSurface(); | 111 virtual ~GLSurface(); |
| 114 static bool InitializeOneOffInternal(); | 112 static bool InitializeOneOffInternal(); |
| 115 static void SetCurrent(GLSurface* surface); | 113 static void SetCurrent(GLSurface* surface); |
| 116 | 114 |
| 117 static bool ExtensionsContain(const char* extensions, const char* name); | 115 static bool ExtensionsContain(const char* extensions, const char* name); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 155 |
| 158 private: | 156 private: |
| 159 scoped_refptr<GLSurface> surface_; | 157 scoped_refptr<GLSurface> surface_; |
| 160 | 158 |
| 161 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); | 159 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); |
| 162 }; | 160 }; |
| 163 | 161 |
| 164 } // namespace gfx | 162 } // namespace gfx |
| 165 | 163 |
| 166 #endif // UI_GL_GL_SURFACE_H_ | 164 #endif // UI_GL_GL_SURFACE_H_ |
| OLD | NEW |