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

Unified Diff: cc/surfaces/compositor_frame_sink_support.h

Issue 2940183002: cc: Move ownership of surfaces to SurfaceManager (Closed)
Patch Set: Rename UnregisterSurface 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') | cc/surfaces/surface_manager.h » ('J')
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..0d99ac91824164771f6d80b5e15b3d0c39afa3e5 100644
--- a/cc/surfaces/compositor_frame_sink_support.h
+++ b/cc/surfaces/compositor_frame_sink_support.h
@@ -43,7 +43,7 @@ class CC_SURFACES_EXPORT CompositorFrameSinkSupport
const FrameSinkId& frame_sink_id() const { return frame_sink_id_; }
- Surface* current_surface_for_testing() { return current_surface_.get(); }
+ Surface* current_surface_for_testing() { return current_surface_; }
SurfaceManager* surface_manager() { return surface_manager_; }
bool needs_sync_points() { return needs_sync_points_; }
@@ -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();
+ Surface* CreateSurface(const SurfaceInfo& surface_info);
CompositorFrameSinkSupportClient* const client_;
@@ -115,7 +114,7 @@ class CC_SURFACES_EXPORT CompositorFrameSinkSupport
SurfaceResourceHolder surface_resource_holder_;
- std::unique_ptr<Surface> current_surface_;
+ Surface* current_surface_ = nullptr;
// 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/surface_manager.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698