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

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

Issue 2715663007: Implement temporary reference assignment with DisplayCompositor. (Closed)
Patch Set: Cleanup. 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
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 #include <vector>
10 11
11 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
12 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
13 #include "cc/output/compositor_frame.h" 14 #include "cc/output/compositor_frame.h"
14 #include "cc/scheduler/begin_frame_source.h" 15 #include "cc/scheduler/begin_frame_source.h"
15 #include "cc/surfaces/referenced_surface_tracker.h" 16 #include "cc/surfaces/referenced_surface_tracker.h"
16 #include "cc/surfaces/surface_factory.h" 17 #include "cc/surfaces/surface_factory.h"
17 #include "cc/surfaces/surface_factory_client.h" 18 #include "cc/surfaces/surface_factory_client.h"
18 #include "cc/surfaces/surface_id.h" 19 #include "cc/surfaces/surface_id.h"
19 #include "cc/surfaces/surfaces_export.h" 20 #include "cc/surfaces/surfaces_export.h"
(...skipping 30 matching lines...) Expand all
50 void SetNeedsBeginFrame(bool needs_begin_frame); 51 void SetNeedsBeginFrame(bool needs_begin_frame);
51 void SubmitCompositorFrame(const LocalSurfaceId& local_surface_id, 52 void SubmitCompositorFrame(const LocalSurfaceId& local_surface_id,
52 CompositorFrame frame); 53 CompositorFrame frame);
53 void Require(const LocalSurfaceId& local_surface_id, 54 void Require(const LocalSurfaceId& local_surface_id,
54 const SurfaceSequence& sequence); 55 const SurfaceSequence& sequence);
55 void Satisfy(const SurfaceSequence& sequence); 56 void Satisfy(const SurfaceSequence& sequence);
56 void AddChildFrameSink(const FrameSinkId& child_frame_sink_id); 57 void AddChildFrameSink(const FrameSinkId& child_frame_sink_id);
57 void RemoveChildFrameSink(const FrameSinkId& child_frame_sink_id); 58 void RemoveChildFrameSink(const FrameSinkId& child_frame_sink_id);
58 void RequestCopyOfSurface(std::unique_ptr<CopyOutputRequest> request); 59 void RequestCopyOfSurface(std::unique_ptr<CopyOutputRequest> request);
59 void ForceReclaimResources(); 60 void ForceReclaimResources();
61 void ClaimTemporaryReference(const SurfaceId& surface_id);
60 62
61 private: 63 private:
62 // Update surface references with SurfaceManager for current CompositorFrame 64 // Update surface references with SurfaceManager for current CompositorFrame
63 // that has |local_surface_id|. UpdateReferences() must be called on 65 // that has |local_surface_id|. UpdateReferences() must be called on
64 // |reference_tracker_| before calling this. Will add and remove top-level 66 // |reference_tracker_| before calling this. Will add and remove top-level
65 // root references if |display_| is not null. 67 // root references if |display_| is not null.
66 void UpdateSurfaceReferences(const SurfaceId& last_surface_id, 68 void UpdateSurfaceReferences(const SurfaceId& last_surface_id,
67 const LocalSurfaceId& local_surface_id); 69 const LocalSurfaceId& local_surface_id);
68 70
69 void AddTopLevelRootReference(const SurfaceId& surface_id); 71 void AddTopLevelRootReference(const SurfaceId& surface_id);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 const bool handles_frame_sink_id_invalidation_; 136 const bool handles_frame_sink_id_invalidation_;
135 137
136 base::WeakPtrFactory<CompositorFrameSinkSupport> weak_factory_; 138 base::WeakPtrFactory<CompositorFrameSinkSupport> weak_factory_;
137 139
138 DISALLOW_COPY_AND_ASSIGN(CompositorFrameSinkSupport); 140 DISALLOW_COPY_AND_ASSIGN(CompositorFrameSinkSupport);
139 }; 141 };
140 142
141 } // namespace cc 143 } // namespace cc
142 144
143 #endif // CC_SURFACES_COMPOSITOR_FRAME_SINK_SUPPORT_H_ 145 #endif // CC_SURFACES_COMPOSITOR_FRAME_SINK_SUPPORT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698