You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In engine/src/flutter/lib/web_ui/lib/painting.dart, instantiateImageCodecWithSize invokes getTargetSize(width, height) (where ResizeImage has already enforced its own allowUpscaling parameter) and then passes a hardcoded allowUpscaling: false to engine.engineInstantiateImageCodec:
On native (dart:ui), instantiateImageCodecWithSize scales to whatever TargetImageSize is returned by getTargetSize, leaving upscaling policy to the caller (ResizeImage.allowUpscaling). Because the web implementation hardcodes allowUpscaling: false, ResizeImage(..., allowUpscaling: true) clamps target dimensions back down to the intrinsic image size on web.
Note: packages/flutter/test/painting/image_provider_resize_image_test.dart (line 622) still skips its ResizeImage group on isBrowser referencing closed #73120.
Steps to Reproduce
Remove skip: isBrowser on line 622 of packages/flutter/test/painting/image_provider_resize_image_test.dart.
Run:
flutter test --platform chrome test/painting/image_provider_resize_image_test.dart
Expected Results
All ResizeImage tests pass on Chrome (both CanvasKit and Skwasm), upscaling images when allowUpscaling: true is specified.
Actual Results
16 allowUpscaling: true test cases fail because the decoded ui.Image remains at its intrinsic dimensions instead of scaling up to the size returned by getTargetSize.
Activity
[web] Honor getTargetSize when upscaling in instantiateImageCodecWith…
[web] Honor getTargetSize when upscaling in instantiateImageCodecWith…
[web] Honor requested upscaling in instantiateImageCodecWithSize and …