OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_COMPOSITOR_FRAME_SINK_SUPPORT_H_ | 5 #ifndef CC_SURFACES_COMPOSITOR_FRAME_SINK_SUPPORT_H_ |
6 #define CC_SURFACES_COMPOSITOR_FRAME_SINK_SUPPORT_H_ | 6 #define CC_SURFACES_COMPOSITOR_FRAME_SINK_SUPPORT_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <unordered_set> | 9 #include <unordered_set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 void EvictFrame(); | 50 void EvictFrame(); |
51 void SetNeedsBeginFrame(bool needs_begin_frame); | 51 void SetNeedsBeginFrame(bool needs_begin_frame); |
52 void BeginFrameDidNotSwap(const BeginFrameAck& ack); | 52 void BeginFrameDidNotSwap(const BeginFrameAck& ack); |
53 void SubmitCompositorFrame(const LocalSurfaceId& local_surface_id, | 53 void SubmitCompositorFrame(const LocalSurfaceId& local_surface_id, |
54 CompositorFrame frame); | 54 CompositorFrame frame); |
55 void RequestCopyOfSurface(std::unique_ptr<CopyOutputRequest> request); | 55 void RequestCopyOfSurface(std::unique_ptr<CopyOutputRequest> request); |
56 void ForceReclaimResources(); | 56 void ForceReclaimResources(); |
57 void ClaimTemporaryReference(const SurfaceId& surface_id); | 57 void ClaimTemporaryReference(const SurfaceId& surface_id); |
58 | 58 |
| 59 void RunDrawCallbacks(); |
| 60 |
59 private: | 61 private: |
60 // Update surface references with SurfaceManager for current CompositorFrame | 62 // Update surface references with SurfaceManager for current CompositorFrame |
61 // that has |local_surface_id|. UpdateReferences() must be called on | 63 // that has |local_surface_id|. UpdateReferences() must be called on |
62 // |reference_tracker_| before calling this. Will add and remove top-level | 64 // |reference_tracker_| before calling this. Will add and remove top-level |
63 // root references if |display_| is not null. | 65 // root references if |display_| is not null. |
64 void UpdateSurfaceReferences(const SurfaceId& last_surface_id, | 66 void UpdateSurfaceReferences(const SurfaceId& last_surface_id, |
65 const LocalSurfaceId& local_surface_id); | 67 const LocalSurfaceId& local_surface_id); |
66 | 68 |
67 void AddTopLevelRootReference(const SurfaceId& surface_id); | 69 void AddTopLevelRootReference(const SurfaceId& surface_id); |
68 void RemoveTopLevelRootReference(const SurfaceId& surface_id); | 70 void RemoveTopLevelRootReference(const SurfaceId& surface_id); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 const bool handles_frame_sink_id_invalidation_; | 131 const bool handles_frame_sink_id_invalidation_; |
130 | 132 |
131 base::WeakPtrFactory<CompositorFrameSinkSupport> weak_factory_; | 133 base::WeakPtrFactory<CompositorFrameSinkSupport> weak_factory_; |
132 | 134 |
133 DISALLOW_COPY_AND_ASSIGN(CompositorFrameSinkSupport); | 135 DISALLOW_COPY_AND_ASSIGN(CompositorFrameSinkSupport); |
134 }; | 136 }; |
135 | 137 |
136 } // namespace cc | 138 } // namespace cc |
137 | 139 |
138 #endif // CC_SURFACES_COMPOSITOR_FRAME_SINK_SUPPORT_H_ | 140 #endif // CC_SURFACES_COMPOSITOR_FRAME_SINK_SUPPORT_H_ |
OLD | NEW |