relrelb
2aaf337b6a
swf: Introduce `BlurFilterFlags`
2023-02-21 16:55:13 +02:00
renovate[bot]
a27bd66b58
fix(deps): update rust dependency patches
2023-02-13 04:59:31 +01:00
Aaron Hill
c597f9f996
core: Fix Clippy lints on nightly
2023-02-13 03:38:54 +01:00
renovate[bot]
fed24aa243
fix(deps): update rust dependencies - wasm-bindgen related
2023-02-13 02:57:52 +01:00
Nathan Adams
0e9b1e4a77
wgpu: Better support for 2x and 8x msaa
2023-02-06 16:08:04 +01:00
Nathan Adams
68761608fc
desktop: Add --quality option
2023-02-06 16:08:04 +01:00
Nathan Adams
1cb3ea7bf9
wgpu: Store quality, not sample_count, and calculate the correct sample count per format
2023-02-06 16:08:04 +01:00
Nathan Adams
b95983b492
wgpu: Hook up set_quality
2023-02-06 16:08:04 +01:00
Nathan Adams
d8e924affc
render: Add RenderBackend::set_quality method, and call it from core
2023-02-06 16:08:04 +01:00
Nathan Adams
b270d1bbd7
render: Move StageQuality from core to render
2023-02-06 16:08:04 +01:00
Nathan Adams
3411a04cef
render: Made render specific Filter enum & structs, as swf ones don't map 1:1 to potential filters
2023-02-05 18:41:43 +01:00
Nathan Adams
b5a250e16f
render: Changed render_offscreen to return an Option instead of an Result
2023-02-05 18:41:43 +01:00
Nathan Adams
e73389aa71
wgpu: Implement blur filter
2023-02-05 18:41:43 +01:00
Nathan Adams
284a58c817
avm2: Implement BitmapData.apply_filter for ColorMatrixFilter
2023-02-05 18:41:43 +01:00
Nathan Adams
72bfd499f8
wgpu: Reuse whole-mesh uniform buffer for gradients
2023-02-05 18:02:19 +01:00
Nathan Adams
013a2424ef
wgpu: Only use uniform buffers for gradients, we don't need storage buffers now that we squeeze the ratios into alignment
2023-02-05 18:02:19 +01:00
Nathan Adams
3bc7d44e9c
wgpu: Reuse the same vertex and index buffer for an entire mesh
2023-02-05 18:02:19 +01:00
Nathan Adams
571a1780e2
wgpu: Provide usage and alignment to BufferBuilder
2023-02-05 18:02:19 +01:00
Nathan Adams
cbc227b0a0
wgpu: Split up mesh creation into a 2 step process so we can reuse the same buffer for each draw
2023-02-05 18:02:19 +01:00
Nathan Adams
a3a7f79f04
render: Switch from log to tracing
2023-02-05 18:02:19 +01:00
Nathan Adams
f9b378b29a
wgpu: Changed most pipelines & shaders to only use Pos, not Pos and Color, as vertex attribs
2023-02-05 18:02:19 +01:00
renovate[bot]
caaf6d5c87
fix(deps): update rust dependencies
2023-01-31 09:39:42 -06:00
Nathan Adams
5dd3060a28
wgpu: Ensure we clear before blending an object onto nothing
2023-01-29 20:45:01 +01:00
Nathan Adams
7b1c101c81
wgpu: Fix repeat & reflect gradients
2023-01-29 17:17:44 +01:00
Aaron Hill
184734267d
tests: Deny unknown fields when deserializing test.toml files
...
This will catch typos and misplaced options when modifying tests.
2023-01-28 16:27:43 -06:00
Nathan Adams
9b43836d1d
tests: Allow executing of with_renderer tests always, but image comparison is still gated
2023-01-28 12:15:59 -07:00
Nathan Adams
7d234956eb
tests: Move tests away from giant macro to individual test.toml files that describe the test
2023-01-27 13:53:43 +01:00
renovate[bot]
8b6eef1715
fix(deps): update rust dependencies
2023-01-24 20:10:40 -06:00
Nathan Adams
1bfa69ade2
wgpu: Guard against infinite loops in gradient shader - fixes #9260
2023-01-23 23:25:30 +01:00
Aaron Hill
ffc393e3e8
render: Work around naga_oil duplicate definition bug
2023-01-23 11:31:04 +01:00
Aaron Hill
fc3c2a2297
Update wgpu
...
This requires us to bump naga as well, and switch to a fork
of naga_oil that compiles against the latest naga.
2023-01-23 11:31:04 +01:00
Aaron Hill
a71d14d31c
Fix wasm build
2023-01-23 11:31:04 +01:00
Aaron Hill
0fe8ef6c2d
Get naga_oil shaders working
2023-01-23 11:31:04 +01:00
Aaron Hill
6fe7af58d5
Move back to upstream wgpu repository
...
We're relying on unreleased changes, so we depend on the latest commit
from their repository.
2023-01-23 11:31:04 +01:00
Aaron Hill
e2954821ea
core: Take two - delay reading image back from render backend using `SyncHandle` ( #9184 )
...
* Take two: Delay reading image back from render backend using `SyncHandle`
This allows us to avoid blocking immediately after a `BitmapData.draw` call.
Instead, we only attempt to use the `SyncHandle` when performing an operation
that requires the CPU-side pixels (e.g. BitmapData.getPixel or BitmapData.setPixel).
In the best case, the SWF will never explicitly access the pixels of
the target BitmapData, removing the need to ever copy back the render backend
image to our BitmapData. If the SWF doesn't require access to the pixels immediately,
we can delay copying the pixels until they're actually needed, hopefully allowing
the render backend to finish processing the BitmapData.draw operation in
the backenground before we need the result.
Now that the CPU and GPU pixels can be intentionally out of sync with
each other, we need to ensure that we don't accidentally expose 'stale'
CPU-side pixels to ActionScript (which needs to remain unaware of
our internal laziness). We now use a wrapper type `BitmapDataWrapper`
to enforce that the `SyncHandle` is consumed before accessing the
underlying `BitmapData.
* core: Skip GPU->CPU sync for source and target BitmapData during draw
* Introduce DirtyState enum
2023-01-21 21:08:04 +00:00
Nathan Adams
b5c6d5debe
wgpu: Don't panic if rendering a None bitmap - fixes #9188
2023-01-17 19:34:51 +01:00
Nathan Adams
580cce29db
wgpu: Update to wgpu fork with buffer bug fix
2023-01-17 05:59:55 +01:00
Nathan Adams
3c4710cfb5
wgpu: Only show current limits in debug info
2023-01-16 23:18:42 +01:00
TÖRÖK Attila
ec462115ef
core: nit: Use `strip_prefix` instead of `starts_with` and subslicing.
...
As suggested by relrelb in a review note for #8820 .
2023-01-16 17:33:41 +01:00
Nathan Adams
6138714fa7
wgpu: Fix buffer bug detection
2023-01-16 17:22:04 +01:00
Mike Welsh
9cd6849772
core: Append EOI marker to JPEG data when missing
...
Fixes #4209 .
2023-01-16 03:03:28 +01:00
Mike Welsh
cceb18910b
core: Fix handling of invalid EOI+SOI marker in JPEG data ( fix #8775 )
...
Previously we were removing the first occurrence of the invalid
0xFFD9FFD8 byte sequence in JPEG data, but this would break the
JPEG if it happened to contain this byte sequence elsewhere (for
example, EXIF data). Instead, properly parse the JPEG markers
searching for the invalid marker sequence.
Fixes #8775 .
2023-01-16 03:03:28 +01:00
Nathan Adams
3279a920b4
wgpu: Use a temporary wgpu fork that increases push constants limit on webgl & speeds up start time
2023-01-15 18:19:11 +01:00
Nathan Adams
1b42ad0ab4
wgpu: Keep globals cache across the buffer pool
2023-01-14 19:35:16 +01:00
Nathan Adams
2e7201334d
wgpu: Detect if buffers are unusable on web and fail to create wgpu renderer if so
2023-01-12 18:37:28 +01:00
Nathan Adams
8db8e4669a
wgpu: Implement Multiply blend mode as a trivial blend
2023-01-12 10:54:03 -05:00
Nathan Adams
09608c2abc
wgpu: Implement Screen blend mode as a trivial blend
2023-01-12 10:54:03 -05:00
Nathan Adams
9cd850d30e
render: Make render_offscreen return a sync handle which can be used to get the texture at a later time
2023-01-11 16:53:33 -05:00
renovate[bot]
630558a936
fix(deps): update rust dependencies
2023-01-10 16:37:40 +01:00
Nathan Adams
f5a587ce61
render: Better error message when points is empty
2023-01-10 11:10:46 +01:00
Nathan Adams
e7dd3cc0f8
render: Add better expect messages for as_bitmap_data impls
2023-01-10 11:10:46 +01:00
Nathan Adams
3ead9aede9
webgl: Disallow unwrap() and unwrap_err() in webgl crate
2023-01-10 11:10:46 +01:00
Nathan Adams
0f5765d5cc
webgl: Removed all unwraps and replaced with actual errors or expects
2023-01-10 11:10:46 +01:00
Nathan Adams
052ac06d85
canvas: Disallow unwrap() and unwrap_err() in canvas crate
2023-01-10 11:10:46 +01:00
Nathan Adams
312c23c4eb
canvas: Removed unwraps and replaced with either warns, ignores or expects
2023-01-10 11:10:46 +01:00
Nathan Adams
5ae569983b
render: Disallow unwrap() and unwrap_err() in render crate
2023-01-10 11:10:46 +01:00
Nathan Adams
85f0c9dde9
render: Replaced unwrap with expect in shape_utils
2023-01-10 11:10:46 +01:00
Nathan Adams
8f684d6943
render: Removed unwrap/panic when working with empty shapes
2023-01-10 11:10:46 +01:00
Nathan Adams
62f9b11417
wgpu: Fixed color shader working in correct color space
2023-01-10 09:39:28 +01:00
Nathan Adams
ae75a3c166
wgpu: Use push constants for both Transforms and ColorAdjustments, when available
2023-01-10 09:39:28 +01:00
Nathan Adams
fb78a39125
wgpu: Switch to experimental crate naga_oil for combining shaders
2023-01-10 09:39:28 +01:00
Nathan Adams
4e5749a7e4
wgpu: When push constants are available, use those for Transforms
2023-01-10 09:39:28 +01:00
Nathan Adams
fa9db9145d
wgpu: Removed double references
2023-01-10 09:39:28 +01:00
Nathan Adams
ad3060e70c
wgpu: Specialcase draw_rect with white as that's just identity color transform
2023-01-10 09:39:28 +01:00
Nathan Adams
53d6fa4d8b
render: Make render commands take in an actual value, not ref for immediate cloning
2023-01-10 09:39:28 +01:00
Nathan Adams
b07a01da57
wgpu: Cache texture views along side their owned textures in texture pool
2023-01-09 20:40:45 +01:00
Nathan Adams
4d85b6a75b
wgpu: Hook up wgpu renderer, and wgpu's profiling, to tracy
2023-01-08 20:02:26 +01:00
Moulins
d332a174c3
Bump `gc-arena` to current master revision
...
This required small changes to some Debug impls that were missed in #8964
2023-01-06 18:22:43 -05:00
Nathan Adams
b7bc835def
wgpu: Use Stencil8
2023-01-06 06:29:43 +01:00
Nathan Adams
69e98d23ad
wgpu: Update to wgpu 630c12fe47a7bc0dc9ec6217f3903ec6fd6e3fac
2023-01-06 06:29:43 +01:00
Nathan Adams
d6b8d6e488
webgl: Added debug info to webgl renderer
2023-01-05 05:51:32 +01:00
Nathan Adams
a69d30bb67
render: Add debug info method to renderer backends
2023-01-05 05:51:32 +01:00
Aaron Hill
10491a1be9
core: Store data in `BitmapData` instead of `Bitmap`
...
This makes `Bitmap` delegate to `BitmapData` for
all of the bitmap-related information (handle, width, and height).
As a result, we now unconditionally store a `BitmapData` in `Bitmap`.
As a result, swapping the underling `BitmapData` instance will
automatically change the properties (and rendered image) of a `Bitmap`.
This required some refactoring in the render backends in order to
get access to a `BitmapHandle` through `BitmapData`.
2023-01-03 18:01:41 -07:00
dependabot[bot]
b15c1bbfa3
build(deps): bump once_cell from 1.16.0 to 1.17.0
...
Bumps [once_cell](https://github.com/matklad/once_cell ) from 1.16.0 to 1.17.0.
- [Release notes](https://github.com/matklad/once_cell/releases )
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md )
- [Commits](https://github.com/matklad/once_cell/compare/v1.16.0...v1.17.0 )
---
updated-dependencies:
- dependency-name: once_cell
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-01-03 10:11:05 +02:00
Aaron Hill
172326005b
Remove lifetime parameter from CommandHandler
...
The wgpu backend no longer needs this.
2023-01-03 04:37:28 +01:00
Nathan Adams
3b209bd6aa
wgpu: Use frame-temporary buffer for offscreen rendering
2023-01-03 03:39:13 +01:00
Nathan Adams
533d104337
wgpu: Don't load or store the depth side of the depth buffer, we only care for stencil
2023-01-03 03:39:13 +01:00
Nathan Adams
eaff82ea7e
wgpu: Cleaned up some buffer binding api
2023-01-03 03:39:13 +01:00
Nathan Adams
28768f2ad8
render: Make CommandList a struct instead of a tuple
2023-01-03 03:39:13 +01:00
Nathan Adams
3dd9c4daa3
wgpu: Moved ColorAdjustments into its own bind group, and reuse ColorAdjustments::IDENTITY where we can
2023-01-03 03:39:13 +01:00
Nathan Adams
353a3116a4
wgpu: Define the sizes of uniforms upfront instead of at each call
2023-01-03 03:39:13 +01:00
Nathan Adams
ae5d92693f
wgpu: Moved DrawCommand handling to CommandRenderer::execute
2023-01-03 03:39:13 +01:00
Nathan Adams
7944b6dd9e
wgpu: Inlined CommandRenderer::execute into Surface::draw_commands
2023-01-03 03:39:13 +01:00
Nathan Adams
a71b5b4570
wgpu: Move command renderer to surface/commands.rs
2023-01-03 03:39:13 +01:00
Nathan Adams
0272eda121
wgpu: Refactor surface command target to its own file
2023-01-03 03:39:13 +01:00
Nathan Adams
a657feadae
wgpu: Clear out texture pool when resized
2023-01-03 03:39:13 +01:00
Nathan Adams
cb6d72b49b
wgpu: Split up gradient shader based on type and repeat
2023-01-03 03:39:13 +01:00
Nathan Adams
a79e73fb12
wgpu: Clean up gradient shaders by bringing out common shared source into a same file
2023-01-03 03:39:13 +01:00
Nathan Adams
b4c2030af8
wgpu: Appease beta clippy. again.
2023-01-03 03:39:13 +01:00
Nathan Adams
91561e8c35
wgpu: Reduce gradient.ratios uniform memory by 4x
2023-01-03 03:39:13 +01:00
Nathan Adams
312e72451f
wgpu: Reduce gradient.colors uniform memory by 4x
2023-01-03 03:39:13 +01:00
Nathan Adams
986b95c50c
wgpu: Share texture pool across all frames, and ensure targets are cleared properly
2023-01-03 03:39:13 +01:00
Nathan Adams
c0ec5c5010
wgpu: Split up blend modes into their own shaders for performance
2023-01-03 03:39:13 +01:00
Nathan Adams
92a6c6bc76
wgpu: Add more debug labels within render passes
2023-01-03 03:39:13 +01:00
Nathan Adams
1863c93be1
wgpu: Add some more debug labels
2023-01-03 03:39:13 +01:00
Nathan Adams
257bbc8ec9
wgpu: Revert using same pool for whole frame - breaks bitmapdata.draw and I'm not sure why yet
2023-01-03 03:39:13 +01:00
Nathan Adams
0f676fc6ce
wgpu: Simplify blend_buffers map creation
2023-01-03 03:39:13 +01:00
Nathan Adams
ec7840f412
wgpu: Try harder to find render passes where we don't need depth
2023-01-03 03:39:13 +01:00
Nathan Adams
c6045a4f24
wgpu: Multiply can't be trivial blend mode because of 0 alpha
2023-01-03 03:39:13 +01:00
Nathan Adams
342b9b9007
wgpu: Removed some needless copies in command iteration
2023-01-03 03:39:13 +01:00
Nathan Adams
81f4741300
wgpu: Default msaa on mobiles to 2x, same as webgl backend
2023-01-03 03:39:13 +01:00
Nathan Adams
7fb2ec096e
wgpu: Don't wait for the entire frame to be drawn if we're just capturing a segment of the render list
2023-01-03 03:39:13 +01:00
Nathan Adams
75790606a0
wgpu: Share the buffer pool throughout the entire frame
2023-01-03 03:39:13 +01:00
Nathan Adams
f253abdbd1
wgpu: Made Multiply, Add and Subtract blend modes use bitmap+blend
2023-01-03 03:39:13 +01:00
Nathan Adams
e69d76fa41
wgpu: Cache Globals for a total draw frame, don't remake it if it's going to be the same values
2023-01-03 03:39:13 +01:00
Nathan Adams
03b62a93e6
wgpu: Pool textures during the same frame, and drop whatever we don't need immediately
2023-01-03 03:39:13 +01:00
Nathan Adams
4e51c9455e
wgpu: Don't require VERTEX_WRITABLE_STORAGE which is unavailable on web
2023-01-03 03:39:13 +01:00
Nathan Adams
53b8907b78
wgpu: Optimise rendering blendables by queueing everything up in the same command buffer, allowing gpu to async where needed, instead of one command list at a time
2023-01-03 03:39:13 +01:00
Nathan Adams
cb2b27ba03
wgpu: Don't create depth buffers, or use any depth testing, if we aren't expecting masks
2023-01-03 03:39:13 +01:00
Nathan Adams
05f49dd487
wgpu: Appease beta clippy
2023-01-03 03:39:13 +01:00
Nathan Adams
7e564185b5
wgpu: Handle alpha correctly for add or subtract blendmodes
2023-01-03 03:39:13 +01:00
Nathan Adams
b72dc1edd4
wgpu: Don't create blend buffers until they're needed
2023-01-03 03:39:13 +01:00
Nathan Adams
b0e345335f
wgpu: Workaround naga-vulkan bug with default position in switch statement
2023-01-03 03:39:13 +01:00
Nathan Adams
219fabbc0b
wgpu: For trivial blends (ie Normal), just draw them as bitmaps with a blendstate
2023-01-03 03:39:13 +01:00
Nathan Adams
8311ddb0da
wgpu: Allow for different sized subcommand list targets, but don't use them yet
2023-01-03 03:39:13 +01:00
Nathan Adams
f48de7b34e
wgpu: Always clear the first texture buffer to the desired color
2023-01-03 03:39:13 +01:00
Nathan Adams
7904c3d4f0
wgpu: Implement all blend modes
2023-01-03 03:39:13 +01:00
Nathan Adams
f9333e2626
wgpu: Perform command rendering recursively and chunk up blends. Blends are still not implemented, it just copies to parent.
2023-01-03 03:39:13 +01:00
Nathan Adams
915040ba06
wgpu: Globals should now belong to the Surface and doesn't need to be mutable anymore
2023-01-03 03:39:13 +01:00
Nathan Adams
d2185733b4
wgpu: Simplify Surface to no longer be an enum as there's not really many options anymore
2023-01-03 03:39:13 +01:00
Nathan Adams
4cdb8ec634
wgpu: Frame no longer owns UniformBuffer
2023-01-03 03:39:13 +01:00
Nathan Adams
1df82e8104
wgpu: Separated srgb out of Surface
2023-01-03 03:39:13 +01:00
Nathan Adams
4502f9b7ea
wgpu: Removed blendmode stuff
2023-01-03 03:39:13 +01:00
Nathan Adams
ded46e20e7
render: Replace PushBlendMode/PopBlendMode with Blend
2023-01-03 03:39:13 +01:00
dependabot[bot]
664c67ea27
build(deps): bump clap from 4.0.29 to 4.0.32
...
Bumps [clap](https://github.com/clap-rs/clap ) from 4.0.29 to 4.0.32.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.29...v4.0.32 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-12-26 22:04:33 +01:00
dependabot[bot]
5ea1076e35
build(deps): bump enum-map from 2.4.1 to 2.4.2
...
Bumps [enum-map](https://github.com/xfix/enum-map ) from 2.4.1 to 2.4.2.
- [Release notes](https://github.com/xfix/enum-map/releases )
- [Changelog](https://github.com/xfix/enum-map/blob/master/CHANGELOG.md )
- [Commits](https://github.com/xfix/enum-map/compare/v2.4.1...v2.4.2 )
---
updated-dependencies:
- dependency-name: enum-map
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-12-19 16:30:46 -08:00
CUB3D
1013a6a162
avm2: Button bounds_with_transform should include bounds of current state child
2022-12-18 13:32:24 -07:00
CUB3D
690191dbdf
avm2: Fix SimpleButton bounds
2022-12-18 13:32:24 -07:00
Mike Welsh
696c9062d3
chore: Inherit cargo metadata from workspace
...
Use workspace inheritance added in Rust 1.64 to de-duplicate
various settings across all packages.
2022-12-16 15:53:59 -08:00
relrelb
bd9078addf
chore: Fix `clippy::uninlined_format_args` lints
2022-12-15 08:59:38 +02:00
relrelb
cf03ee7430
wgpu: Bump to 0.14.2
2022-12-14 23:59:53 +02:00
dependabot[bot]
d6c8d5d3fd
build(deps): bump insta from 1.22.0 to 1.23.0
...
Bumps [insta](https://github.com/mitsuhiko/insta ) from 1.22.0 to 1.23.0.
- [Release notes](https://github.com/mitsuhiko/insta/releases )
- [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mitsuhiko/insta/compare/1.22.0...1.23.0 )
---
updated-dependencies:
- dependency-name: insta
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-12-12 23:47:32 +01:00
dependabot[bot]
6136c2fa74
build(deps): bump insta from 1.21.2 to 1.22.0
...
Bumps [insta](https://github.com/mitsuhiko/insta ) from 1.21.2 to 1.22.0.
- [Release notes](https://github.com/mitsuhiko/insta/releases )
- [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mitsuhiko/insta/compare/1.21.2...1.22.0 )
---
updated-dependencies:
- dependency-name: insta
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-12-05 23:49:58 +01:00
Aaron Hill
173a1a80cb
Fix BitmapHandle downcasting in webgl and canvas backends
...
There were two issues:
1. We were accidentally calling `as_any` on `handle,` rather than
`handle.0`
2. Calling `as_any` can invoke the wrong implementation, depending on
what traits are in scope. We want the method implemented on the
underlying type (`RegistryData`) to be used, but if `Downcast` is
explicitly imported, then we appear to invoke it on the trait object
`dyn BitmapHandleImpl` itself (using the fact that trait objects
themselves implement `Any`). We now explicitly call the generated
method on the trait object, which avoids this issue.
2022-12-04 14:53:00 -06:00
Aaron Hill
1b3070ab85
core: Make `BitmapHandle` hold a trait object instead of an id
...
`BitmapHandle` now holds `Arc<dyn BitmapHandleImpl>`.
This allows us to move all of the per-bitmap backend data into
`BitmapHandle`, instead of holding an id to a backend-specific
hashmap.
This fixes the memory leak issue with bitmaps. Once the AVM side of a
bitmap (`Bitmap`/`BitmapData`) gets garbage-collected, the
`BitmapHandle` will get dropped, freeing all of the GPU resources
assoicated with the bitmap.
2022-12-03 19:44:44 -06:00
Adrian Wielgosik
0861153626
swf: make Clippy happy
2022-12-03 22:18:22 +01:00
dependabot[bot]
281ca6a1b8
build(deps): bump insta from 1.21.1 to 1.21.2
...
Bumps [insta](https://github.com/mitsuhiko/insta ) from 1.21.1 to 1.21.2.
- [Release notes](https://github.com/mitsuhiko/insta/releases )
- [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mitsuhiko/insta/compare/1.21.1...1.21.2 )
---
updated-dependencies:
- dependency-name: insta
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-30 12:36:14 +01:00
Marco Grassi
ad81b3bf14
upgrade lock and toml dependencies
2022-11-26 14:04:59 -05:00
Aaron Hill
b8745f0ff1
avm2: Partially implement Stage3D for wgpu backend
...
This PR implements core 'stage3D' APIs. We are now able
to render at least two demos from the Context3D docs - a simple
triangle render, and a rotating cube.
Implemented in this PR:
* Stage3D access and Context3D creation
* IndexBuffer3D and VertexBuffer3D creation, uploading, and usage
* Program3D uploading and usage (via `naga-agal`)
* Context3D: configureBackBuffer, clear, drawTriangles, and present
Not yet implemented:
* Any 'dispose()' methods
* Depth and stencil buffers
* Context3D texture apis
* Scissor rectangle
General implementation strategy:
A new `Object` variant is added for each of the Stage3D objects
(VertexBuffer3D, Program3D, etc). This stores a handle to the
parent `Context3D`, and (depending on the object) a handle
to the underlying native resource, via `Rc<dyn
SomeRenderBackendTrait>`).
Calling methods on Context3D does not usually result in an immediate
call to a `wgpu` method. Instead, we queue up commands in our
`Context3D` instance, and execute them all on a call to `present`.
This avoids some nasty wgpu lifetime issues, and is very similar
to the approah we use for normal rendering.
The actual rendering happens on a `Texture`, with dimensions
determined by `createBackBuffer`. During 'Stage' rendering,
we render all of these Stage3D textures *behind* the normal
stage (but in front of the overall stage background color).
2022-11-25 21:43:00 -07:00
Aaron Hill
104b2265f2
Fix rebase fallout
2022-11-25 16:08:42 -07:00
Aaron Hill
3bef8c4fd6
render: Remove `get_bitmap_pixels` and store data in `Character::Bitmap`
...
We only called `get_bitmap_pixels` when creating a `BitmapData`
for an SWF-provided `Bitmap`. We now store the initial pixels
in `Character::Bitmap`, and use them to initialize a `BitmapData`
when needed.
This lets us simplify the wgpu backend, which no longer needs
to store a `Bitmap` object. In addition to saving space for
`BitmapData` objects that lack an SWF `Bitmap`, this will make
it easier to move data from `bitmap_registry` into `BitmapHandle`
itself.
2022-11-25 16:08:42 -07:00
Mark Richins
d345523d02
Fix conflicts
2022-11-23 20:45:37 -07:00
Mark Richins
63a291ac4b
Fix promblems caused by moving Twips
2022-11-23 20:45:37 -07:00
Aaron Hill
bdadb17a95
render: Don't use BitmapHandle in tessellator
...
Currently, we rely on ShapeTessellator being able to get a BitmapHandle
without a RenderBackend. With the upcoming BitmapData refactor,
we will always need a RenderBackend to get a BitmapHandle, which creates
borrow-checker issues in ShapeTessellator (which is stored in a
RenderBackend).
To solve this, we split BitmapSource.bitmap into two methods -
BitmapSource.bitmap and BitmapSource.bitmap_handle. ShapeTessellator
continues to use BitmapSource.bitmap, and uses the u16 bitmap id
instead of a BitmapHandle. The BitmapSource.bitmap_handle method
is used inside each render backend to convert the id to a BitmapHandle,
avoiding borrow-checker issues.
2022-11-21 21:04:40 -07:00
dependabot[bot]
ccb1fa1b1b
build(deps): bump clap from 4.0.24 to 4.0.26
...
Bumps [clap](https://github.com/clap-rs/clap ) from 4.0.24 to 4.0.26.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.24...v4.0.26 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-21 18:07:28 -07:00
dependabot[bot]
c2319da673
build(deps): bump gif from 0.11.4 to 0.12.0
...
Bumps [gif](https://github.com/image-rs/image-gif ) from 0.11.4 to 0.12.0.
- [Release notes](https://github.com/image-rs/image-gif/releases )
- [Changelog](https://github.com/image-rs/image-gif/blob/master/Changes.md )
- [Commits](https://github.com/image-rs/image-gif/compare/v0.11.4...v0.12.0 )
---
updated-dependencies:
- dependency-name: gif
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-21 16:12:02 -07:00
dependabot[bot]
78dac5e8ea
build(deps): bump insta from 1.21.0 to 1.21.1
...
Bumps [insta](https://github.com/mitsuhiko/insta ) from 1.21.0 to 1.21.1.
- [Release notes](https://github.com/mitsuhiko/insta/releases )
- [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mitsuhiko/insta/commits/1.21.1 )
---
updated-dependencies:
- dependency-name: insta
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-21 15:21:32 -07:00
dependabot[bot]
b3debc96af
build(deps): bump clap from 4.0.22 to 4.0.24
...
Bumps [clap](https://github.com/clap-rs/clap ) from 4.0.22 to 4.0.24.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.22...v4.0.24 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-15 09:33:20 +02:00
dependabot[bot]
4c34fa361d
build(deps): bump image from 0.24.4 to 0.24.5
...
Bumps [image](https://github.com/image-rs/image ) from 0.24.4 to 0.24.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.24.4...v0.24.5 )
---
updated-dependencies:
- dependency-name: image
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-15 08:12:38 +02:00
dependabot[bot]
63a297608e
build(deps): bump lyon from 1.0.0 to 1.0.1
...
Bumps [lyon](https://github.com/nical/lyon ) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/nical/lyon/releases )
- [Commits](https://github.com/nical/lyon/commits )
---
updated-dependencies:
- dependency-name: lyon
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-08 09:00:31 +02:00