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

Unified Diff: cc/surfaces/surface.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/surface.h
diff --git a/cc/surfaces/surface.h b/cc/surfaces/surface.h
index 1dc71b75761d28b2c20fe13cf9f24d4fc6dd0909..3dafbba93b257f71e4c987ec8a39183f07c4add7 100644
--- a/cc/surfaces/surface.h
+++ b/cc/surfaces/surface.h
@@ -130,6 +130,8 @@ class CC_SURFACES_EXPORT Surface {
bool destroyed() const { return destroyed_; }
void set_destroyed(bool destroyed) { destroyed_ = destroyed; }
+ base::WeakPtr<Surface> AsWeakPtr();
+
private:
struct FrameData {
FrameData(CompositorFrame&& frame,
@@ -177,6 +179,8 @@ class CC_SURFACES_EXPORT Surface {
base::flat_set<SurfaceId> blocking_surfaces_;
+ base::WeakPtrFactory<Surface> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(Surface);
};

Powered by Google App Engine
This is Rietveld 408576698