Skip to content

Provide an API to set a custom pixel ratio in the desktop embedder. #37620

@skycomposter

Description

@skycomposter

Use case

Given the same aspect ratio, I would like my applications to look the same on my embedder, regardless of the actual size of the window. The pixel ratio is exposed as part of the FlutterWindowMetricsEvent struct, but no way to set it explicitly is provided as part of the desktop embedder (I'm working on Linux specifically).

Proposal

It should be fairly straightforward to pass in the pixel ratio to the FlutterWindow, maybe as part of the WindowFrame passed in SetFrame() or as its own new method.
Currently it seems that the pixel ratio is used to deal with non-standard monitor resolutions, so that might make the change nontrivial.

Metadata

Metadata

Labels

a: desktopRunning on desktopcustomer: dream (g3)e: glfwGLFW desktop embeddingengineflutter/engine related. See also e: labels.platform-linuxBuilding on or for Linux specifically

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions