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

Unified Diff: cc/surfaces/compositor_frame_sink_support.h

Issue 2940183002: cc: Move ownership of surfaces to SurfaceManager (Closed)
Patch Set: c 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..b030e9d9045c411f617003eb12b2fe37659e1723 100644
--- a/cc/surfaces/compositor_frame_sink_support.h
+++ b/cc/surfaces/compositor_frame_sink_support.h
@@ -99,8 +99,7 @@ class CC_SURFACES_EXPORT CompositorFrameSinkSupport
void OnBeginFrameSourcePausedChanged(bool paused) override;
void UpdateNeedsBeginFramesInternal();
- std::unique_ptr<Surface> CreateSurface(const SurfaceInfo& surface_info);
- void DestroyCurrentSurface();
+ base::WeakPtr<Surface> CreateSurface(const SurfaceInfo& surface_info);
CompositorFrameSinkSupportClient* const client_;
@@ -115,7 +114,8 @@ class CC_SURFACES_EXPORT CompositorFrameSinkSupport
SurfaceResourceHolder surface_resource_holder_;
- std::unique_ptr<Surface> current_surface_;
+ base::WeakPtr<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