Commit Graph

9604 Commits

Author SHA1 Message Date
Nathan Adams c8a41e327a core: Add character info to DO debug window 2023-06-21 18:27:12 +02:00
Nathan Adams b24cc60a5d core: Add swf info to debug menu 2023-06-21 18:27:12 +02:00
Nathan Adams cb2349e33a core: Store character name<->id map, not name<->character, so we can query id for name 2023-06-21 18:27:12 +02:00
Adrian Wielgosik b3c40ecda1 avm2: Optimize coerce_to_primitive for boxed primitives 2023-06-21 00:20:03 +02:00
Crowdin Bot 67a5a2923f chore: Update translations from Crowdin 2023-06-20 23:52:03 +02:00
Nathan Adams 6b76af2d40 core: Fix avm2button bounding box 2023-06-20 23:22:53 +02:00
Toad06 18fb5064d3 avm1: Correct `matrix::object_to_matrix_or_default` 2023-06-19 21:09:06 +03:00
nosamu 700f765f91 web: Use for..of instead of for..in loops 2023-06-18 22:09:20 +02:00
TÖRÖK Attila 599488f0d6 cleanup: Rename GlutinAsyncExecutor -> WinitAsyncExecutor.
It should probably have been renamed as part of, or shortly after, f0445d94b
2023-06-18 14:54:07 +02:00
Toad06 31bb117325 web: Allow setting `allowScriptAccess` on global config 2023-06-18 08:18:52 +03:00
relrelb a8f9033091 avm1: Make `DisplayPropertyMap` immutable 2023-06-18 07:50:10 +03:00
Toad06 22ae6bfec3 avm1: Correct `WaitForFrame` and `WaitForFrame2` actions 2023-06-17 19:23:18 -05:00
TÖRÖK Attila 7bbaeb2a61 chore: Bump ouroboros to 0.17.0. 2023-06-17 18:49:05 -05:00
Crowdin Bot 73482c6e72 chore: Update translations from Crowdin 2023-06-18 01:02:34 +02:00
Nathan Adams 2427daf05c webgl: Don't hold onto an old copy of bitmap data for each image 2023-06-18 00:47:51 +02:00
Nathan Adams e9af73126f canvas: Refactor how BitmapData is made, to allow for empty bitmaps to be made later 2023-06-18 00:47:51 +02:00
Nathan Adams c374aaa19a canvas: Don't hold onto an old copy of bitmap data for each image 2023-06-18 00:47:51 +02:00
Adrian Wielgosik 19b4bfe5d3 avm2: Extend array_concat test with new cases 2023-06-17 22:40:14 +02:00
Adrian Wielgosik 42347d7234 avm2: Extend core_exception tests with new cases 2023-06-17 22:40:14 +02:00
Lord-McSweeney b02d8900c5 avm2: Remove or validate some uses of coerce_to_object 2023-06-17 22:40:14 +02:00
Adrian Wielgosik 6ccb6e7fdd Revert "avm2: Throw TypeError when 'astype' receives a null/undefined class"
This reverts commit ce0ba7795c.
2023-06-17 22:40:14 +02:00
Crowdin Bot ca549e482c chore: Update translations from Crowdin 2023-06-17 19:25:33 +02:00
renovate[bot] 7a21756ddb chore(deps): lock file maintenance rust dependencies 2023-06-17 11:00:52 -05:00
TÖRÖK Attila 12a28b0c5b chore: Bump `tracing-tracy` to version-match `profiling`
This fixes `thread 'main' panicked at 'span! without a running Client'`
when enabling the `tracy` feature.
2023-06-17 12:12:46 +02:00
Nathan Adams 6208c50273 core: Simplify TDisplayObject::swf_version(), we don't need to iterate the heirarchy 2023-06-17 10:37:13 +02:00
Toad06 5e6366d14a web: Disabling `allowScriptAccess` also prevents opening URLs in the same tab 2023-06-16 18:49:04 +03:00
Aaron Hill 69fce3f7f8
wpgu: Initial implementation of PixelBender shader execution (#11441)
* wpgu: Initial implementation of PixelBender shader execution

The implementation is split across four crates:
* `ruffle_render` now holds the main PixelBender bytecode parsing
   implementation (previously, this was in `ruffle_core`).
* `ruffle_core` holds some helper functions for converting between
   AVM2 `Value`s and the PixelBender vector types.
* `naga-pixelbender` (newly created) constructs a Naga `Module`
  from parsed PixelBender bytecode
* `ruffle_render_wgpu` sets up the render pipeline for the shader
  constructed by `naga-pixelbender`, and actually executes the shader.

The Actionscript-side shader parameters are passed in through uniforms.
This allows us to cache the compiled `naga::Module` and associated
wgpu types inside `ShaderData`, when it's first created. Each invocation
of a `ShaderJob` only needs to create a bind group and render pass.

Limitations:

* Only a few of the PixelBender opcodes are implemented - however, this is
enough to get Stemlands cannon rotation working, as well as a cool
"donut" shader that I found and included as a test.
* PixelBender matrix types are not supported.
* Only BitmapData is supported as an input/output type - Flash Player
  also supports using Vector and ByteArray
* ShaderJob execution is always synchronous.

* Adjust comments

* Address review comments
2023-06-15 22:50:24 +00:00
renovate[bot] f33b9eea3c chore(deps): lock file maintenance node.js dependencies 2023-06-16 01:03:29 +03:00
Lord-McSweeney b998fc0197 avm2: Minimal stub of ShaderFilter 2023-06-15 16:42:12 -05:00
Nathan Adams 23352db39f chore: Update wasm-bindgen from 0.2.86 -> 0.2.87 2023-06-15 20:50:04 +02:00
renovate[bot] fc933f485f fix(deps): update wasm-bindgen 2023-06-15 20:50:04 +02:00
renovate[bot] 23d7e8e5ab chore(deps): update dependency chromedriver to v114 2023-06-15 20:09:03 +02:00
Aaron Hill f257979b86 avm2: Use a separate domain for playerglobals
We create a separate child domain, which is accessible
from the Stage and the root movieclip.

This prevents ActionScript from loading classes into the
special playerglobals domain (Domain.parentDomain is modified
to return null instead of the playerglobals domain when applicable),
so the native method lookup logic will never run for user code.
2023-06-15 12:57:39 -05:00
Aaron Hill ad97322807 avm2: Implement ErrorObject.display without using Activation
This lets us print the full error message and stack stacke
in contexts where an Activation is not available, including
the `Debug` impl.

The 'name' and 'error' fields are accessed using hardcodd slot
ids. This is pretty hacky, but will work until we have better
handling of slot properties.
2023-06-15 09:31:36 -05:00
Aaron Hill 87850abd19 avm2: Improve support for deleting XML attributes and children
We now support deleting named children, as well as attributes.
Additionally, I've fixed our handling of `XML.parent()` - we now
properly set the parent when a child is created, and clear the parent
when `delete` is used.
2023-06-15 09:02:09 -05:00
Crowdin Bot 56a87dec50 chore: Update translations from Crowdin 2023-06-15 13:10:16 +02:00
Lord-McSweeney b4b726d7ab avm2: nit: Add error number in error message for BitmapData.drawWithQuality 2023-06-14 20:32:06 -05:00
Aaron Hill cd2c7f6f2f tests: Enable tracing_subscriber in tests
Previously, we weren't displaying any Ruffle logs when running tests.
2023-06-14 17:15:31 -05:00
AllinolCP e4d86ec9e7
core: implement screen resolution for capabilities (#11156) 2023-06-14 20:49:13 +00:00
Lord-McSweeney f649344f64 avm2: nit: Fix warning message in Avm2::peek 2023-06-14 19:16:08 +02:00
Lord-McSweeney 6006aa82c2 avm2+tests: Support primitives besides null in MovieClip.addFrameScript; add test 2023-06-14 18:16:39 +02:00
nosamu 202fe2f1bb core: Add options to set and force the stage alignment 2023-06-14 16:04:14 +02:00
Daniel Jacobs 0c1cd6aa4f selfhosted: Add a config option to enable Ruffle even on Flash browsers 2023-06-14 14:31:44 +02:00
Nathan Adams 0b86c02c5c desktop: Fix interaction between egui and ruffle cursors 2023-06-14 13:43:17 +02:00
Lord-McSweeney f5528aab75 avm2+tests: Implement Object.length and Object.init; add test for Object.length 2023-06-14 12:37:00 +02:00
Crowdin Bot 942842c47a chore: Update translations from Crowdin 2023-06-14 12:13:18 +02:00
Lord-McSweeney 10a8acb166 avm2: Stub NetConnection.addHeader 2023-06-13 20:51:08 -05:00
nosamu 60d3788466 avm2: Improve PerspectiveProjection stub 2023-06-13 19:31:18 -05:00
Adrian Wielgosik 128416cccd avm2: Support Array(...) without new 2023-06-14 00:34:13 +02:00
Aaron Hill 40318f905e avm2: Implement call handler for XMLList
This delegates to the XMLList constructor, just as
the XML call handler delegates to the XML constructor.
2023-06-13 17:20:11 -05:00