Commit Graph

5759 Commits

Author SHA1 Message Date
Mike Welsh 2e3154baa0 avm1: tellTarget should fail if base clip is removed
`tellTarget` to other clips should fail if the current base clip
has been removed. All properties of the clip return `undefined`
at this point, so traversing the target path should fail.

Fixes soft-lock in Steppenwolf 2-1 as mentioned in #4452.
2021-10-28 10:18:18 -07:00
Toad06 a24d469f27 web: Unmute audio on iOS when silent mode is enabled
Co-Authored-By: Christoph Guttandin <158417+chrisguttandin@users.noreply.github.com>
2021-10-28 08:48:22 -07:00
Chris Midgley 755e5456da chore: use node 16 in nightly release as well 2021-10-26 13:21:55 -07:00
Chris Midgley 781edd0feb web: preferentially use node 16 to compile 2021-10-26 13:21:55 -07:00
Mike Welsh 26e0432ccc wgpu: Fix some invalid WGSL
naga is currently lenient about some things which are invalid by
the WGSL spec. The Tint WGSL compiler disagreed, so these shaders
failed to compile in Chrome.
2021-10-25 21:59:09 -07:00
EmperorBale 5ac8e75239 avm2: Make ObjectEncoding C-like 2021-10-25 16:32:55 -07:00
EmperorBale bab74f83fc avm2: Remove all unsafe from bytearray 2021-10-25 16:32:55 -07:00
EmperorBale 9126c9297c avm2: Derive PartialEq and Eq for enums 2021-10-25 16:32:55 -07:00
EmperorBale 69f2002d2a avm2: Add todo comment 2021-10-25 16:32:55 -07:00
EmperorBale 1e9189dffc tests: Improve AMF3 test 2021-10-25 16:32:55 -07:00
EmperorBale 84a7b3d148 tests: Add test for reading AMF0 objects 2021-10-25 16:32:55 -07:00
EmperorBale e7a723f250 tests: Add test for reading AMF3 objects 2021-10-25 16:32:55 -07:00
EmperorBale da601a4984 chore: Improve safety comments 2021-10-25 16:32:55 -07:00
EmperorBale 3b2a84ef9b chore: Small cleanups 2021-10-25 16:32:55 -07:00
EmperorBale b257e5537c chore: Appease clippy 2021-10-25 16:32:55 -07:00
EmperorBale 42fe351c0d avm2: Optimize readBytes & writeBytes by implementing write_at_within 2021-10-25 16:32:55 -07:00
EmperorBale e86bdfdc3e avm2: Remove unneeded condition 2021-10-25 16:32:55 -07:00
EmperorBale 3f3e600820 chore: Appease clippy 2021-10-25 16:32:55 -07:00
EmperorBale 83005a7ce5 avm2: Update flash-lso version 2021-10-25 16:32:55 -07:00
EmperorBale efb3062d98 avm2: Add flash.net.ObjectEncoding 2021-10-25 16:32:55 -07:00
EmperorBale e5fc2c8e66 avm1: Update SharedObject 2021-10-25 16:32:55 -07:00
EmperorBale e2c2ac8961 avm2: Implement ByteArray.readObject + flash.net.ObjectEncoding 2021-10-25 16:32:55 -07:00
EmperorBale c191340972 avm2: Refactor readBytes & writeBytes 2021-10-25 16:32:55 -07:00
Mike Welsh d58ecf0bcf ci: Enable WebGPU support in demo
ruffle.rs should be part of the Chrome WebGPU origin trial, so we
can enable wgpu feature to try it out.

