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 12 matching lines...) Expand all Loading... | |
23 class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> { | 23 class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> { |
24 public: | 24 public: |
25 GLSurface(); | 25 GLSurface(); |
26 | 26 |
27 // (Re)create the surface. TODO(apatrick): This is an ugly hack to allow the | 27 // (Re)create the surface. TODO(apatrick): This is an ugly hack to allow the |
28 // EGL surface associated to be recreated without destroying the associated | 28 // EGL surface associated to be recreated without destroying the associated |
29 // context. The implementation of this function for other GLSurface derived | 29 // context. The implementation of this function for other GLSurface derived |
30 // classes is in a pending changelist. | 30 // classes is in a pending changelist. |
31 virtual bool Initialize(); | 31 virtual bool Initialize(); |
32 | 32 |
33 // Identical to Initialize but using the provided VSyncProvider if the surface | |
34 // type (EGL only at present) supports an injected VSyncProvider instance. | |
35 virtual bool Initialize(VSyncProvider* syncProvider); | |
piman
2013/05/18 01:47:19
Could we move this to the NativeViewGLSurfaceEGL c
rjkroege
2013/05/21 17:36:28
Done.
| |
36 | |
33 // Destroys the surface. | 37 // Destroys the surface. |
34 virtual void Destroy() = 0; | 38 virtual void Destroy() = 0; |
35 | 39 |
36 virtual bool Resize(const gfx::Size& size); | 40 virtual bool Resize(const gfx::Size& size); |
37 | 41 |
38 // Recreate the surface without changing the size. | 42 // Recreate the surface without changing the size. |
39 virtual bool Recreate(); | 43 virtual bool Recreate(); |
40 | 44 |
41 // Unschedule the GpuScheduler and return true to abort the processing of | 45 // Unschedule the GpuScheduler and return true to abort the processing of |
42 // a GL draw call to this surface and defer it until the GpuScheduler is | 46 // a GL draw call to this surface and defer it until the GpuScheduler is |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
157 | 161 |
158 private: | 162 private: |
159 scoped_refptr<GLSurface> surface_; | 163 scoped_refptr<GLSurface> surface_; |
160 | 164 |
161 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); | 165 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); |
162 }; | 166 }; |
163 | 167 |
164 } // namespace gfx | 168 } // namespace gfx |
165 | 169 |
166 #endif // UI_GL_GL_SURFACE_H_ | 170 #endif // UI_GL_GL_SURFACE_H_ |
OLD | NEW |