mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
[ASDisplayNode] Ensure all subclasses are using base class __instanceLock__ and not re-defining their own. (#2754)
* [ASDisplayNode] Ensure all subclasses are using base class __instanceLock__ and not re-defining their own. This also moves the @package definition of the instance variable to +FrameworkPrivate instead of Internal.h, because Internal.h should ideally not be used outside of the ASDisplayNode file setup. This has greatly reduced the number of imports of Internal.h. * [ASDisplayNode] Add ASDisplayNode+FrameworkSubclasses.h to share __instanceLock__ definition.
This commit is contained in:
@@ -20,7 +20,6 @@
|
||||
#import "ASLayoutElement.h"
|
||||
#import "ASLayoutTransition.h"
|
||||
#import "ASEnvironment.h"
|
||||
#import "ASObjectDescriptionHelpers.h"
|
||||
#import "ASWeakSet.h"
|
||||
|
||||
#import "ASDisplayNode+Beta.h"
|
||||
@@ -57,13 +56,11 @@ FOUNDATION_EXPORT NSString * const ASRenderingEngineDidDisplayNodesScheduledBefo
|
||||
|
||||
#define TIME_DISPLAYNODE_OPS 0 // If you're using this information frequently, try: (DEBUG || PROFILE)
|
||||
|
||||
@interface ASDisplayNode () <ASDescriptionProvider, ASDebugDescriptionProvider>
|
||||
@interface ASDisplayNode ()
|
||||
{
|
||||
@package
|
||||
_ASPendingState *_pendingViewState;
|
||||
|
||||
// Protects access to _view, _layer, _pendingViewState, _subnodes, _supernode, and other properties which are accessed from multiple threads.
|
||||
ASDN::RecursiveMutex __instanceLock__;
|
||||
UIView *_view;
|
||||
CALayer *_layer;
|
||||
|
||||
@@ -197,10 +194,6 @@ FOUNDATION_EXPORT NSString * const ASRenderingEngineDidDisplayNodesScheduledBefo
|
||||
/// Bitmask to check which methods an object overrides.
|
||||
@property (nonatomic, assign, readonly) ASDisplayNodeMethodOverrides methodOverrides;
|
||||
|
||||
/// Thread safe way to access the bounds of the node
|
||||
@property (nonatomic, assign) CGRect threadSafeBounds;
|
||||
|
||||
|
||||
// Swizzle to extend the builtin functionality with custom logic
|
||||
- (BOOL)__shouldLoadViewOrLayer;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user