mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Fabric: Enumerator for RCTSurfaceRegistry
Summary: Now we have a way to enumerate surfaces stored in RCTSurfaceRegistry. Reviewed By: mdvacca Differential Revision: D9931316 fbshipit-source-id: 6b886c4b52cebddf15fef0239190fb2730d682cc
This commit is contained in:
1 parent
458d56c0a1
commit
bcdf81918b
2 files changed
+9
No files matched your search
@@ -21,6 +21,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
*/
|
||||
@interface RCTSurfaceRegistry : NSObject
|
||||
|
||||
- (NSEnumerator<RCTFabricSurface *> *)enumerator;
|
||||
|
||||
/**
|
||||
* Adds Surface object into the registry.
|
||||
* The registry does not retain Surface references.
|
||||
|
||||
@@ -26,6 +26,13 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSEnumerator<RCTFabricSurface *> *)enumerator
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(_mutex);
|
||||
|
||||
return [_registry objectEnumerator];
|
||||
}
|
||||
|
||||
- (void)registerSurface:(RCTFabricSurface *)surface
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(_mutex);
|
||||
|
||||
Reference in new issue
Block a user