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.
This commit is contained in:
Michael Klimushyn
2019-05-03 11:30:57 -07:00
committed by GitHub
parent 23ecdb2b96
commit d6a9fdd8c6

View File

@@ -1654,7 +1654,7 @@ class Codec extends NativeFieldWrapperClass2 {
/// The returned future can complete with an error if the image decoding has
/// failed.
Future<Codec> instantiateImageCodec(Uint8List list, {
double decodedCacheRatioCap = double.infinity,
double decodedCacheRatioCap = 0,
}) {
return _futurize(
(_Callback<Codec> 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<Codec> codecFuture = _futurize(