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

Unified Diff: cc/surfaces/surface_manager.h

Issue 2684933003: Move frame_sink_id management to framesink_manager.cc/h from (Closed)
Patch Set: Changed the patch to call frmesink_manager from surface_manager Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: cc/surfaces/surface_manager.h
diff --git a/cc/surfaces/surface_manager.h b/cc/surfaces/surface_manager.h
index c0c8e76324f00e8bec7c4980b559d9f7f2e29060..22c85b1263293cc16da22564a5d4183841ff58d7 100644
--- a/cc/surfaces/surface_manager.h
+++ b/cc/surfaces/surface_manager.h
@@ -19,6 +19,7 @@
#include "base/observer_list.h"
#include "base/threading/thread_checker.h"
#include "cc/surfaces/frame_sink_id.h"
+#include "cc/surfaces/framesink_manager.h"
#include "cc/surfaces/surface_dependency_tracker.h"
#include "cc/surfaces/surface_id.h"
#include "cc/surfaces/surface_observer.h"
@@ -174,6 +175,7 @@ class CC_SURFACES_EXPORT SurfaceManager {
friend class SurfaceManagerRefTest;
using SurfaceIdSet = std::unordered_set<SurfaceId, SurfaceIdHash>;
+ FrameSinkManager* framesink_manager_;
enne (OOO) 2017/03/20 18:28:53 Can this just be a member directly instead of a ra
Fady Samuel 2017/03/20 18:36:30 +1
void RecursivelyAttachBeginFrameSource(const FrameSinkId& frame_sink_id,
BeginFrameSource* source);
@@ -246,30 +248,6 @@ class CC_SURFACES_EXPORT SurfaceManager {
// waited on.
std::unordered_set<SurfaceSequence, SurfaceSequenceHash> satisfied_sequences_;
- // Set of valid surface ID namespaces. When a namespace is removed from
- // this set, any remaining sequences with that namespace are considered
- // satisfied.
- std::unordered_set<FrameSinkId, FrameSinkIdHash> valid_frame_sink_ids_;
-
- // Begin frame source routing. Both BeginFrameSource and SurfaceFactoryClient
- // pointers guaranteed alive by callers until unregistered.
- struct FrameSinkSourceMapping {
- FrameSinkSourceMapping();
- FrameSinkSourceMapping(const FrameSinkSourceMapping& other);
- ~FrameSinkSourceMapping();
- bool has_children() const { return !children.empty(); }
- // The currently assigned begin frame source for this client.
- BeginFrameSource* source;
- // This represents a dag of parent -> children mapping.
- std::vector<FrameSinkId> children;
- };
-
- std::unordered_map<FrameSinkId, SurfaceFactoryClient*, FrameSinkIdHash>
- clients_;
-
- std::unordered_map<FrameSinkId, FrameSinkSourceMapping, FrameSinkIdHash>
- frame_sink_source_map_;
-
// Tracks references from the child surface to parent surface. If there are
// zero entries in the set for a SurfaceId then nothing is referencing the
// surface and it can be garbage collected.
@@ -280,11 +258,6 @@ class CC_SURFACES_EXPORT SurfaceManager {
std::unordered_map<SurfaceId, SurfaceIdSet, SurfaceIdHash>
parent_to_child_refs_;
- // Set of which sources are registered to which namespace. Any child
- // that is implicitly using this namespace must be reachable by the
- // parent in the dag.
- std::unordered_map<BeginFrameSource*, FrameSinkId> registered_sources_;
-
// Root SurfaceId that references display root surfaces. There is no Surface
// with this id, it's for bookkeeping purposes only.
const SurfaceId root_surface_id_;

Powered by Google App Engine
This is Rietveld 408576698