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

Unified Diff: cc/surfaces/surface_manager.h

Issue 2541683004: Add/remove surface references via MojoCompositorFrameSink. (Closed)
Patch Set: Created 4 years 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 a0163579ee761b1783220b6faed22a44874a62bd..9a703e0d27b4753fa4bec6aeabf27178df662d77 100644
--- a/cc/surfaces/surface_manager.h
+++ b/cc/surfaces/surface_manager.h
@@ -101,16 +101,22 @@ class CC_SURFACES_EXPORT SurfaceManager : public SurfaceReferenceManager {
void UnregisterFrameSinkHierarchy(const FrameSinkId& parent_frame_sink_id,
const FrameSinkId& child_frame_sink_id);
+ void PrintReferenceTree(const std::string& name);
+
// SurfaceReferenceManager:
const SurfaceId& GetRootSurfaceId() const override;
- void AddSurfaceReference(const SurfaceId& parent_id,
+ bool AddSurfaceReference(const SurfaceId& parent_id,
const SurfaceId& child_id) override;
- void RemoveSurfaceReference(const SurfaceId& parent_id,
+ bool RemoveSurfaceReference(const SurfaceId& parent_id,
const SurfaceId& child_id) override;
size_t GetSurfaceReferenceCount(const SurfaceId& surface_id) const override;
size_t GetReferencedSurfaceCount(const SurfaceId& surface_id) const override;
private:
+ void PrintReferenceTreeImpl(const SurfaceId& surface_id,
+ std::string indent,
+ std::string* str);
+
void RecursivelyAttachBeginFrameSource(const FrameSinkId& frame_sink_id,
BeginFrameSource* source);
void RecursivelyDetachBeginFrameSource(const FrameSinkId& frame_sink_id,
@@ -181,7 +187,7 @@ class CC_SURFACES_EXPORT SurfaceManager : public SurfaceReferenceManager {
// Root SurfaceId that references display root surfaces. There is no Surface
// with this id, it's for bookkeeping purposes only.
- const SurfaceId kRootSurfaceId;
+ const SurfaceId root_surface_id_;
DISALLOW_COPY_AND_ASSIGN(SurfaceManager);
};

Powered by Google App Engine
This is Rietveld 408576698