Mike Welsh
4a38d36cd7
wgpu: Output premultiplied alpha
2022-04-17 08:33:51 -07:00
Mike Welsh
70b7222d20
webgl: Output premultiplied alpha
2022-04-17 08:33:51 -07:00
relrelb
87e85e16da
render: Make `rgb5_component` a lambda
...
This way the `compressed` parameter becomes implicit.
2022-04-16 13:52:59 -07:00
relrelb
8feeadf578
render: Use `std::borrow::Cow`
...
Also apply some nearby refactors.
2022-04-16 13:52:59 -07:00
relrelb
eeaec947b3
render: Remove unneeded `pub`s
...
And remove the dead `glue_swf_jpeg_to_tables` function.
2022-04-16 13:52:59 -07:00
relrelb
9b4108444f
render: Strip 16-bit PNG samples to 8-bit
...
PNGs with 16-bit samples were not being normalized to 8-bit, screwing up their
appearance.
Add the `STRIP_16` transformation using `Transformations::normalize_to_color8()`,
which is equivalent to `Transformations::EXPAND | Transformations::STRIP_16`.
Also warn in case `png` outputs a color type other than `Rgb` and `Rgba`.
Due to the `EXPAND` transformation, this may be only `Grayscale` or
`GrayscaleAlpha`. `Indexed` is converted to either `Rgb` or `Rgba`.
Fixes #6662 .
2022-04-16 12:45:55 -07:00
Mike Welsh
bce9398c0d
avm1: Add Accessibility stub
2022-04-16 09:05:16 -07:00
Mike Welsh
b83879c392
tests: Update reference images
2022-04-15 14:52:33 -07:00
Mike Welsh
2d43ace225
wgpu: Don't create intermediate render targets when unnecessary
2022-04-15 14:52:33 -07:00
Mike Welsh
f4d72dcc2d
wgpu: Disable depth writes
2022-04-15 14:52:33 -07:00
Mike Welsh
9c11870a08
wgpu: Use linear color render target
...
Always use a non-sRGB texture as the render target so that color
and alpha blending are in sRGB space, matching Flash behavior.
If the surface format requires sRGB, render to an intermediate
linear buffer and copy to the surface as a final render step.
2022-04-15 14:52:33 -07:00
Mike Welsh
00419c6959
wgpu: Use BlendState::ALPHA_BLENDING const
2022-04-15 14:52:33 -07:00
Toad06
65d58f4733
tests: Add tests for `Add`, `Equals`, `Less` and `GetProperty` actions
2022-04-13 22:00:25 -07:00
Toad06
b2b1b5fa25
avm1: Correct `Add`, `Equals`, `Less` and `GetProperty` actions
2022-04-13 22:00:25 -07:00
David Wendt
036aa2b369
chore: Prevent language servers from scanning the Safari stub binary on Windows
2022-04-12 22:14:22 -07:00
David Wendt
7418c4e788
chore: Prevent any compiler access to the Safari stub binary outside of macOS
2022-04-12 22:14:22 -07:00
David Wendt
b825bf6e34
chore: cargo fmt on the stub binary
2022-04-12 22:14:22 -07:00
David Wendt
399614f598
build: Build and package the Safari stub binary for macOS.
2022-04-12 22:14:22 -07:00
David Wendt
79ebcc6dd3
web: Add a crate for a stub binary that builds a Safari Web Extension
2022-04-12 22:14:22 -07:00
David Wendt
9b083d8be4
build: Subpackages need `--deep` codesigning
2022-04-12 22:14:22 -07:00
David Wendt
58ce66e1a3
web: Package the extension as a Safari Web Extension in the desktop build.
2022-04-12 22:14:22 -07:00
Mike Welsh
e1fbcc70f8
canvas: Handle gradient/bitmap strokes
2022-04-11 22:50:40 -07:00
Mike Welsh
e5a7dc94ba
wgpu/webgl: Handle gradient/bitmap strokes
2022-04-11 22:50:40 -07:00
Mike Welsh
146b8adc68
swf: Clean up LineStyle
...
* Remove LineStyle::color, instead using fill_style with
FillStyle::Color to indicate solid color.
* Store `flags` in the struct instead of separate bools/values.
* Add getters/setters for ease of use.
* Add builder-style methods for setting LineStyle properties.
* Fix misnamed ALLOW_CLOSE flag to NO_CLOSE.
2022-04-11 22:50:40 -07:00
Mike Welsh
99d8a5bff3
ci: Run clippy with all features
2022-04-11 20:15:13 -07:00
Mike Welsh
78e8578414
chore: Avoid error when using wgpu feature on web
...
Avoid compilation error when running clippy on the web package
without a `wasm32` arch.
2022-04-11 20:15:13 -07:00
Mike Welsh
c0dff98d84
chore: Fix len_zero warning in symphonia Mp3Decoder
2022-04-11 20:15:13 -07:00
Mike Welsh
24f00238a7
audio: Fix symphonia feature
...
This feature stopped building with the bump to symphonia 0.5, which
added a `Sync` bound to its traits.
* Add `Sync` bounds to our own internal audio traits to match.
* nellymoser::Decoder was also tweaked to add a Sync bound.
* Lock the nellymoser dependency to a specific git commit.
2022-04-11 15:25:15 -07:00
dependabot[bot]
a5f7fccca2
build(deps): bump quote from 1.0.17 to 1.0.18
...
Bumps [quote](https://github.com/dtolnay/quote ) from 1.0.17 to 1.0.18.
- [Release notes](https://github.com/dtolnay/quote/releases )
- [Commits](https://github.com/dtolnay/quote/compare/1.0.17...1.0.18 )
---
updated-dependencies:
- dependency-name: quote
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-11 13:51:20 -07:00
dependabot[bot]
5973ecc7d9
build(deps): bump flate2 from 1.0.22 to 1.0.23
...
Bumps [flate2](https://github.com/rust-lang/flate2-rs ) from 1.0.22 to 1.0.23.
- [Release notes](https://github.com/rust-lang/flate2-rs/releases )
- [Commits](https://github.com/rust-lang/flate2-rs/compare/1.0.22...1.0.23 )
---
updated-dependencies:
- dependency-name: flate2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-11 13:51:09 -07:00
Toad06
c6c1f553d5
avm1: Correct `Action::RandomNumber`
2022-04-11 11:02:08 -07:00
Mike Welsh
bd144194c3
tests: Add test for bool values in SWFv4
2022-04-10 20:03:39 -07:00
Toad06
e2528b04a7
avm1: Coerce booleans to `"1"` or `"0"` in SWFv4
2022-04-10 20:03:39 -07:00
Daniel Jacobs
d3118b5e23
web: Youtube objects on Firefox without data attribute don't work with the rewrite by default
2022-04-10 19:25:26 -07:00
Daniel Jacobs
1d4a2fd5c6
web: Make notreallyyoutube.com use Ruffle
2022-04-10 19:25:26 -07:00
Daniel Jacobs
7cae84b354
tests: Add YouTube Flash embed/object tests
2022-04-10 19:25:26 -07:00
Daniel Jacobs
958b4e7291
web: Workaround mixed-content issues for YouTube Flash embeds
2022-04-10 19:25:26 -07:00
Daniel Jacobs
907b59222a
web: Don't polyfill YouTube Flash embeds
2022-04-10 19:25:26 -07:00
Mike Welsh
3d4d7a0ab5
tests: Add test for division in SWFv4
2022-04-09 23:17:39 -07:00
Toad06
b221485288
avm1: Fix `Action::Divide` in SWFv4
2022-04-09 23:17:39 -07:00
Mike Welsh
91346f5fad
avm1: Format floating-point numbers
...
Co-authored-by: Toad06 <gd.productions@laposte.net>
2022-04-09 22:40:59 -07:00
Mike Welsh
478f970fc8
chore: Appease clippy
2022-04-09 18:23:51 -07:00
Aaron Hill
d7532ae654
avm2: Add stubs for `BitmapFilter`, `GlowFilter`, and `DisplayObject.filters`
...
This gets 'Rolling Hero' further in the startup process,
since it just tries to set a filter on an object.
2022-04-08 16:53:16 -07:00
relrelb
66492441f1
desktop: De-duplicate file reading code
...
Unify the sandboxed and non-sandboxed cases.
2022-04-08 16:51:59 -07:00
relrelb
ad42b9908f
xml: Refactor `XmlNode` creation methods
...
Unify the previous 3 creation methods to a single `XmlNode::new`.
This allows supporting arbitrary `nodeType` values passed to the
`XMLNode` constructor.
2022-04-08 16:34:57 -07:00
relrelb
7497fb7008
core: Change `Player::set_root_movie` to accept a `SwfMovie`
...
Move the `Arc::new` to within the function.
2022-04-08 15:16:25 -07:00
relrelb
6d7edd1854
web: Use `Uint8Array::to_vec()` over `Uint8Array::copy_to()`
...
It's shorter and should be more efficient (allocates an uninitialized
buffer instead of a zeroed one).
2022-04-09 00:27:16 +03:00
Toad06
12737b8431
avm1: Fix `Number(String | Object)` in SWFv4
2022-04-08 10:41:21 -07:00
dependabot[bot]
1339d8b93a
build(deps): bump syn from 1.0.90 to 1.0.91
...
Bumps [syn](https://github.com/dtolnay/syn ) from 1.0.90 to 1.0.91.
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/1.0.90...1.0.91 )
---
updated-dependencies:
- dependency-name: syn
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-08 10:40:43 -07:00
dependabot[bot]
860c2e313f
build(deps): bump encoding_rs from 0.8.30 to 0.8.31
...
Bumps [encoding_rs](https://github.com/hsivonen/encoding_rs ) from 0.8.30 to 0.8.31.
- [Release notes](https://github.com/hsivonen/encoding_rs/releases )
- [Commits](https://github.com/hsivonen/encoding_rs/compare/v0.8.30...v0.8.31 )
---
updated-dependencies:
- dependency-name: encoding_rs
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-08 10:40:26 -07:00