Commit Graph

8129 Commits

Author SHA1 Message Date
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 864f404f2f tests: Add blendmode visual tests 2023-01-03 03:39:13 +01:00
Nathan Adams 5a7ec70254 core: Remove blend mode unsupported message 2023-01-03 03:39:13 +01:00
Nathan Adams 45339e037e tests: Added new output of bitmapdata_draw tests for github agents. Seems visually identical. 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
EmperorBale 0e2fbe4cf7 tests: Update date tests 2023-01-02 11:43:03 -08:00
EmperorBale a51ffd0e9f avm2: Strings passed to date constructor should be parsed 2023-01-02 11:43:03 -08:00
EmperorBale ab3a1e6148 avm2: Move date parsing into a separate function 2023-01-02 11:43:03 -08:00
MrCheeze bf18334294 avm2: Fix calling setTextFormat without providing a beginIndex and EndIndex
Previous behaviour defaulted to undefined and applied the format to the
range [0,0) instead of defaulting to -1 and applying the format to the
full length of the TextField.
2023-01-01 21:03:12 -08:00
dependabot[bot] 0f5c47beb2 build(deps-dev): bump json5 from 2.2.1 to 2.2.2 in /web
Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.1...v2.2.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-01 09:36:23 +02:00
Daniel Jacobs b22d75eb32 ci: Only make nightly release on ruffle-rs/ruffle 2022-12-31 17:36:45 -05:00
Aaron Hill 9d6763510b core: Remove redundant 'clone' calls 2022-12-31 17:13:55 -05:00
David Wendt efc02bb299 docs: We also support JREs. 2022-12-30 22:14:49 -07:00
David Wendt 76d08d86e2 docs: Document Java in the web version README, too 2022-12-30 22:14:49 -07:00
nosamu 89e01b5598 avm2: Throw error in Loader.unload stub 2022-12-29 10:50:35 +01:00
EmperorBale 8b9bae8ca6 tests: Add test for LoaderContext.applicationDomain 2022-12-28 17:25:11 -05:00
EmperorBale ac4d74b9ed core: Use applicationDomain specified in context if available 2022-12-28 17:25:11 -05:00
EmperorBale 7e5018331d core: Add new `context` parameter to loader 2022-12-28 17:25:11 -05:00
dependabot[bot] 6f430bb40d build(deps): bump serde from 1.0.151 to 1.0.152
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.151 to 1.0.152.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.151...v1.0.152)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-28 10:55:35 +02:00
David Wendt 08fed6aeaa core: Don't attempt to set properties on parents after construction unless the child has an explicit name.
This already was implemented, but the prior commits broke it.
2022-12-27 20:15:49 -07:00
David Wendt 54bae0265b tests: `instantiation_on_enterframe_gotoandstop` is missing a line of output 2022-12-27 20:15:49 -07:00
David Wendt 7eb0ca8ecc core: Unconstructed display objects should be `null`, not `undefined`. 2022-12-27 20:15:49 -07:00
David Wendt cbf2e94aba core: Fix AVM2 buttons getting constructed with the wrong initial state.
This code was always wrong; and only saved from breaking by other wrong code elsewhere. Specifically:

 * `SimpleButton.construct_frame` sets the wrong initial state
 * but `MovieClip.instantiate_child` fires frame events before `post_instantiation`
  * and `SimpleButton.post_instantiation` sets the correct state
2022-12-27 20:15:49 -07:00
David Wendt eb0eede07d chore: Remove unused/superceded event issue code 2022-12-27 20:15:49 -07:00
David Wendt b6aa035663 core: Instantiating display objects on the timeline should no longer construct them.
This works now because all object placement and removal happens in `enter_frame`. Constructing those objects right away causes them to drop added events.

We cannot remove other instances of `construct_frame`, however - those are in places where we actually do expect constructors to run, not just see things get placed.
2022-12-27 20:15:49 -07:00
David Wendt 4b71fff745 core: Children added to AVM2 buttons should not emit added events 2022-12-27 20:15:49 -07:00
David Wendt 0d7e9cd30e core: All display objects that can be placed by timeline need to add themselves to their parent object.
This also centralizes all the code we added in the prior commit into `on_construction_complete`, which should be called whenever an AVM2 object finishes construction.
2022-12-27 20:15:49 -07:00
David Wendt 1c5e97ccc6 core: Move AVM2 `PlaceObject` processing to `enter_frame`.
This has a few other knock-on effects:

 * AVM2 added-to-timeline events are fired by each object after it constructs its AVM2 side. This is opposed to before when we fired them after object instantiation and placement. This also gets rid of a prior hack we had for the AVM2 root movie getting added to the stage - or, more accurately, adopts it for everything.
 * The supercall constructor for `DisplayObject` runs `construct_frame` on all children. This matches Flash Player behavior.

NOTE: This currently breaks the `placed_with_name` check, so there's going to be a lot of spurious can't set warnings
2022-12-27 20:15:49 -07:00
David Wendt 534f1cf06c tests: Adrian's tests look like they want 2 frames of execution 2022-12-27 20:15:49 -07:00
Adrian Wielgosik 825613ec8c tests: Add tests for various PlaceObject situations we didn't catch before.
There is no source as these SWFs were handmade in JPEXS.
2022-12-27 20:15:49 -07: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
Aaron Hill 6dc628e49f core: Remove some manual `Collect` impls
Some were completely unused, while others could be replaced
with a `#[derive(Collect)]`
2022-12-24 00:33:25 -06:00
Adrian Wielgosik 7a09dd5639 avm2: Convert FrameLabel to AS3, remove define_indirect_properties 2022-12-22 00:45:02 +01:00
Adrian Wielgosik e6e9c9edc2 avm2: Convert Dictionary to AS3 2022-12-21 23:56:48 +01:00
Adrian Wielgosik e90d595cb3 avm2: Convert SharedObject to AS3 2022-12-21 22:21:23 +01:00
Adrian Wielgosik f3ebb0c297 avm2: Convert JSON class to AS3 2022-12-21 22:21:23 +01:00
Lord-McSweeney 5cf5c8d5e5 Update Loader.as
Stub `flash.display.Loader.unload`
2022-12-20 16:58:55 -06:00