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
While trying to figure out how this could be fixed in winit, I got the idea that maybe this shouldn't be winits problem after all. Setting the width and height of the canvas doesn't actually resize the canvas visually, it only resizes the surface the canvas is drawing on (the browser stretches or compresses the surface to fit the visual canvas size), which sounds like it would be the job of the renderer, not the window handler. Currently winit does both, changing the visual size of the canvas and it's surface.
Describe the solution you'd like Surface::configure() gets passed the size anyway, it would then use width() and height() to resize the canvas as well.
This is what softbuffer does as well (src).
Describe alternatives you've considered
The alternative is to fix it in winit, which would require additional awareness by winit about what is done to the canvas to render to it.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
The problem is rust-windowing/winit#2733:
While trying to figure out how this could be fixed in
winit
, I got the idea that maybe this shouldn't bewinit
s problem after all. Setting thewidth
andheight
of the canvas doesn't actually resize the canvas visually, it only resizes the surface the canvas is drawing on (the browser stretches or compresses the surface to fit the visual canvas size), which sounds like it would be the job of the renderer, not the window handler. Currentlywinit
does both, changing the visual size of the canvas and it's surface.Describe the solution you'd like
Surface::configure()
gets passed the size anyway, it would then usewidth()
andheight()
to resize the canvas as well.This is what
softbuffer
does as well (src).Describe alternatives you've considered
The alternative is to fix it in
winit
, which would require additional awareness bywinit
about what is done to the canvas to render to it.The text was updated successfully, but these errors were encountered: