Skip to content

Commit

Permalink
Keep the atomics - does not affect memory work (TextureGroup#1498)
Browse files Browse the repository at this point in the history
Revert "Ensure ASControlMode properties lock before accessing their ivars (TextureGroup#1476)"
This reverts commit ce1e195.

Revert "Make sure all ASDisplayNode properties have backing ivars for consistency. (TextureGroup#1475)"
This reverts commit d6061f4.
- Except the unused property `interfaceStateSuspended` is still removed (this is a memory saver).
  • Loading branch information
Greg Bolsinga authored and hebertialmeida committed May 10, 2019
1 parent d62967f commit 9eb4053
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 112 deletions.
5 changes: 0 additions & 5 deletions Source/ASControlNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@

#pragma once

#pragma clang diagnostic push
#pragma clang diagnostic error "-Wobjc-missing-property-synthesis"

NS_ASSUME_NONNULL_BEGIN

/**
Expand Down Expand Up @@ -150,5 +147,3 @@ static UIControlState const ASControlStateSelected ASDISPLAYNODE_DEPRECATED_MSG(
#endif

NS_ASSUME_NONNULL_END

#pragma clang diagnostic pop
63 changes: 0 additions & 63 deletions Source/ASControlNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ @interface ASControlNode ()
// Control Attributes
BOOL _enabled;
BOOL _highlighted;
BOOL _selected;

// Tracking
BOOL _tracking;
Expand Down Expand Up @@ -122,68 +121,6 @@ - (void)__exitHierarchy
}
}

#pragma mark - ASDisplayNode Overrides

- (BOOL)isEnabled
{
ASLockScopeSelf();
return _enabled;
}

- (void)setEnabled:(BOOL)enabled
{
ASLockScopeSelf();
_enabled = enabled;
}

- (BOOL)isHighlighted
{
ASLockScopeSelf();
return _highlighted;
}

- (void)setHighlighted:(BOOL)highlighted
{
ASLockScopeSelf();
_highlighted = highlighted;
}

- (void)setSelected:(BOOL)selected
{
ASLockScopeSelf();
_selected = selected;
}

- (BOOL)isSelected
{
ASLockScopeSelf();
return _selected;
}

- (void)setTracking:(BOOL)tracking
{
ASLockScopeSelf();
_tracking = tracking;
}

- (BOOL)isTracking
{
ASLockScopeSelf();
return _tracking;
}

- (void)setTouchInside:(BOOL)touchInside
{
ASLockScopeSelf();
_touchInside = touchInside;
}

- (BOOL)isTouchInside
{
ASLockScopeSelf();
return _touchInside;
}

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wobjc-missing-super-calls"

Expand Down
5 changes: 0 additions & 5 deletions Source/ASDisplayNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
#import <AsyncDisplayKit/ASLayoutElement.h>
#import <AsyncDisplayKit/ASLocking.h>

#pragma clang diagnostic push
#pragma clang diagnostic error "-Wobjc-missing-property-synthesis"

NS_ASSUME_NONNULL_BEGIN

#define ASDisplayNodeLoggingEnabled 0
Expand Down Expand Up @@ -990,5 +987,3 @@ typedef NS_ENUM(NSInteger, ASLayoutEngineType) {
@end

NS_ASSUME_NONNULL_END

#pragma clang diagnostic pop
36 changes: 0 additions & 36 deletions Source/ASDisplayNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -2634,42 +2634,6 @@ - (BOOL)placeholderShouldPersist
return NO;
}

- (BOOL)placeholderEnabled
{
MutexLocker l(__instanceLock__);
return _flags.placeholderEnabled;
}

- (void)setPlaceholderEnabled:(BOOL)placeholderEnabled
{
MutexLocker l(__instanceLock__);
_flags.placeholderEnabled = placeholderEnabled;
}

- (NSTimeInterval)placeholderFadeDuration
{
MutexLocker l(__instanceLock__);
return _placeholderFadeDuration;
}

- (void)setPlaceholderFadeDuration:(NSTimeInterval)placeholderFadeDuration
{
MutexLocker l(__instanceLock__);
_placeholderFadeDuration = placeholderFadeDuration;
}

- (NSInteger)drawingPriority
{
MutexLocker l(__instanceLock__);
return _drawingPriority;
}

- (void)setDrawingPriority:(NSInteger)drawingPriority
{
MutexLocker l(__instanceLock__);
_drawingPriority = drawingPriority;
}

#pragma mark - Hierarchy State

- (BOOL)isInHierarchy
Expand Down
3 changes: 0 additions & 3 deletions Source/Private/ASDisplayNodeInternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,6 @@ static constexpr CACornerMask kASCACornerAllCorners =
// Placeholder support
UIImage *_placeholderImage;
CALayer *_placeholderLayer;
NSTimeInterval _placeholderFadeDuration;

NSInteger _drawingPriority;

// keeps track of nodes/subnodes that have not finished display, used with placeholders
ASWeakSet *_pendingDisplayNodes;
Expand Down

0 comments on commit 9eb4053

Please sign in to comment.