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

Unified Diff: cc/surfaces/surface_factory.h

Issue 2144733005: [WIP] cc: Plumb SurfaceId from clients Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ensure only SurfaceFactoy and tests can update hierarchy Created 4 years, 5 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_display_output_surface_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 52f44bbb62b0e915295438df39a3d377f3d1d683..6c6099014125e71f4e2ddda8039ee6d98d9b3828 100644
--- a/cc/surfaces/surface_factory.h
+++ b/cc/surfaces/surface_factory.h
@@ -42,9 +42,13 @@ class CC_SURFACES_EXPORT SurfaceFactory
public:
using DrawCallback = base::Callback<void(SurfaceDrawStatus)>;
- SurfaceFactory(SurfaceManager* manager, SurfaceFactoryClient* client);
+ SurfaceFactory(uint32_t client_id,
+ SurfaceManager* manager,
+ SurfaceFactoryClient* client);
~SurfaceFactory();
+ void SetParent(uint32_t client_id);
+
void Create(const SurfaceId& surface_id);
void Destroy(const SurfaceId& surface_id);
void DestroyAll();
@@ -74,6 +78,10 @@ class CC_SURFACES_EXPORT SurfaceFactory
SurfaceManager* manager() { return manager_; }
+ uint32_t client_id() const { return client_id_; }
+
+ uint32_t parent_client_id() const { return parent_client_id_; }
+
// This can be set to false if resources from this SurfaceFactory don't need
// to have sync points set on them when returned from the Display, for
// example if the Display shares a context with the creator.
@@ -85,6 +93,8 @@ class CC_SURFACES_EXPORT SurfaceFactory
void DidDestroySurfaceManager() { manager_ = nullptr; }
private:
+ const uint32_t client_id_;
+ uint32_t parent_client_id_;
SurfaceManager* manager_;
SurfaceFactoryClient* client_;
SurfaceResourceHolder holder_;
« no previous file with comments | « cc/surfaces/surface_display_output_surface_unittest.cc ('k') | cc/surfaces/surface_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698