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 |
| 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 | 196 |
193 private: | 197 private: |
194 scoped_refptr<GLSurface> surface_; | 198 scoped_refptr<GLSurface> surface_; |
195 | 199 |
196 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); | 200 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); |
197 }; | 201 }; |
198 | 202 |
199 } // namespace gfx | 203 } // namespace gfx |
200 | 204 |
201 #endif // UI_GL_GL_SURFACE_H_ | 205 #endif // UI_GL_GL_SURFACE_H_ |
OLD | NEW |