• D
    Refactor instantiateImageCodec/decodeImageFromPixels to provide an ImageDescriptor (#19537) · 52813224
    Dan Field 提交于
    Refactors instantiateImageCodec and decodeImageFromPixels to provide intermediate data about the image width, height, and bytes per pixel. This allows for more fine grained control from Dart, particularly when trying to reason about how or whether to maintain aspect ratio in the targetWidth/targetHeight parameters.
    
    This leaves the existing methods functional by re-implementing them to use the new ImmutableBuffer/ImageDescriptor class.
    
    The ImmutableBuffer class is provided so that callers can avoid copying the image data multiple times if they wish to re-recreate the image descriptor.
    
    Related Issues
    52813224
painting.dart 184.1 KB