Commit Graph

142 Commits

Author SHA1 Message Date
dependabot[bot] dd5894ebd6 chore: Bump wgpu from 0.8.0 to 0.8.1
Bumps [wgpu](https://github.com/gfx-rs/wgpu-rs) from 0.8.0 to 0.8.1.
- [Release notes](https://github.com/gfx-rs/wgpu-rs/releases)
- [Changelog](https://github.com/gfx-rs/wgpu-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gfx-rs/wgpu-rs/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-10 10:16:10 -07:00
dependabot[bot] 8e91f8dc89 chore: Bump enum-map from 1.0.0 to 1.1.0
Bumps [enum-map](https://gitlab.com/KonradBorowski/enum-map) from 1.0.0 to 1.1.0.
- [Release notes](https://gitlab.com/KonradBorowski/enum-map/tags)
- [Changelog](https://gitlab.com/KonradBorowski/enum-map/blob/master/CHANGELOG.md)
- [Commits](https://gitlab.com/KonradBorowski/enum-map/commits/master)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-10 10:15:58 -07:00
Mike Welsh c465e268bf chore: Bump to wgpu 0.8 2021-04-29 15:01:12 -07:00
Mike Welsh f0bea5d241 wgpu: Bump to latest master 2021-04-24 08:29:25 -07:00
Mike Welsh 0552d26551 core: Use Fixed8 and i16 for ColorTransform
Use the proper types for ColorTransform:
 * Fixed8 (8.8) format for multiplicative component
 * i16 format for additive component

This matches the behavior of Flash (for example, alpha only changes
in units of 1/256).
2021-04-19 15:47:52 -07:00
Mike Welsh b31b00c6d6 wgpu: Bump to latest wgpu master 2021-04-16 23:37:23 -07:00
dependabot-preview[bot] 5739992f6e build(deps): bump futures from 0.3.13 to 0.3.14
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.13 to 0.3.14.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-10 13:27:27 -07:00
dependabot-preview[bot] 34637cdd12 build(deps): bump enum-map from 0.6.4 to 1.0.0
Bumps [enum-map](https://gitlab.com/KonradBorowski/enum-map) from 0.6.4 to 1.0.0.
- [Release notes](https://gitlab.com/KonradBorowski/enum-map/tags)
- [Changelog](https://gitlab.com/KonradBorowski/enum-map/blob/master/CHANGELOG.md)
- [Commits](https://gitlab.com/KonradBorowski/enum-map/commits/master)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-08 11:53:06 -07:00
dependabot-preview[bot] 795fed2f18 build(deps): bump wgpu from 0.7.0 to 0.7.1
Bumps [wgpu](https://github.com/gfx-rs/wgpu-rs) from 0.7.0 to 0.7.1.
- [Release notes](https://github.com/gfx-rs/wgpu-rs/releases)
- [Changelog](https://github.com/gfx-rs/wgpu-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gfx-rs/wgpu-rs/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-06 15:49:38 -06:00
relrelb 648e14e057 render: Final cleanups 2021-03-23 16:16:35 -07:00
relrelb c25b58058b wgpu: Inline some variables 2021-03-23 16:16:35 -07:00
relrelb 627773d0d4 wgpu: Use common_tess
This eliminates tons of duplicate code.
2021-03-23 16:16:35 -07:00
relrelb 42f8baf5ed wgpu: Remove unused Mesh::shape_id 2021-03-23 16:16:35 -07:00
relrelb c1c9542a95 wgpu: Introduce ShapeTessellator temporarily
Eventually it'll be replaced with common_tess's one.
2021-03-23 16:16:35 -07:00
relrelb 4513a5fbda wgpu: Extract tessellate_shape from register_shape_internal
This brings us closer towards common_tess.
2021-03-23 16:16:35 -07:00
relrelb e1734a2bec wgpu: Inline IncompleteDrawType::build 2021-03-23 16:16:35 -07:00
dependabot-preview[bot] 98abaf4ca2 build(deps): bump image from 0.23.13 to 0.23.14
Bumps [image](https://github.com/image-rs/image) from 0.23.13 to 0.23.14.
- [Release notes](https://github.com/image-rs/image/releases)
- [Changelog](https://github.com/image-rs/image/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image/compare/v0.23.13...v0.23.14)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-02 16:22:31 -08:00
Mike Welsh e7d7e19c24 chore: Bump to wgpu 0.70 2021-02-27 17:52:05 -08:00
Mike Welsh 3099914374 chore: Appease clippy 2021-02-27 16:10:46 -08:00
dependabot-preview[bot] 091bc30876 build(deps): bump futures from 0.3.12 to 0.3.13
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.12 to 0.3.13.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.12...0.3.13)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-26 11:40:23 -08:00
dependabot-preview[bot] b62bf0e936 build(deps): bump bytemuck from 1.5.0 to 1.5.1
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/Lokathor/bytemuck/releases)
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.5.0...v1.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-17 22:38:58 -08:00
Aaron Hill e69503ee67
chore: Derive `Pod` and `Zeroable` traits from `bytemuck`
This removes all `unsafe` impls of `bytemuck` traits
2021-02-16 20:34:12 -08:00
Mike Welsh e5fb1f09e7 chore: Appease clippy
* #[derive(Collect)] should be before #[collect]
 * Replace redunant `&buf[..]` with `buf`
 * Changes most cases of UPPERCase to UpperCase
 * Allow upper_case_acronym on most SWF types, as they are from
   SWF spec/more annoying to change.
2021-02-12 06:32:42 -08:00
Mike Welsh 60f29719d3 core: Fix stroke artifacts when using drawing API
Some recent changes with lyon's API could cause Ruffle to draw extra
strokes when it sees two Move commands in a row -- an extra zero-length
stroke would appear. Let's merge adjacent Move commands in the
tessellator to avoid this issue.

(TODO: Add an example to visual_tests).
2021-02-05 14:54:55 -08:00
dependabot-preview[bot] a6132a504b build(deps): bump image from 0.23.12 to 0.23.13
Bumps [image](https://github.com/image-rs/image) from 0.23.12 to 0.23.13.
- [Release notes](https://github.com/image-rs/image/releases)
- [Changelog](https://github.com/image-rs/image/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-04 11:21:41 -08:00
Mike Welsh a00d072eb1 chore: Appease clippy
Remove unused viewport_width/viewport_height from wgpu renderer.
2021-01-31 01:00:41 -08:00
dependabot-preview[bot] c98c8c5ced build(deps): bump lyon from 0.17.4 to 0.17.5
Bumps [lyon](https://github.com/nical/lyon) from 0.17.4 to 0.17.5.
- [Release notes](https://github.com/nical/lyon/releases)
- [Changelog](https://github.com/nical/lyon/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nical/lyon/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-30 16:28:18 -08:00
dependabot-preview[bot] 6f14490f84 build(deps): bump jpeg-decoder from 0.1.21 to 0.1.22
Bumps [jpeg-decoder](https://github.com/image-rs/jpeg-decoder) from 0.1.21 to 0.1.22.
- [Release notes](https://github.com/image-rs/jpeg-decoder/releases)
- [Changelog](https://github.com/image-rs/jpeg-decoder/blob/master/CHANGELOG.md)
- [Commits](https://github.com/image-rs/jpeg-decoder/compare/v0.1.21...v0.1.22)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-29 11:42:19 -08:00
dependabot-preview[bot] 239ccb3511 build(deps): bump jpeg-decoder from 0.1.20 to 0.1.21
Bumps [jpeg-decoder](https://github.com/image-rs/jpeg-decoder) from 0.1.20 to 0.1.21.
- [Release notes](https://github.com/image-rs/jpeg-decoder/releases)
- [Changelog](https://github.com/image-rs/jpeg-decoder/blob/master/CHANGELOG.md)
- [Commits](https://github.com/image-rs/jpeg-decoder/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-24 11:52:39 -08:00
dependabot-preview[bot] ef428d95a7 build(deps): bump lyon from 0.17.3 to 0.17.4
Bumps [lyon](https://github.com/nical/lyon) from 0.17.3 to 0.17.4.
- [Release notes](https://github.com/nical/lyon/releases)
- [Changelog](https://github.com/nical/lyon/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nical/lyon/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-23 19:08:26 -08:00
dependabot-preview[bot] 77c3173227 build(deps): bump futures from 0.3.11 to 0.3.12
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.11 to 0.3.12.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.11...0.3.12)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-15 11:30:06 -08:00
Mike Welsh 09a48a71d8 render: Avoid asserts in masking state
Switch to debug_assert! instead of assert! in mask checks to avoid
panicking (#1347). This will render incorrectly and still needs
to be fixed, but we should fail gracefully and avoid killing the
entire player.
2021-01-14 14:18:14 -08:00
dependabot-preview[bot] fe4feb6b1c build(deps): bump futures from 0.3.10 to 0.3.11
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.10 to 0.3.11.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.10...0.3.11)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-14 12:51:40 -08:00
dependabot-preview[bot] e4d7e73ef1 build(deps): bump lyon from 0.17.1 to 0.17.3
Bumps [lyon](https://github.com/nical/lyon) from 0.17.1 to 0.17.3.
- [Release notes](https://github.com/nical/lyon/releases)
- [Changelog](https://github.com/nical/lyon/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nical/lyon/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-14 03:04:25 -08:00
dependabot-preview[bot] 88355572f4 build(deps): bump bytemuck from 1.4.1 to 1.5.0
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.4.1 to 1.5.0.
- [Release notes](https://github.com/Lokathor/bytemuck/releases)
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.4.1...v1.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-13 16:38:54 -08:00
dependabot-preview[bot] 62799966fe build(deps): bump futures from 0.3.9 to 0.3.10
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.9 to 0.3.10.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.9...0.3.10)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-13 11:56:23 -08:00
MrCheeze c4f5b7aba0 chore: Bump wgpu-rs version to prevent dx11 resize crash 2021-01-10 15:11:34 -08:00
dependabot-preview[bot] ea9576f9d4 build(deps): bump futures from 0.3.8 to 0.3.9
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.8 to 0.3.9.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.8...0.3.9)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-08 12:08:30 -08:00
Mike Welsh 03b5edd4d1 render: Remove RenderBackend::draw_letterbox
Move letterbox draw logic to `Player`, using renderer.draw_rect
2021-01-07 11:46:07 -08:00
Mike Welsh 0754f0a3b3 render: Use u32 indices 2021-01-04 18:08:14 -08:00
relrelb 9a8edda8a6 chore: Update lyon to 0.17.1 2021-01-04 18:08:14 -08:00
Mike Welsh 9b6295f33a render: Pass library to RenderBackend::register_shape (fix #2037)
Pass the movie library to `register_shape` methods so that bitmap
charcter IDs can be resolved immediately on the proper SWF.

This fixes #2037, which cause incorrect bitmaps to be used when
multiple movies were loaded.
2020-12-31 13:10:21 -08:00
Mike Welsh 6aafb46b49 desktop: Don't render while minimized
On desktop, don't render while the window is minimized.

In the wgpu backend, don't panic if swap chain fails to grab a
texture. Instead recreate the swap chain and bail on the current
frame.

Fixes panic when minimizing with the wgpu vulkan backend (#2065).
2020-12-28 16:00:13 -08:00
Mike Welsh 9e46757f5f chore: Bump to wgpu-rs master 2020-12-27 00:44:11 -08:00
Mike Welsh 1b77f0bc20 wgpu: Create bind group for textured quad for each bitmap
Instead of creating a new bind group each time a bitmap is rendered,
create a bind group for each bitmap when it is registered.
2020-12-27 00:44:11 -08:00
Mike Welsh f343aff502 wgpu: Use a single render pass and push constants
Switch to a single render pass for the whole frame, as opposed to
a render pass per draw call. This should be a large improvement to
performance. This currently requires some unsafe to work around a
self-reference between RenderPass and CommandEncoder in Frame;
this could eventually be cleaned up by changing RenderBackend
to return a Frame object instead of using begin_frame/end_frame
pairs.

Also switch to using push constants for the transform/color
uniforms.
2020-12-27 00:44:11 -08:00
Mike Welsh 8222d3095b desktop: Add --timedemo benchmark
Add --timedemo for benchmarking, which will run the given SWF as
quickly as possible for 5000 frames or the end of the root
timeline, whichever comes first. The total duration will be output
upon completion.
2020-12-26 23:59:12 -08:00
Mike Welsh 67d95e0c00 exporter: Fix panic when using --frames (fix #1614) 2020-12-26 20:39:44 -08:00
Mike Welsh 99cfdd4ea7 render: Avoid excessive clones in register_bitmap calls 2020-12-15 00:04:51 -08:00
Mike Welsh 369c5bda56 render: Implement Bitmap smoothing property 2020-12-15 00:04:51 -08:00