Commit Graph

222 Commits

Author SHA1 Message Date
Nathan Adams a2d53df49c render: Store immutable part of wgpu rendering as a reusable object, to speed up exporting 2020-10-17 04:16:24 -07:00
Nathan Adams 4dd5fcfd6a render: Don't make a new sampler for each bitmap in wgpu renderer 2020-10-17 04:16:24 -07:00
Nathan Adams 7bd4590fc2 render: Remove unused register_encoder from wgpu. There's a built in staging encoder now. 2020-10-17 04:16:24 -07:00
Mike Welsh 89c1378569 wgpu: Use premultiplied alpha for bitmaps 2020-10-17 02:42:56 -07:00
Mike Welsh 4558be948e render: Fix masking issues on wgpu/webgl backends
Change the usage of the stencil buffer to avoid running out of
stencil bits when too many nested masks are active.

This also cleans things up on wgpu which requires us to make
pipeline states in advice; now we only need a few stencil states
for masking as opposed to hundreds.
2020-10-17 02:42:56 -07:00
Nathan Adams 3f46567fc1 render: Remove PowerPreference::Default as it's no longer in wgpu 2020-10-14 13:59:25 -07:00
Nathan Adams a2593b0d52 desktop: Expose wgpu tracing through a `render_trace` feature and `--trace-path` argument 2020-10-14 13:59:25 -07:00
Nathan Adams 900553818a exporter: Expose wgpu tracing through a `render_trace` feature and `--trace-path` argument 2020-10-14 13:59:25 -07:00
Nathan Adams b68caebc23 render: Update wgpu to e3eadca8c6 2020-10-14 13:59:25 -07:00
Nathan Adams 536352a0d3 render: Move wgpu options out from desktop and into wgpu render crate 2020-10-10 13:43:18 -07:00
dependabot-preview[bot] 5f6e3ca3d4 build(deps): bump futures from 0.3.5 to 0.3.6
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.5 to 0.3.6.
- [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>
2020-10-05 13:47:58 -07:00
dependabot-preview[bot] b6f05ecf41 build(deps): bump lyon from 0.16.0 to 0.16.2
Bumps [lyon](https://github.com/nical/lyon) from 0.16.0 to 0.16.2.
- [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>
2020-09-29 05:25:14 -07:00
dependabot-preview[bot] a8876ada34 build(deps): bump image from 0.23.9 to 0.23.10
Bumps [image](https://github.com/image-rs/image) from 0.23.9 to 0.23.10.
- [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>
2020-09-29 04:50:53 -07:00
Nathan Adams e008603426 core: Add draw_rect to the render backend API 2020-09-17 16:03:16 -07:00
Mike Welsh 4190b1fc14 render: Backends use shape_utils::swf_glyph_to_shape 2020-09-15 02:34:32 -07:00
dependabot-preview[bot] 374840e4e5 build(deps): bump bytemuck from 1.4.0 to 1.4.1
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.4.0 to 1.4.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.4.0...v1.4.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-09 10:46:26 -07:00
dependabot-preview[bot] 97968ab0a0 build(deps): bump image from 0.23.8 to 0.23.9
Bumps [image](https://github.com/image-rs/image) from 0.23.8 to 0.23.9.
- [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.8...v0.23.9)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-02 12:08:51 -07:00
Nathan Adams 7273c85034 desktop: Add --power (or -p) option for choosing a graphics power preference (high for dedicated gpu, low for integrated, default for situational best) 2020-09-02 12:06:25 -07:00
Nathan Adams 3e09767c7a desktop: Add --graphics (or -g) option for choosing a graphics backend (vulkan/metal/dx12/dx11 right now) 2020-09-02 12:06:25 -07:00
Nathan Adams a191c79fca render: Workaround wgpu write-only stencil testing issue - fixes #1062 2020-08-31 05:45:42 -07:00
dependabot-preview[bot] 8943623618 build(deps): bump bytemuck from 1.3.1 to 1.4.0
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.3.1 to 1.4.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.3.1...v1.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-28 13:14:35 -07:00
Nathan Adams 0b93e76a27 render: Add more debug labels to wgpu renderer 2020-08-27 11:02:28 -07:00
Nathan Adams 34fc3c574b render: Update wgpu to 0.6 2020-08-27 11:02:28 -07:00
dependabot-preview[bot] d05a8af32b build(deps): bump lyon from 0.15.9 to 0.16.0
Bumps [lyon](https://github.com/nical/lyon) from 0.15.9 to 0.16.0.
- [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>
2020-08-03 11:32:00 -07:00
dependabot-preview[bot] e8214f2305 build(deps): bump image from 0.23.7 to 0.23.8
Bumps [image](https://github.com/image-rs/image) from 0.23.7 to 0.23.8.
- [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.7...v0.23.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-27 05:01:54 -07:00
dependabot-preview[bot] 938a129a49 build(deps): bump bytemuck from 1.3.0 to 1.3.1
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.3.0 to 1.3.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/commits/v1.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-27 03:16:49 -07:00
dependabot-preview[bot] c3127c0506 build(deps): bump bytemuck from 1.2.0 to 1.3.0
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.2.0 to 1.3.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.2.0...v1.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-24 20:10:56 -07:00
dependabot-preview[bot] c353d1f079 build(deps): bump image from 0.23.6 to 0.23.7
Bumps [image](https://github.com/image-rs/image) from 0.23.6 to 0.23.7.
- [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.6...v0.23.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-12 15:12:48 -07:00
dependabot-preview[bot] 31e816bf52 build(deps): bump lyon from 0.15.8 to 0.15.9
Bumps [lyon](https://github.com/nical/lyon) from 0.15.8 to 0.15.9.
- [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>
2020-07-05 13:51:54 -07:00
dependabot-preview[bot] 328246dc10 build(deps): bump jpeg-decoder from 0.1.19 to 0.1.20
Bumps [jpeg-decoder](https://github.com/image-rs/jpeg-decoder) from 0.1.19 to 0.1.20.
- [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.19...v0.1.20)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-04 15:29:45 -07:00
Mike Welsh 7d1b3f86f5 render: Filter out consecutive MoveTo drawing commands
lyon would emit a small line segment if a stroke path had
consective MoveTo commands. For the lyon backends, filter out
consecutive MoveTos and only emit the final MoveTo command.

This fixes a small dot appearing in text fields using underlines.
2020-06-24 14:09:10 -07:00
dependabot-preview[bot] abeece7e78 build(deps): bump image from 0.23.5 to 0.23.6
Bumps [image](https://github.com/image-rs/image) from 0.23.5 to 0.23.6.
- [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.5...v0.23.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-20 13:29:30 -07:00
dependabot-preview[bot] 7793b1a188 build(deps): bump image from 0.23.4 to 0.23.5
Bumps [image](https://github.com/image-rs/image) from 0.23.4 to 0.23.5.
- [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.4...v0.23.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-10 17:04:52 -07:00
Nathan Adams df6764a69c chore: Add license metadata to all packages & crates 2020-05-27 00:11:02 -07:00
Mike Welsh 103c7a98f0 wgpu: Implement linear RGB gradients 2020-05-22 11:03:16 -07:00
Nathan Adams eda862c719 swf: Merged core::Matrix into swf::Matrix 2020-05-20 14:54:41 +02:00
Nathan Adams 7ab6703fc9 render: Add RenderBackend::replace_shape method 2020-05-20 14:54:40 +02:00
Nathan Adams f7b5f14f65 core: Make RenderBack::register_bitmap* methods return a Result (fixes #531) 2020-05-19 07:12:36 -07:00
Mike Welsh 3b550a111f wgpu: Hook up gradient spread mode and focal point 2020-05-15 00:13:36 -07:00
Nathan Adams 4cbae59947 render: Give a useful error message if running without a compatible graphics device (#588) 2020-05-14 21:38:12 -07:00
Nathan Adams 0047546074 render: Ensure that the wgpu device is compatible with the window we're
going to render to
2020-05-14 21:38:12 -07:00
Nathan Adams 4f5e9cca1f render: Fix wgpu captures being the wrong image format 2020-05-14 01:19:23 -07:00
Mike Welsh 5d84d33710 render: Handle PNG data in DefineBitsJPEG tags (fix #530) 2020-05-13 00:15:09 -07:00
Nathan Adams fe4676a185 renderer: Don't crash when encountering unknown bitmap_fills 2020-05-11 01:09:07 -07:00
Nathan Adams 1bde973615 render: Use Rc<> for wgpu device and queue, so we can reuse them 2020-05-11 01:09:07 -07:00
Nathan Adams 9ab03b4da6 exporter: Added exporter tool for capturing images of swfs (related to #523) 2020-05-11 01:09:07 -07:00
Nathan Adams 2343074c56 core: Make RenderBackend downcastable 2020-05-11 01:09:07 -07:00
Nathan Adams a4905536b9 render: Add texture target for wgpu render backend 2020-05-11 01:09:07 -07:00
Nathan Adams 84b274618e render: Made wgpu renderer agnostic to if it's going to a window, prep for output-to-buffer 2020-05-11 01:09:07 -07:00
Nathan Adams 1aa3e423d7 render: Changed gradient uniform in wgpu shader to a SSBO instead of UBO, saving 192 bytes on each buffer 2020-05-10 23:48:11 -07:00
Nathan Adams 89202cd8db render: Prefer dedicated GPU over integrated GPU 2020-05-10 23:48:11 -07:00
Nathan Adams dcf845b26c render: Don't submit a command buffer for every image upload to wgpu 2020-05-10 23:48:11 -07:00
Nathan Adams c787e28fcd render: Introduce a DistilledShape and use that instead of swf::Shape for the rendering API 2020-05-10 22:03:56 -07:00
Nathan Adams 601715aa19 render: Merge begin_frame and clear as they're always called together 2020-05-10 22:03:56 -07:00
dependabot-preview[bot] 4abab576a1 build(deps): bump futures from 0.3.4 to 0.3.5
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.4 to 0.3.5.
- [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.4...0.3.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-10 10:28:44 +00:00
Nathan Adams 47a44a5fe8 desktop: Prime window with known width/height of the movie 2020-05-04 16:07:38 -07:00
Mike Welsh 5ead49a067 wgpu: Clamp minimum framebuffer size to 1 to avoid panic 2020-05-02 08:44:15 -07:00
Mike Welsh bfe57a3c66 wgpu: Toss out degenerate draws
wgpu would panic in this case, so filter out draws with < 3 indices.
2020-04-30 20:02:11 -07:00
Mike Welsh beb0eba3a3 chore: WGPURenderBackend -> WgpuRenderBackend 2020-04-30 20:00:07 -07:00
Mike Welsh 552ddd531b wgpu: Add MSAA support (default to 4x for now) 2020-04-30 19:56:07 -07:00
Nathan Adams 760677a2a1 render: Add From<ColorTransform> for ColorAdjustments uniforms 2020-04-30 16:40:08 +02:00
Nathan Adams 99d15aef0d render: Cache color transforms in wgpu backend, don't re-upload unchanged values 2020-04-30 16:33:41 +02:00
Nathan Adams 90195340c3 render: Implement letterbox on wgpu renderer 2020-04-30 16:15:35 +02:00
Nathan Adams 9599b2d09f render: Move some loose utility functions to utils.rs in wgpu renderer 2020-04-30 08:48:34 +02:00
Nathan Adams f4abf4b705 render: Split off shape/mesh code into its own file in wgpu renderer 2020-04-30 08:48:34 +02:00
Nathan Adams 1879d7f29e render: Implement render_bitmap for wgpu renderer 2020-04-30 08:48:34 +02:00
Nathan Adams 36d9d3ce4a render: Implement masks in wgpu renderer 2020-04-30 08:48:34 +02:00
Nathan Adams bdaf86dc3b render: Add Pipelines struct to group together wgpu pipelines 2020-04-30 08:48:34 +02:00
Nathan Adams dd1fa2700f render: Split off macros & pipeline creation from wgpu renderer 2020-04-30 08:48:34 +02:00
Nathan Adams c42333e254 render: Added feature render_debug_labels to enable debugging and profiling of wgpu renderer in external tools 2020-04-30 08:48:34 +02:00
Nathan Adams c2290ed5ef render: Remove dependency on winit from wgpu renderer 2020-04-30 08:48:33 +02:00
Nathan Adams f0445d94b8 render: Add wgpu-rs based renderer, used by desktop 2020-04-30 08:48:33 +02:00