Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Side by Side Diff: cc/surfaces/surface_manager.h

Issue 2854163003: [cc] Plumb BeginFrameAcks through SurfaceManager to DisplayScheduler. (Closed)
Patch Set: track state in DisplayScheduler rather than Surface Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_MANAGER_H_ 5 #ifndef CC_SURFACES_SURFACE_MANAGER_H_
6 #define CC_SURFACES_SURFACE_MANAGER_H_ 6 #define CC_SURFACES_SURFACE_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 17 matching lines...) Expand all
28 #include "cc/surfaces/surface_reference_factory.h" 28 #include "cc/surfaces/surface_reference_factory.h"
29 #include "cc/surfaces/surface_sequence.h" 29 #include "cc/surfaces/surface_sequence.h"
30 #include "cc/surfaces/surfaces_export.h" 30 #include "cc/surfaces/surfaces_export.h"
31 31
32 #if DCHECK_IS_ON() 32 #if DCHECK_IS_ON()
33 #include <iosfwd> 33 #include <iosfwd>
34 #include <string> 34 #include <string>
35 #endif 35 #endif
36 36
37 namespace cc { 37 namespace cc {
38
39 struct BeginFrameAck;
40 struct BeginFrameArgs;
38 class BeginFrameSource; 41 class BeginFrameSource;
39 class CompositorFrame; 42 class CompositorFrame;
40 class FrameSinkManagerClient; 43 class FrameSinkManagerClient;
41 class Surface; 44 class Surface;
42 45
43 namespace test { 46 namespace test {
44 class SurfaceSynchronizationTest; 47 class SurfaceSynchronizationTest;
45 } 48 }
46 49
47 class CC_SURFACES_EXPORT SurfaceManager { 50 class CC_SURFACES_EXPORT SurfaceManager {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // Called when the dependencies of a pending CompositorFrame within |surface| 97 // Called when the dependencies of a pending CompositorFrame within |surface|
95 // has changed. 98 // has changed.
96 void SurfaceDependenciesChanged( 99 void SurfaceDependenciesChanged(
97 Surface* surface, 100 Surface* surface,
98 const base::flat_set<SurfaceId>& added_dependencies, 101 const base::flat_set<SurfaceId>& added_dependencies,
99 const base::flat_set<SurfaceId>& removed_dependencies); 102 const base::flat_set<SurfaceId>& removed_dependencies);
100 103
101 // Called when |surface| is being destroyed. 104 // Called when |surface| is being destroyed.
102 void SurfaceDiscarded(Surface* surface); 105 void SurfaceDiscarded(Surface* surface);
103 106
107 // Called when a Surface's CompositorFrame producer has received a BeginFrame.
108 void SurfaceReceivedBeginFrame(const SurfaceId& surface_id,
109 const BeginFrameArgs& args);
110
111 // Called when a Surface's CompositorFrame producer has completed a BeginFrame
112 // either by submitting a CompositorFrame or confirming that it will not
113 // submit one.
114 void SurfaceFinishedBeginFrame(const SurfaceId& surface_id,
115 const BeginFrameAck& ack);
116
104 // Require that the given sequence number must be satisfied (using 117 // Require that the given sequence number must be satisfied (using
105 // SatisfySequence) before the given surface can be destroyed. 118 // SatisfySequence) before the given surface can be destroyed.
106 void RequireSequence(const SurfaceId& surface_id, 119 void RequireSequence(const SurfaceId& surface_id,
107 const SurfaceSequence& sequence); 120 const SurfaceSequence& sequence);
108 121
109 // Satisfies the given sequence number. Once all sequence numbers that 122 // Satisfies the given sequence number. Once all sequence numbers that
110 // a surface depends on are satisfied, the surface can be destroyed. 123 // a surface depends on are satisfied, the surface can be destroyed.
111 void SatisfySequence(const SurfaceSequence& sequence); 124 void SatisfySequence(const SurfaceSequence& sequence);
112 125
113 void RegisterFrameSinkId(const FrameSinkId& frame_sink_id); 126 void RegisterFrameSinkId(const FrameSinkId& frame_sink_id);
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 std::unique_ptr<SurfaceDependencyTracker> dependency_tracker_; 304 std::unique_ptr<SurfaceDependencyTracker> dependency_tracker_;
292 305
293 base::WeakPtrFactory<SurfaceManager> weak_factory_; 306 base::WeakPtrFactory<SurfaceManager> weak_factory_;
294 307
295 DISALLOW_COPY_AND_ASSIGN(SurfaceManager); 308 DISALLOW_COPY_AND_ASSIGN(SurfaceManager);
296 }; 309 };
297 310
298 } // namespace cc 311 } // namespace cc
299 312
300 #endif // CC_SURFACES_SURFACE_MANAGER_H_ 313 #endif // CC_SURFACES_SURFACE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698