OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_ | 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_ |
6 #define GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_ | 6 #define GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "ui/gfx/overlay_transform.h" | 9 #include "ui/gfx/overlay_transform.h" |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 virtual void SetSurfaceVisible(bool visible) = 0; | 36 virtual void SetSurfaceVisible(bool visible) = 0; |
37 | 37 |
38 // Indicates whether the context should aggressively free allocated resources. | 38 // Indicates whether the context should aggressively free allocated resources. |
39 // If set to true, the context will purge all temporary resources when | 39 // If set to true, the context will purge all temporary resources when |
40 // flushed. | 40 // flushed. |
41 virtual void SetAggressivelyFreeResources( | 41 virtual void SetAggressivelyFreeResources( |
42 bool aggressively_free_resources) = 0; | 42 bool aggressively_free_resources) = 0; |
43 | 43 |
44 virtual void Swap() = 0; | 44 virtual void Swap() = 0; |
45 virtual void PartialSwapBuffers(const gfx::Rect& sub_buffer) = 0; | 45 virtual void PartialSwapBuffers(const gfx::Rect& sub_buffer) = 0; |
| 46 virtual void CommitOverlayPlanes() = 0; |
46 | 47 |
47 // Schedule a texture to be presented as an overlay synchronously with the | 48 // Schedule a texture to be presented as an overlay synchronously with the |
48 // primary surface during the next buffer swap. | 49 // primary surface during the next buffer swap or CommitOverlayPlanes. |
49 // This method is not stateful and needs to be re-scheduled every frame. | 50 // This method is not stateful and needs to be re-scheduled every frame. |
50 virtual void ScheduleOverlayPlane(int plane_z_order, | 51 virtual void ScheduleOverlayPlane(int plane_z_order, |
51 gfx::OverlayTransform plane_transform, | 52 gfx::OverlayTransform plane_transform, |
52 unsigned overlay_texture_id, | 53 unsigned overlay_texture_id, |
53 const gfx::Rect& display_bounds, | 54 const gfx::Rect& display_bounds, |
54 const gfx::RectF& uv_rect) = 0; | 55 const gfx::RectF& uv_rect) = 0; |
55 | 56 |
56 virtual uint32 InsertFutureSyncPointCHROMIUM() = 0; | 57 virtual uint32 InsertFutureSyncPointCHROMIUM() = 0; |
57 virtual void RetireSyncPointCHROMIUM(uint32 sync_point) = 0; | 58 virtual void RetireSyncPointCHROMIUM(uint32 sync_point) = 0; |
58 | 59 |
59 // Returns an ID that can be used to globally identify the share group that | 60 // Returns an ID that can be used to globally identify the share group that |
60 // this context's resources belong to. | 61 // this context's resources belong to. |
61 virtual uint64_t ShareGroupTracingGUID() const = 0; | 62 virtual uint64_t ShareGroupTracingGUID() const = 0; |
62 | 63 |
63 protected: | 64 protected: |
64 ContextSupport() {} | 65 ContextSupport() {} |
65 virtual ~ContextSupport() {} | 66 virtual ~ContextSupport() {} |
66 }; | 67 }; |
67 | 68 |
68 } | 69 } |
69 | 70 |
70 #endif // GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_ | 71 #endif // GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_ |
OLD | NEW |