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

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

Issue 2688043002: Retain references to surfaces from both active AND pending CompositorFrames (Closed)
Patch Set: Added TODOs and addressed comments Created 3 years, 10 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
« no previous file with comments | « no previous file | cc/surfaces/compositor_frame_sink_support.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 10
(...skipping 28 matching lines...) Expand all
39 std::unique_ptr<BeginFrameSource> display_begin_frame_source); 39 std::unique_ptr<BeginFrameSource> display_begin_frame_source);
40 40
41 ~CompositorFrameSinkSupport() override; 41 ~CompositorFrameSinkSupport() override;
42 42
43 const FrameSinkId& frame_sink_id() const { return frame_sink_id_; } 43 const FrameSinkId& frame_sink_id() const { return frame_sink_id_; }
44 44
45 Surface* current_surface_for_testing() { 45 Surface* current_surface_for_testing() {
46 return surface_factory_.current_surface_for_testing(); 46 return surface_factory_.current_surface_for_testing();
47 } 47 }
48 48
49 const ReferencedSurfaceTracker& ReferenceTrackerForTesting() const {
50 return reference_tracker_;
51 }
52
49 void EvictFrame(); 53 void EvictFrame();
50 void SetNeedsBeginFrame(bool needs_begin_frame); 54 void SetNeedsBeginFrame(bool needs_begin_frame);
51 void SubmitCompositorFrame(const LocalSurfaceId& local_surface_id, 55 void SubmitCompositorFrame(const LocalSurfaceId& local_surface_id,
52 CompositorFrame frame); 56 CompositorFrame frame);
53 void Require(const LocalSurfaceId& local_surface_id, 57 void Require(const LocalSurfaceId& local_surface_id,
54 const SurfaceSequence& sequence); 58 const SurfaceSequence& sequence);
55 void Satisfy(const SurfaceSequence& sequence); 59 void Satisfy(const SurfaceSequence& sequence);
56 void AddChildFrameSink(const FrameSinkId& child_frame_sink_id); 60 void AddChildFrameSink(const FrameSinkId& child_frame_sink_id);
57 void RemoveChildFrameSink(const FrameSinkId& child_frame_sink_id); 61 void RemoveChildFrameSink(const FrameSinkId& child_frame_sink_id);
58 62
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 std::unordered_set<FrameSinkId, FrameSinkIdHash> child_frame_sinks_; 132 std::unordered_set<FrameSinkId, FrameSinkIdHash> child_frame_sinks_;
129 133
130 base::WeakPtrFactory<CompositorFrameSinkSupport> weak_factory_; 134 base::WeakPtrFactory<CompositorFrameSinkSupport> weak_factory_;
131 135
132 DISALLOW_COPY_AND_ASSIGN(CompositorFrameSinkSupport); 136 DISALLOW_COPY_AND_ASSIGN(CompositorFrameSinkSupport);
133 }; 137 };
134 138
135 } // namespace cc 139 } // namespace cc
136 140
137 #endif // CC_SURFACES_COMPOSITOR_FRAME_SINK_SUPPORT_H_ 141 #endif // CC_SURFACES_COMPOSITOR_FRAME_SINK_SUPPORT_H_
OLDNEW
« no previous file with comments | « no previous file | cc/surfaces/compositor_frame_sink_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698