Commit Graph

8521 Commits

Author SHA1 Message Date
AsukaMinato b40adc7568 remove the no-used import 2023-01-23 10:22:12 +01:00
AsukaMinato 7e89e7b411 reduce some indents. 2023-01-23 10:22:12 +01:00
MartySVK ad688b45da
avm2: added Stage.fullScreenSourceRect stub (#9265)
* avm2: added Stage.fullScreenSourceRect

* fixing checks I hope
2023-01-22 16:29:12 -05:00
Aaron Hill 8717aff938 web: Split out npm build of 'ruffle-core' from other npm modules
Running 'npm run build --workspaces' will run the 'build' script for all
workspaces, even if one fails. Since all of the other workspaces depend
on 'ruffle-core', running them after a ruffle-core build failure just
produces useless errors in the CI logs.
2023-01-21 16:15:19 -05:00
Aaron Hill e2954821ea
core: Take two - delay reading image back from render backend using `SyncHandle` (#9184)
* Take two: Delay reading image back from render backend using `SyncHandle`

This allows us to avoid blocking immediately after a `BitmapData.draw` call.
Instead, we only attempt to use the `SyncHandle` when performing an operation
that requires the CPU-side pixels (e.g. BitmapData.getPixel or BitmapData.setPixel).

In the best case, the SWF will never explicitly access the pixels of
the target BitmapData, removing the need to ever copy back the render backend
image to our BitmapData. If the SWF doesn't require access to the pixels immediately,
we can delay copying the pixels until they're actually needed, hopefully allowing
the render backend to finish processing the BitmapData.draw operation in
the backenground before we need the result.

Now that the CPU and GPU pixels can be intentionally out of sync with
each other, we need to ensure that we don't accidentally expose 'stale'
CPU-side pixels to ActionScript (which needs to remain unaware of
our internal laziness). We now use a wrapper type `BitmapDataWrapper`
to enforce that the `SyncHandle` is consumed before accessing the
underlying `BitmapData.

* core: Skip GPU->CPU sync for source and target BitmapData during draw

* Introduce DirtyState enum
2023-01-21 21:08:04 +00:00
MartySVK 6d5f6385a5
avm2: added TextField.restrict stub (#9218)
* added TextField.restrict stub

Co-authored-by: Martin Mravec <marty.devil@gmail.com>
2023-01-19 22:23:33 -05:00
Bale f19e31d005 ci: Ensure `GHA_REPO_ALIVE` starts off as true 2023-01-18 22:13:14 -08:00
Bale 6cb80662b7
ci: Revert nightly fix (#9216)
* Revert "ci: Pass a single argument to `test` command"

This reverts commit 34dbeb7702.

* Revert "ci: Fix is_active variable"

This reverts commit 5b55b6e4b5.

* ci: Apply new fix

* ci: Fix typo

Should be setting the env variable to false, not true

* ci: Fix syntax error
2023-01-19 05:53:37 +00:00
nosamu 34dbeb7702 ci: Pass a single argument to `test` command 2023-01-18 19:39:13 -08:00
nosamu 5b55b6e4b5 ci: Fix is_active variable 2023-01-18 19:39:13 -08:00
Adrian Wielgosik fb4d2d3f04 avm2: Implement TextField.maxChars 2023-01-19 01:24:47 +01:00
Nathan Adams f83c573734 desktop: Make crash headings ### instead of # 2023-01-19 00:50:56 +01:00
Nathan Adams e02b19ba86 desktop: Reorder extra info in crash report 2023-01-19 00:50:56 +01:00
Nathan Adams 5f72ebaef9 core: Don't call avm2 callstack method if there's no callstack 2023-01-19 00:50:56 +01:00
Nathan Adams a986cc05fe desktop: Clippy lint 2023-01-19 00:50:56 +01:00
Nathan Adams e27fdda3dc desktop: Add version info to crash report 2023-01-19 00:50:56 +01:00
Nathan Adams 2189d19324 desktop: Also include avm2 stacktrace in panic report 2023-01-19 00:50:56 +01:00
Nathan Adams 3c8f5b41cc chore: Added platform dropdown to crash report template 2023-01-19 00:50:56 +01:00
Nathan Adams ea37d0a3ad desktop: Implement crash report dialog when a panic happens 2023-01-19 00:50:56 +01:00
Nathan Adams 0fd618e80a ci: Change activity check to something less error prone possibly 2023-01-18 00:47:27 -05:00
Nathan Adams b5c6d5debe wgpu: Don't panic if rendering a None bitmap - fixes #9188 2023-01-17 19:34:51 +01:00
Nathan Adams 580cce29db wgpu: Update to wgpu fork with buffer bug fix 2023-01-17 05:59:55 +01:00
Nathan Adams 5878bb0c5d web: Enable wgpu-webgl by default 2023-01-16 23:33:49 +01:00
Nathan Adams 4117eece3b web: Indicate when we used cached debug info 2023-01-16 23:18:42 +01:00
Nathan Adams 3c4710cfb5 wgpu: Only show current limits in debug info 2023-01-16 23:18:42 +01:00
Nathan Adams 6f967d4b3c web: Cache the output of render debug info in case of panics 2023-01-16 23:18:42 +01:00
Nathan Adams f5d69f5ad8 avm2: Corrected panic messages in date code 2023-01-16 21:48:00 +01:00
EmperorBale 954a7513f8 tests: Update date tests 2023-01-16 21:48:00 +01:00
EmperorBale 3287173da3 avm2: Fix edge case when setting fullYear of date 2023-01-16 21:48:00 +01:00
EmperorBale 6bb079cc60 avm2: Remove some useless else statements in date 2023-01-16 21:48:00 +01:00
MrCheeze ebe5eed143 avm2: Fix corner case when goto same frame multiple times (close #9018)
This change makes it so that if there is a goto to a specific frame,
then a frame script is registered for that frame, and then a goto to the
same frame again, the frame script will not be skipped. At least one movie
appears to depend on this behaviour.
2023-01-16 18:37:19 +01:00
nosamu 0e4db6a2c9 swf: Accept Scaleform GFx header signatures 2023-01-16 18:25:34 +01:00
nosamu c16705ceee desktop: Add `.spl` to file dialog filter 2023-01-16 18:05:36 +01:00
Lord-McSweeney d849e98902 Fix web/src/lib.rs typo (plaver_version) 2023-01-16 17:49:24 +01:00
Lord-McSweeney 8cef9b65a1 Fix playerVerion misspelling
...and also add punctuation to docs.
2023-01-16 17:49:24 +01:00
Lord-McSweeney 4049acee66 Update config.ts 2023-01-16 17:49:24 +01:00
TÖRÖK Attila ec462115ef core: nit: Use `strip_prefix` instead of `starts_with` and subslicing.
As suggested by relrelb in a review note for #8820.
2023-01-16 17:33:41 +01:00
Nathan Adams 6138714fa7 wgpu: Fix buffer bug detection 2023-01-16 17:22:04 +01:00
Nathan Adams e6a44e2584 ci: Cancel existing actions for PRs when new commits come in 2023-01-16 00:03:31 -05:00
Mike Welsh 9cd6849772 core: Append EOI marker to JPEG data when missing
Fixes #4209.
2023-01-16 03:03:28 +01:00
Mike Welsh cceb18910b core: Fix handling of invalid EOI+SOI marker in JPEG data (fix #8775)
Previously we were removing the first occurrence of the invalid
0xFFD9FFD8 byte sequence in JPEG data, but this would break the
JPEG if it happened to contain this byte sequence elsewhere (for
example, EXIF data). Instead, properly parse the JPEG markers
searching for the invalid marker sequence.

Fixes #8775.
2023-01-16 03:03:28 +01:00
David Wendt 8592b6f3b5 chore: Remove dependabot config since we use renovate now 2023-01-16 02:39:51 +01:00
Nathan Adams 3279a920b4 wgpu: Use a temporary wgpu fork that increases push constants limit on webgl & speeds up start time 2023-01-15 18:19:11 +01:00
Aaron Hill 31fc94f0ee video: Remove unnecessary clone of `frame.rgba` 2023-01-14 15:24:04 -05:00
nosamu 952aa2d5f9 avm2: Correct name of rollover event 2023-01-14 20:04:33 +01:00
Nathan Adams 1b42ad0ab4 wgpu: Keep globals cache across the buffer pool 2023-01-14 19:35:16 +01:00
Aaron Hill 3a6c8d9796 core: Use BitmapData instead of separate `initial_data` field
Now that a `Bitmap` always stores a `BitmapData`, we can read the pixels
directly from the `BitmapData`, instead of duplicating them in an
`initial_data` field
2023-01-14 01:28:22 -05:00
Aaron Hill b5796f9016 core: Derive Default for FramePhase 2023-01-13 20:37:52 +01:00
Nathan Adams 2e7201334d wgpu: Detect if buffers are unusable on web and fail to create wgpu renderer if so 2023-01-12 18:37:28 +01:00
Nathan Adams 8db8e4669a wgpu: Implement Multiply blend mode as a trivial blend 2023-01-12 10:54:03 -05:00