David Wendt
f272cba7e6
core: If we're marked as finished, set the preload position to `u64::MAX` so that the repeated call protection trips
2022-09-15 19:14:41 -06:00
David Wendt
31802ea96f
chore: Reduce the number of necessary reads of the preload progress
2022-09-15 19:14:41 -06:00
David Wendt
ea284ed6bf
core: Preload should always start from the place we left off from.
2022-09-15 19:14:41 -06:00
David Wendt
afd29d19a4
core: Don't do any work if a clip is preloaded after finishing preload.
2022-09-15 19:14:41 -06:00
David Wendt
86f9ee4821
core: Add a "preload everything we know about" method
2022-09-15 19:14:41 -06:00
David Wendt
940de4bb7e
core: Add a special loader state for "downloaded but still parsing", and a function that ticks the preload.
...
Currently we do this automatically with no execution limit.
2022-09-15 19:14:41 -06:00
David Wendt
70e638b21f
core: Actually decrease the current action limit correctly
2022-09-15 19:14:41 -06:00
David Wendt
a05827eb90
core: Add a concept of an `ExecutionLimit` that checks both actions and runtime.
...
Actions are abstract; here we're using it to count bytes loaded (as a proxy for execution time). AVM code could potentially be adapted to count operations run instead.
2022-09-15 19:14:41 -06:00
David Wendt
c80abff3a9
core: Allow chunked preloading within a `DefineSprite` tag
2022-09-15 19:14:41 -06:00
David Wendt
3a265adcc4
core: Ensure empty movie clips are born preloaded.
...
An "empty clip" is any clip created by the `new` or `new_with_avm2` function, intended for dynamically-created movie clips with no association to a movie symbol.
2022-09-15 19:14:41 -06:00
David Wendt
f96017e6f3
avm2: Preload dynamically created movie clips
...
If we don't preload every movie clip we make, then they'll indicate themselves as not having been fully loaded yet, even though they are.
2022-09-15 19:14:41 -06:00
David Wendt
0f2237e171
core: Make frame loaded count no longer be off by one
...
The preload frame counting logic starts from one and continues to the end of the file, which results in a completely preloaded movie having one more frame "loaded" than there is in the file. This fixes that.
2022-09-15 19:14:41 -06:00
David Wendt
079b20a4f2
core: On unexpected EOF, mark the clip preload as completed
2022-09-15 19:14:41 -06:00
David Wendt
85cf383c84
core: Allow callers of `decode_tags` to flag when they would like decoding to stop
2022-09-15 19:14:41 -06:00
David Wendt
f7f5316b71
core: Prohibit playing movie clip frames that haven't been preloaded yet.
2022-09-15 19:14:41 -06:00
David Wendt
0ab10d9ab0
core: Make the preload chunk size configurable per caller.
...
Right now, we do not actually set a chunk limit, as we still need infrastructure for backgrounding the preload calls.
2022-09-15 19:14:41 -06:00
David Wendt
b5cbfaf093
core: When preloading other movie clips, forcibly preload them synchronously.
2022-09-15 19:14:41 -06:00
David Wendt
4e9bb3a173
core: Implement chunked decoding infrastructure.
...
We currently do not actually enforce a decoding limit; just add the functionality necessary to do so.
2022-09-15 19:14:41 -06:00
golfinq
c63f915ae2
avm2: Implement missing enums
2022-09-15 15:42:29 -07:00
Daniel Jacobs
cf721d45f9
Revert "web: Bump `wasm-bindgen` to 0.2.83"
...
This reverts commit 084b252030
.
2022-09-15 22:33:07 +02:00
relrelb
084b252030
web: Bump `wasm-bindgen` to 0.2.83
...
As usual, also bump its helper crates (`js-sys`, `web-sys` and
`wasm-bindgen-futures`) to the latest versions.
Due to https://github.com/rustwasm/wasm-bindgen/pull/3031 , use the
`serde-wasm-bindgen` crate as a replacement to the deprecated
`JsValue::from_serde` function.
2022-09-14 09:03:31 +03:00
Aaron Hill
e08f8d47ab
Allow clippy::needless_lifetimes to keep explicit 'gc parameter
...
This makes it clear what the lifetime is used for.
2022-09-13 18:55:08 -05:00
Aaron Hill
c4ce06a500
avm2: Use Box<dyn std::error::Error> for FromWStr impl
...
We don't currently have an `Activation` available in this
method, and we can't specify a 'gc lifetime without modifying
the trait itself.
2022-09-13 18:55:08 -05:00
Aaron Hill
3e65a554fa
avm2: Add 'gc lifetime parameter to avm2::Error
2022-09-13 18:55:08 -05:00
relrelb
b1760063ec
avm2: Implement `flash.filters.DisplacementMapFilterMode`
2022-09-13 21:20:55 +03:00
relrelb
5d5093f0fd
avm2: Implement `flash.filters.BitmapFilterType`
2022-09-13 21:20:55 +03:00
dependabot[bot]
cf26158030
build(deps): bump url from 2.2.2 to 2.3.1
...
Bumps [url](https://github.com/servo/rust-url ) from 2.2.2 to 2.3.1.
- [Release notes](https://github.com/servo/rust-url/releases )
- [Commits](https://github.com/servo/rust-url/compare/v2.2.2...v2.3.1 )
---
updated-dependencies:
- dependency-name: url
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-09-13 09:42:27 +03:00
dependabot[bot]
69a43297df
build(deps): bump convert_case from 0.5.0 to 0.6.0
...
Bumps [convert_case](https://github.com/rutrum/convert-case ) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/rutrum/convert-case/releases )
- [Commits](https://github.com/rutrum/convert-case/commits )
---
updated-dependencies:
- dependency-name: convert_case
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-09-13 09:20:12 +03:00
dependabot[bot]
e86b3f0efb
build(deps): bump percent-encoding from 2.1.0 to 2.2.0
...
Bumps [percent-encoding](https://github.com/servo/rust-url ) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/servo/rust-url/releases )
- [Commits](https://github.com/servo/rust-url/compare/percent-encoding-v2.1.0...v2.2.0 )
---
updated-dependencies:
- dependency-name: percent-encoding
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-09-13 08:45:46 +03:00
dependabot[bot]
bff0855435
build(deps): bump webbrowser from 0.7.1 to 0.8.0
...
Bumps [webbrowser](https://github.com/amodm/webbrowser-rs ) from 0.7.1 to 0.8.0.
- [Release notes](https://github.com/amodm/webbrowser-rs/releases )
- [Changelog](https://github.com/amodm/webbrowser-rs/blob/main/CHANGELOG.md )
- [Commits](https://github.com/amodm/webbrowser-rs/compare/v0.7.1...v0.8.0 )
---
updated-dependencies:
- dependency-name: webbrowser
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-09-13 00:10:04 +03:00
dependabot[bot]
dae2dc2490
build(deps): bump gc-arena from `4743f2d` to `081b688`
...
Bumps [gc-arena](https://github.com/ruffle-rs/gc-arena ) from `4743f2d` to `081b688`.
- [Release notes](https://github.com/ruffle-rs/gc-arena/releases )
- [Commits](4743f2d029...081b6883a5
)
---
updated-dependencies:
- dependency-name: gc-arena
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-09-12 23:31:32 +03:00
Adrian Wielgosik
1c940009a1
avm2: Convert Capabilities, System to AS
2022-09-12 02:03:34 +02:00
Aaron Hill
474fd7fa8f
desktop: Always mark task as ready on wake
...
We were incorrectly skipping the call to `task.set_ready`
if `self.waiting_for_poll` was set. The `waiting_for_poll` flag
should only be used to avoid redundant messages being sent into
the event loop.
This was causing us to ignore wakeups if more than one wakup
arrived in between calls to `poll_all`.
2022-09-11 15:48:17 -05:00
TÖRÖK Attila
866f5c83c5
avm2: Add `flash.filters.BitmapFilterQuality`
2022-09-11 22:05:15 +02:00
Aaron Hill
fbcefc49dc
avm2: Fix "Property does not exist" error message
...
The `multiname` is now a `Gc`, so we need to dereference it
to get a useful Debug impl.
2022-09-11 11:34:52 -05:00
Aaron Hill
81a5f3f10a
core: Always check mergeAlpha in BitmapData.copyPixels
...
Previously, we would only use mergeAlpha if alphaBitmapData
and alphaPoint. However, mergeAlpha can be used even when
those parameters are null.
Some of the AVM1 argument handling was also incorrect - I've fixed
it, and extended the existing test with the output-based test
added for AVM2.
2022-09-11 11:12:09 -05:00
Aaron Hill
1d6b3b6f57
chore: Fix Clippy lints and allow `clippy::bool_to_int_with_if`
...
In several cases, the current code seems preferable to the
code required by `clippy::bool_to_int_with_if`. Let's suppress
this for now to get the build passing, and decide later if this
is something that we want to enable.
2022-09-11 13:31:46 +02:00
Nathan Adams
92044c9c02
wgpu: Merge bitmap bind groups 2 and 3
2022-09-11 09:07:53 +02:00
Nathan Adams
d867a370fc
wgpu: Cache direct bitmap draw bind groups (smoothing vs not)
2022-09-11 09:07:53 +02:00
Nathan Adams
57ddb6bdcb
wgpu: Refactor out bitmap bind group from drawtype
2022-09-11 09:07:53 +02:00
Nathan Adams
dd7f23f319
wgpu: Add documentation for pipeline binding groups
2022-09-11 09:07:53 +02:00
Nathan Adams
2d48d78990
wgpu: Removed redundant _pipeline suffix in Pipelines
2022-09-11 09:07:53 +02:00
Nathan Adams
a38cadfd39
wgpu: Cache shape pipelines per texture format & msaa
2022-09-11 09:07:53 +02:00
Nathan Adams
a8ff81ee38
wgpu: Make vertex buffer descriptions const
2022-09-11 09:07:53 +02:00
Aaron Hill
b62c17577b
wgpu: Switch to arena
2022-09-11 09:07:53 +02:00
Nathan Adams
c63aa2cfc8
wgpu: Moved Draw creation outside of backend
2022-09-11 09:07:53 +02:00
Nathan Adams
b2e02db72f
wgpu: Extracted a create_texture_transforms method
2022-09-11 09:07:53 +02:00
Nathan Adams
e7e0905647
wgpu: Moved Mesh, Draw and DrawType to their own file, and code that constructs a DrawType there too
2022-09-11 09:07:53 +02:00
Nathan Adams
f36bcac742
wgpu: Move actual frame rendering to Surface, deduplicates some code
2022-09-11 09:07:53 +02:00
Nathan Adams
b2ecd39648
wgpu: Enable MSAA for offscreen textures
2022-09-11 09:07:53 +02:00