From d6a9fdd8c6a8fbd05da4fd642876abcfc0ef569f Mon Sep 17 00:00:00 2001 From: Michael Klimushyn Date: Fri, 3 May 2019 11:30:57 -0700 Subject: [PATCH] Default the animated frame cache to 0 when unset (flutter/engine#8833) This default is already set in the framework, but this also needs to be set in the binding layer to preserve the same behavior when the deprecated framework parameter is removed. --- engine/src/flutter/lib/ui/painting.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/src/flutter/lib/ui/painting.dart b/engine/src/flutter/lib/ui/painting.dart index 605396acda..d6c2e92cb5 100644 --- a/engine/src/flutter/lib/ui/painting.dart +++ b/engine/src/flutter/lib/ui/painting.dart @@ -1654,7 +1654,7 @@ class Codec extends NativeFieldWrapperClass2 { /// The returned future can complete with an error if the image decoding has /// failed. Future instantiateImageCodec(Uint8List list, { - double decodedCacheRatioCap = double.infinity, + double decodedCacheRatioCap = 0, }) { return _futurize( (_Callback callback) => _instantiateImageCodec(list, callback, null, decodedCacheRatioCap), @@ -1704,7 +1704,7 @@ void decodeImageFromPixels( int height, PixelFormat format, ImageDecoderCallback callback, - {int rowBytes, double decodedCacheRatioCap = double.infinity} + {int rowBytes, double decodedCacheRatioCap = 0} ) { final _ImageInfo imageInfo = new _ImageInfo(width, height, format.index, rowBytes); final Future codecFuture = _futurize(