It should gracefully fall back to WebGL when WebGPU is not
available.
2021-10-25 14:00:37 -07:00
EmperorBale f6c5e2e0dc avm2: Add test for array enumeration on elements 2021-10-25 13:45:29 -07:00
EmperorBale 67ffc7bcc8 avm2: Forward get_enumerant_name and property_is_enumerable to base when not found 2021-10-25 13:45:29 -07:00
dependabot[bot] 9349f87bf7 build(deps): bump embed-resource from 1.6.4 to 1.6.5
Bumps [embed-resource](https://github.com/nabijaczleweli/rust-embed-resource) from 1.6.4 to 1.6.5.
- [Release notes](https://github.com/nabijaczleweli/rust-embed-resource/releases)
- [Commits](https://github.com/nabijaczleweli/rust-embed-resource/compare/v1.6.4...v1.6.5)

---
updated-dependencies:
- dependency-name: embed-resource
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-25 13:40:48 -07:00
Mike Welsh 16c443165f web: Add error-report label to bug report link 2021-10-24 17:21:03 -07:00
Mike Welsh bbb788ced3 desktop: Improve error message for GL
wgpu only supports OpenGL on Linux, so provide a better message if
a user tries to use the GL backend on Windows/macOS.
2021-10-24 17:20:19 -07:00
Mike Welsh 2b57c0947a wgpu: Disallow DX11 backend
This backend has not yet been reimplemented in wgpu 0.10+, so
disallow it for now.
2021-10-24 17:20:19 -07:00
Mike Welsh e10d0fcbe7 wgpu: Switch shaders to WGSL 2021-10-24 17:20:19 -07:00
Mike Welsh 4141909bcb web: Support wgpu on web
Add wgpu feature to web build (disabled by default currently).
2021-10-24 17:20:19 -07:00
Mike Welsh df11cd6a04 web: Enable web_sys_unstable_apis
Enable web_sys_unstable_apis RUSTFLAGS in .cargo/config.toml.
These are necessary to use WebGPU in the browser, as well as other
features such as clipboard.
2021-10-24 17:20:19 -07:00
Mike Welsh 4c44e27a00 wgpu: Remove unnecessary dependencies 2021-10-24 17:20:19 -07:00
Mike Welsh df270c55af wgpu: Make WgpuRenderBackend::build_descriptors async
This will be necessary for using wgpu on web, where the whole
renderer creation will need to be async.
2021-10-24 17:20:19 -07:00
Mike Welsh 9067dd3668 wgpu: Allow GL as a graphics backend option 2021-10-24 17:20:19 -07:00
Mike Welsh decc38a45c wgpu: Use uniforms instead of push constants 2021-10-24 17:20:19 -07:00
Mike Welsh 0cbdad1ff2 wgpu: Bump to wgpu 0.11 2021-10-24 17:20:19 -07:00
Mike Welsh 25c56b7000 chore: Appease clippy 2021-10-24 15:59:59 -07:00
Mike Welsh 8ae8de4d51 chore: Appease clippy
Squelch some false positives from `question_mark` and
`match_str_case_mismatch` lints.
2021-10-24 15:33:09 -07:00
Mike Welsh f18c47ebf2 desktop: Fix app not running on Windows (fix #5534)
Rust 1.56 introduced a bad interaction between env_logger and
`#[windows_subsytem]` that caused Ruffle to panic immediately on run.

See:
https://github.com/rust-lang/rust/issues/88576

Disabling the atty and termcolor features of env_logger avoids
the problem. Can re-enable when the above issue is fixed on Rust
stable.

Fixes #5534.
2021-10-24 12:03:21 -07:00
relrelb 1fec012053 avm1: Inline `Value::call`
It was used only in `CallableValue`, and is not very useful by itself,
as it's a tiny wrapper around `TObject::call`.
2021-10-23 10:51:21 -07:00
relrelb e6181dfcce Revert "avm1: Don't warn in case a method doesn't exist"
This reverts commit 54d417c539,
because it no longer necessary as the warning was removed in the
previous commit.
2021-10-23 10:51:21 -07:00
relrelb 982a83ce24 avm1: Remove `base_proto` parameter of `TObject::call`
Use prototype depths instead. Most calls passed `base_proto = None`,
which is equivalent to `depth = 0`, and is now the default.
The few other cases were adapted to use `Executable::exec` directly,
where `depth` can be specified manually.
2021-10-23 10:51:21 -07:00
relrelb 09f72b880d avm1: Avoid unnecessary calls to `search_prototype`
The signature of `search_prototype` is going to change in a following
commit.
Use `TObject::call_method` instead.
2021-10-23 10:51:21 -07:00
relrelb d0763607e2 avm1: Remove `base_proto` parameter of `TObject::set_local`
The only usage of it was `ScriptObject::set_local`, where it can
be computed locally.
2021-10-23 10:51:21 -07:00
relrelb 0a66dac280 avm1: Remove `set` specialization from `impl_custom_object!`
`base_proto` is going to be eliminated in a following commit, so
there will no longer be a difference between the two `set_local`
variants.
2021-10-23 10:51:21 -07:00
Mike Welsh 3fc0209e03 chore: Appease clippy 2021-10-22 22:48:26 -07:00
David Wendt 5abb11482e avm2: Make builtin class prototypes also instances of `Object`, with the sole exception of `Function`, whose prototype is an instance of it's class. 2021-10-22 20:12:48 -07:00
David Wendt 469f8cb9db avm2: All prototypes are instances of `Object`, not their own class. 2021-10-22 20:12:48 -07:00