ruffle/desktop
Aaron Hill 98c7f443ce core: Only store viewport dimensions in `RenderBackend`
Previously, the viewport height and width were stored in
both `Stage` and the `RenderBackend`. Any changes to the viewport
dimensions (e.g. due to window resizing) needed to be updated in both
places to keep our handling of the viewport consistent.

This PR adds a new `ViewportDimensions` type, which holds the
width, height, and scale factor. It is stored inside the
`RenderBackend` impl, and is retrieved using the newly added
method `RenderBackend.get_viewport_dimensions`. After a `Player`
has been constructed, any code that needes access to the viewport
dimensions will ultimate go through this method.

Unfortunately, `Stage` needs to use the viewport dimensions
in `build_matrices`. Therefore, any code modifying the viewport
dimensions should go through `player.set_viewport_dimensions`,
which ensures that the stage matrices are rebuilt after the render
backend is updated.
2022-08-22 13:44:30 -07:00
..
assets desktop: Enable outgoing network requests on macOS app sandbox 2022-03-30 11:37:25 -07:00
packages/macOS/Contents Specify Ruffle's accent color on macOS. 2022-03-17 17:15:14 -06:00
src core: Only store viewport dimensions in `RenderBackend` 2022-08-22 13:44:30 -07:00
Cargo.toml build(deps): bump clap from 3.2.16 to 3.2.17 2022-08-16 00:30:12 +03:00
build.rs chore: Use into() in more places 2021-06-22 11:49:41 -07:00