[ASDisplayNode] Clarify logic around calling setNeedsDisplay (#2094)

This commit is contained in:
Adlai Holler
2016-08-18 09:45:43 -07:00
committed by GitHub
parent 4baffea8f6
commit 00af76226d
2 changed files with 14 additions and 16 deletions

View File

@@ -83,10 +83,10 @@ FOUNDATION_EXPORT NSString * const ASRenderingEngineDidDisplayNodesScheduledBefo
// Prevent calling setNeedsDisplay on a layer that backs a UIImageView. Usually calling setNeedsDisplay on a CALayer
// triggers a recreation of the contents of layer unfortunately calling it on a CALayer that backs a UIImageView
// it goes trough the normal flow to assign the contents to a layer via the CALayerDelegate methods. Unfortunately
// it goes through the normal flow to assign the contents to a layer via the CALayerDelegate methods. Unfortunately
// UIImageView does not do recreate the layer contents the usual way, it actually does not implement some of the
// methods at all instead it throws away the contents of the layer and nothing will show up.
unsigned canCallNeedsDisplayOfLayer:1;
unsigned canCallSetNeedsDisplayOfLayer:1;
// whether custom drawing is enabled
unsigned implementsInstanceDrawRect:1;