Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Remove hard-coded devicePixelRatio from paintImage #117477

Closed
@goderbauer

Description

@goderbauer

paintImage currently hard-codes the device pixel ratio by reaching out to the window singleton:

// It's ok to use this instead of a MediaQuery because if this changes,
// whatever is aware of the MediaQuery will be repainting the image anyway.
displaySize: outputSize * PaintingBinding.instance.window.devicePixelRatio,

In a multi-viewed world, this will not work anymore because paintImage has no idea what view the image is getting painted on. This will need to be refactored to get the devicePixelRatio passed in.

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: imagesLoading, displaying, rendering imagesframeworkflutter/packages/flutter repository. See also f: labels.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions