anchor.diff:  /// Instantiates a [ui.Codec] backed by an `SkImage` from Skia.
   void skiaInstantiateImageCodec(Uint8List list, Callback<ui.Codec> callback,
       [int width, int height, int format, int rowBytes]) {
  -  final js.JsObject skImage =
  -      canvasKit.callMethod('MakeImageFromEncoded', <Uint8List>[list]);
  -  final SkImage image = SkImage(skImage);
  -  final SkImageCodec codec = SkImageCodec(image);
  +  final js.JsObject skAnimatedImage =
  +      canvasKit.callMethod('MakeAnimatedImageFromEncoded', <Uint8List>[list]);
  +  final SkAnimatedImage animatedImage = SkAnimatedImage(skAnimatedImage);
  +  final SkAnimatedImageCodec codec = SkAnimatedImageCodec(animatedImage);
     callback(codec);
  +}
  +
  +/// A wrapper for `SkAnimatedImage`.
  +class SkAnimatedImage implements ui.Image {
  +  final js.JsObject _skAnimatedImage;
  +
  +  SkAnimatedImage(this._skAnimatedImage);
  +
  +  @override
  +  void dispose() {
  +    _skAnimatedImage.callMethod('delete');
  +  }
  +
  +  int get frameCount => _skAnimatedImage.callMethod('getFrameCount');
  +
  +  /// Decodes the next frame and returns the frame duration.
  +  Duration decodeNextFrame() {
  +    final int durationMillis = _skAnimatedImage.callMethod('decodeNextFrame');
  +    return Duration(milliseconds: durationMillis);
  +  }
  +
  +  int get repetitionCount => _skAnimatedImage.callMethod('getRepetitionCount');
  +
  +  SkImage get currentFrameAsImage {
  +    final js.JsObject _currentFrame =
  +        _skAnimatedImage.callMethod('getCurrentFrame');
  +    return SkImage(_currentFrame);
  +  }
  +
  +  @override
  +  int get width => _skAnimatedImage.callMethod('width');
  +
  +  @override
  +  int get height => _skAnimatedImage.callMethod('height');
  +
  +  @override
  +  Future<ByteData> toByteData(
  +      {ui.ImageByteFormat format = ui.ImageByteFormat.rawRgba}) {
  +    throw 'unimplemented';
  +  }
   }
   
   /// A [ui.Image] backed by an `SkImage` from Skia.
  
positive.code:   }
  }
  
  /// A [ui.Codec] backed by an `SkImage` from Skia.
  class SkImageCodec implements ui.Codec {
    final SkImage skImage;
  
    SkImageCodec(this.skImage);
  
    @override
    void dispose() {
      // TODO: implement dispose
    }
  
    @override
    int get frameCount => 1;
  
    @override
    Future<ui.FrameInfo> getNextFrame() {
      return Future<ui.FrameInfo>.value(SingleFrameInfo(skImage));
    }
  
    @override
    int get repetitionCount => 0;
  }
  
negative.code: 
    @override
    void dispose() {
      skImage.callMethod('delete');
      skImage = null;
    }
  
  