lock approach is slower on ios

This commit is contained in:
mertalev
2026-01-17 01:05:12 -05:00
parent 06467f2c0d
commit d83e74dc88
5 changed files with 43 additions and 69 deletions
@@ -15,10 +15,12 @@ class RemoteImageRequest extends ImageRequest {
final Map<String, int> info = await remoteImageApi.requestImage(uri, headers: headers, requestId: requestId);
try {
final frame = await _fromPlatformImage(info, ui.PixelFormat.bgra8888, false);
final frame = await _fromPlatformImage(info, Platform.isIOS);
return frame == null ? null : ImageInfo(image: frame.image, scale: scale);
} finally {
unawaited(remoteImageApi.releaseImage(requestId));
if (Platform.isAndroid) {
unawaited(remoteImageApi.releaseImage(requestId));
}
}
}