mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-02 10:50:11 +00:00
Need some more locks for working with calculated yoga layouts (#1388)
This commit is contained in:
parent
510000ee85
commit
872e89b772
@ -286,6 +286,7 @@
|
||||
|
||||
- (void)invalidateCalculatedYogaLayout
|
||||
{
|
||||
ASLockScopeSelf();
|
||||
YGNodeRef yogaNode = self.style.yogaNode;
|
||||
if (yogaNode && [self shouldHaveYogaMeasureFunc]) {
|
||||
// Yoga internally asserts that MarkDirty() may only be called on nodes with a measurement function.
|
||||
@ -338,6 +339,7 @@
|
||||
|
||||
- (void)calculateLayoutFromYogaRoot:(ASSizeRange)rootConstrainedSize
|
||||
{
|
||||
ASScopedLockSet lockSet = [self lockToRootIfNeededForLayout];
|
||||
ASDisplayNode *yogaRoot = self.yogaRoot;
|
||||
|
||||
if (self != yogaRoot) {
|
||||
@ -358,7 +360,6 @@
|
||||
}
|
||||
}];
|
||||
|
||||
|
||||
// Prepare all children for the layout pass with the current Yoga tree configuration.
|
||||
ASDisplayNodePerformBlockOnEveryYogaChild(self, ^(ASDisplayNode *_Nonnull node) {
|
||||
node.yogaLayoutInProgress = YES;
|
||||
|
Loading…
x
Reference in New Issue
Block a user