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

Unified Diff: cc/surfaces/surface_factory.h

Issue 2383373002: Reduce SurfaceIdAllocator usage and tie SurfaceFactory to a single FrameSinkId (Closed)
Patch Set: Rebased Created 4 years, 2 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 | « cc/surfaces/surface_aggregator_unittest.cc ('k') | cc/surfaces/surface_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_factory.h
diff --git a/cc/surfaces/surface_factory.h b/cc/surfaces/surface_factory.h
index 566144433405fe31ef019ad6b1510ee4ec819292..b3da3cbb6152271fe6db9907834305d3aa82d1a6 100644
--- a/cc/surfaces/surface_factory.h
+++ b/cc/surfaces/surface_factory.h
@@ -40,9 +40,13 @@ class CC_SURFACES_EXPORT SurfaceFactory
public:
using DrawCallback = base::Callback<void()>;
- SurfaceFactory(SurfaceManager* manager, SurfaceFactoryClient* client);
+ SurfaceFactory(const FrameSinkId& frame_sink_id,
+ SurfaceManager* manager,
+ SurfaceFactoryClient* client);
~SurfaceFactory();
+ const FrameSinkId& frame_sink_id() const { return frame_sink_id_; }
+
void Create(const SurfaceId& surface_id);
void Destroy(const SurfaceId& surface_id);
void DestroyAll();
@@ -83,6 +87,7 @@ class CC_SURFACES_EXPORT SurfaceFactory
void DidDestroySurfaceManager() { manager_ = nullptr; }
private:
+ FrameSinkId frame_sink_id_;
SurfaceManager* manager_;
SurfaceFactoryClient* client_;
SurfaceResourceHolder holder_;
« no previous file with comments | « cc/surfaces/surface_aggregator_unittest.cc ('k') | cc/surfaces/surface_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698