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/callback.h" | 10 #include "base/callback.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 | 33 |
34 // (Re)create the surface. TODO(apatrick): This is an ugly hack to allow the | 34 // (Re)create the surface. TODO(apatrick): This is an ugly hack to allow the |
35 // EGL surface associated to be recreated without destroying the associated | 35 // EGL surface associated to be recreated without destroying the associated |
36 // context. The implementation of this function for other GLSurface derived | 36 // context. The implementation of this function for other GLSurface derived |
37 // classes is in a pending changelist. | 37 // classes is in a pending changelist. |
38 virtual bool Initialize(); | 38 virtual bool Initialize(); |
39 | 39 |
40 // Destroys the surface. | 40 // Destroys the surface. |
41 virtual void Destroy() = 0; | 41 virtual void Destroy() = 0; |
42 | 42 |
43 // Destroys the surface and terminates its underlying display. This must be | |
44 // the last surface which uses the display. | |
45 virtual void DestroyAndTerminateDisplay(); | |
46 | |
47 virtual bool Resize(const gfx::Size& size); | 43 virtual bool Resize(const gfx::Size& size); |
48 | 44 |
49 // Recreate the surface without changing the size. | 45 // Recreate the surface without changing the size. |
50 virtual bool Recreate(); | 46 virtual bool Recreate(); |
51 | 47 |
52 // Unschedule the GpuScheduler and return true to abort the processing of | 48 // Unschedule the GpuScheduler and return true to abort the processing of |
53 // a GL draw call to this surface and defer it until the GpuScheduler is | 49 // a GL draw call to this surface and defer it until the GpuScheduler is |
54 // rescheduled. | 50 // rescheduled. |
55 virtual bool DeferDraws(); | 51 virtual bool DeferDraws(); |
56 | 52 |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 | 230 |
235 private: | 231 private: |
236 scoped_refptr<GLSurface> surface_; | 232 scoped_refptr<GLSurface> surface_; |
237 | 233 |
238 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); | 234 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); |
239 }; | 235 }; |
240 | 236 |
241 } // namespace gfx | 237 } // namespace gfx |
242 | 238 |
243 #endif // UI_GL_GL_SURFACE_H_ | 239 #endif // UI_GL_GL_SURFACE_H_ |
OLD | NEW |