How to enable rendering with DisplayP3 in ASDisplayNode

Updated
Apr 9, 2021 7:49 AM
Created
Apr 9, 2021 7:48 AM
Tags
Texture (AsyncDisplayKit)
Keywords
Date

import AsyncDisplayKit

/**
 To use UIGraphicsImageRenderer in drawing context for DisplayP3 color.
 */
extension ASConfiguration {
  @objc(textureConfiguration)
  class func texture() -> ASConfiguration {
    let config = ASConfiguration()
    config.experimentalFeatures.insert(.drawingGlobal)
    return config
  }
}