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

Unified Diff: cc/surfaces/compositor_frame_sink_support.h

Issue 2940183002: cc: Move ownership of surfaces to SurfaceManager (Closed)
Patch Set: Fix exo 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
« no previous file with comments | « no previous file | cc/surfaces/compositor_frame_sink_support.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..808cb299c08e6e897ce6158a2d57e4df325ac6bf 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,8 @@ class CC_SURFACES_EXPORT CompositorFrameSinkSupport
void OnSurfaceActivated(Surface* surface);
+ Surface* GetCurrentSurfaceForTesting();
+
protected:
CompositorFrameSinkSupport(CompositorFrameSinkSupportClient* client,
const FrameSinkId& frame_sink_id,
@@ -99,14 +100,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_;
+ SurfaceId current_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 +116,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698