OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CC_SURFACES_SURFACE_H_ | 5 #ifndef CC_SURFACES_SURFACE_H_ |
6 #define CC_SURFACES_SURFACE_H_ | 6 #define CC_SURFACES_SURFACE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 | 60 |
61 // Returns the most recent frame that is eligible to be rendered. | 61 // Returns the most recent frame that is eligible to be rendered. |
62 // If the CompositorFrame's DelegateFrameData is null then there is | 62 // If the CompositorFrame's DelegateFrameData is null then there is |
63 // no eligible frame. | 63 // no eligible frame. |
64 const CompositorFrame& GetEligibleFrame(); | 64 const CompositorFrame& GetEligibleFrame(); |
65 | 65 |
66 // Returns a number that increments by 1 every time a new frame is enqueued. | 66 // Returns a number that increments by 1 every time a new frame is enqueued. |
67 int frame_index() const { return frame_index_; } | 67 int frame_index() const { return frame_index_; } |
68 | 68 |
69 void TakeLatencyInfo(std::vector<ui::LatencyInfo>* latency_info); | 69 void TakeLatencyInfo(std::vector<ui::LatencyInfo>* latency_info); |
70 void RunDrawCallbacks(SurfaceDrawStatus drawn); | 70 void RunDrawCallbacks(); |
71 | 71 |
72 base::WeakPtr<SurfaceFactory> factory() { return factory_; } | 72 base::WeakPtr<SurfaceFactory> factory() { return factory_; } |
73 | 73 |
74 // Add a SurfaceSequence that must be satisfied before the Surface is | 74 // Add a SurfaceSequence that must be satisfied before the Surface is |
75 // destroyed. | 75 // destroyed. |
76 void AddDestructionDependency(SurfaceSequence sequence); | 76 void AddDestructionDependency(SurfaceSequence sequence); |
77 | 77 |
78 // Satisfy all destruction dependencies that are contained in sequences, and | 78 // Satisfy all destruction dependencies that are contained in sequences, and |
79 // remove them from sequences. | 79 // remove them from sequences. |
80 void SatisfyDestructionDependencies( | 80 void SatisfyDestructionDependencies( |
(...skipping 30 matching lines...) Expand all Loading... |
111 std::vector<SurfaceId> referenced_surfaces_; | 111 std::vector<SurfaceId> referenced_surfaces_; |
112 | 112 |
113 DrawCallback draw_callback_; | 113 DrawCallback draw_callback_; |
114 | 114 |
115 DISALLOW_COPY_AND_ASSIGN(Surface); | 115 DISALLOW_COPY_AND_ASSIGN(Surface); |
116 }; | 116 }; |
117 | 117 |
118 } // namespace cc | 118 } // namespace cc |
119 | 119 |
120 #endif // CC_SURFACES_SURFACE_H_ | 120 #endif // CC_SURFACES_SURFACE_H_ |
OLD | NEW |