Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

Commit a4a03fd

Browse files
committed
Merge pull request #481 from facebook/PrecompositingOpacity
Support transparent (e.g. clearColor) background for precomposited trees.
2 parents 2a7f45e + c50f3b9 commit a4a03fd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

AsyncDisplayKit/Private/ASDisplayNode+AsyncDisplay.mm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ - (asyncdisplaykit_async_transaction_operation_block_t)_displayBlockWithAsynchro
173173
[self _recursivelyRasterizeSelfAndSublayersWithIsCancelledBlock:isCancelledBlock displayBlocks:displayBlocks];
174174

175175
CGFloat contentsScaleForDisplay = self.contentsScaleForDisplay;
176-
BOOL opaque = self.opaque;
176+
BOOL opaque = self.opaque && CGColorGetAlpha(self.backgroundColor.CGColor) == 1.0f;
177177

178178
ASDisplayNodeAssert(self.contentsScaleForDisplay != 0.0, @"Invalid contents scale");
179179

@@ -185,7 +185,6 @@ - (asyncdisplaykit_async_transaction_operation_block_t)_displayBlockWithAsynchro
185185
}
186186

187187
ASDN_DELAY_FOR_DISPLAY();
188-
189188
UIGraphicsBeginImageContextWithOptions(bounds.size, opaque, contentsScaleForDisplay);
190189

191190
for (dispatch_block_t block in displayBlocks) {

0 commit comments

Comments
 (0)