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 20 matching lines...) Expand all Loading... | |
31 | 31 |
32 // (Re)create the surface. TODO(apatrick): This is an ugly hack to allow the | 32 // (Re)create the surface. TODO(apatrick): This is an ugly hack to allow the |
33 // EGL surface associated to be recreated without destroying the associated | 33 // EGL surface associated to be recreated without destroying the associated |
34 // context. The implementation of this function for other GLSurface derived | 34 // context. The implementation of this function for other GLSurface derived |
35 // classes is in a pending changelist. | 35 // classes is in a pending changelist. |
36 virtual bool Initialize(); | 36 virtual bool Initialize(); |
37 | 37 |
38 // Destroys the surface. | 38 // Destroys the surface. |
39 virtual void Destroy() = 0; | 39 virtual void Destroy() = 0; |
40 | 40 |
41 // Destroys the surface and Terminates its underlying display. This must be | |
dcheng
2014/11/21 03:06:04
terminates.
GusFernandez
2014/11/21 19:13:56
Done.
| |
42 // the last surface which uses the display. | |
43 virtual void DestroyAndTerminateDisplay(); | |
44 | |
41 virtual bool Resize(const gfx::Size& size); | 45 virtual bool Resize(const gfx::Size& size); |
42 | 46 |
43 // Recreate the surface without changing the size. | 47 // Recreate the surface without changing the size. |
44 virtual bool Recreate(); | 48 virtual bool Recreate(); |
45 | 49 |
46 // Unschedule the GpuScheduler and return true to abort the processing of | 50 // Unschedule the GpuScheduler and return true to abort the processing of |
47 // a GL draw call to this surface and defer it until the GpuScheduler is | 51 // a GL draw call to this surface and defer it until the GpuScheduler is |
48 // rescheduled. | 52 // rescheduled. |
49 virtual bool DeferDraws(); | 53 virtual bool DeferDraws(); |
50 | 54 |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
194 | 198 |
195 private: | 199 private: |
196 scoped_refptr<GLSurface> surface_; | 200 scoped_refptr<GLSurface> surface_; |
197 | 201 |
198 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); | 202 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); |
199 }; | 203 }; |
200 | 204 |
201 } // namespace gfx | 205 } // namespace gfx |
202 | 206 |
203 #endif // UI_GL_GL_SURFACE_H_ | 207 #endif // UI_GL_GL_SURFACE_H_ |
OLD | NEW |