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

Unified Diff: cc/surfaces/compositor_frame_sink_support.h

Issue 2940183002: cc: Move ownership of surfaces to SurfaceManager (Closed)
Patch Set: Fix test Created 3 years, 6 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/compositor_frame_sink_support.h
diff --git a/cc/surfaces/compositor_frame_sink_support.h b/cc/surfaces/compositor_frame_sink_support.h
index 4397a140918c87bbf993bc592c0476957d2ccc79..c8b960cd49b07399c442a3feb7ff0215124b81aa 100644
--- a/cc/surfaces/compositor_frame_sink_support.h
+++ b/cc/surfaces/compositor_frame_sink_support.h
@@ -43,7 +43,6 @@ class CC_SURFACES_EXPORT CompositorFrameSinkSupport
const FrameSinkId& frame_sink_id() const { return frame_sink_id_; }
- Surface* current_surface_for_testing() { return current_surface_.get(); }
SurfaceManager* surface_manager() { return surface_manager_; }
bool needs_sync_points() { return needs_sync_points_; }
@@ -68,6 +67,9 @@ class CC_SURFACES_EXPORT CompositorFrameSinkSupport
void OnSurfaceActivated(Surface* surface);
+ Surface* GetCurrentSurface();
Fady Samuel 2017/06/20 17:29:07 Does this need to be public?
Saman Sami 2017/06/20 22:47:10 It's used in some tests.
+ SurfaceId GetCurrentSurfaceId();
Fady Samuel 2017/06/20 17:29:06 Does this need to be public?
Saman Sami 2017/06/20 22:47:10 I just removed it per your suggestion.
+
protected:
CompositorFrameSinkSupport(CompositorFrameSinkSupportClient* client,
const FrameSinkId& frame_sink_id,
@@ -99,14 +101,14 @@ class CC_SURFACES_EXPORT CompositorFrameSinkSupport
void OnBeginFrameSourcePausedChanged(bool paused) override;
void UpdateNeedsBeginFramesInternal();
- std::unique_ptr<Surface> CreateSurface(const SurfaceInfo& surface_info);
- void DestroyCurrentSurface();
+ Surface* CreateSurface(const SurfaceInfo& surface_info);
CompositorFrameSinkSupportClient* const client_;
SurfaceManager* surface_manager_ = nullptr;
const FrameSinkId frame_sink_id_;
+ LocalSurfaceId current_local_surface_id_;
// If this contains a value then a surface reference from the top-level root
// to SurfaceId(frame_sink_id_, referenced_local_surface_id_.value()) was
@@ -115,7 +117,6 @@ class CC_SURFACES_EXPORT CompositorFrameSinkSupport
SurfaceResourceHolder surface_resource_holder_;
- std::unique_ptr<Surface> current_surface_;
// Counts the number of CompositorFrames that have been submitted and have not
// yet received an ACK.
int ack_pending_count_ = 0;
« no previous file with comments | « no previous file | cc/surfaces/compositor_frame_sink_support.cc » ('j') | cc/surfaces/compositor_frame_sink_support.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698