Commit Graph

11455 Commits

Author SHA1 Message Date
Daniel Jacobs bac2256c32 ci: Update Rust workflow to use paths-filter v4 2024-01-29 23:13:25 -05:00
Aaron Hill 1cf669c75e avm2: Convert invalid rectangle to zero rectangle in getBounds 2024-01-29 13:25:16 -05:00
Aaron Hill f31d9bc491 avm2: Make Math.random() more closely match Flash Player
See the comments for details. Our previous implementation
was 'too good', and broke Bloons Tower Defense 5 by
generating `Number`s that Flash Player would never generate.
2024-01-28 22:46:19 -05:00
Fancy2209 f2880975ba
avm2: Report OS as Windows instead of Linux for now (#14985) 2024-01-28 22:10:54 +00:00
Aaron Hill 5b685d411f chore: Fix nightly Clippy lints 2024-01-28 16:03:29 -05:00
Tom Schuster 40c0f90105 tests: Test all remaining FileReference properties 2024-01-28 17:14:10 +01:00
Tom Schuster b8d8aafe89 avm2: Implement the remaining flash.net.FileReference properties 2024-01-28 17:14:10 +01:00
Nathan Adams fcb74d8fbc wgpu: Deduplicate common gradients from a single Mesh 2024-01-27 21:37:22 +01:00
Nathan Adams e479d12af0 render: Make Mesh a struct, not just an alias for Vec<Draw> 2024-01-27 21:37:22 +01:00
Nathan Adams 6dac4958fb swf: Derive Hash for Gradient and associated types 2024-01-27 21:37:22 +01:00
Nathan Adams 2d42abcb70 wgpu: Don't use max_uniform_buffer_binding_size as a limit for BufferBuilder when making meshes 2024-01-27 21:37:22 +01:00
Nathan Adams ab404bae2a wgpu: Remove ouroboros and typed-arena, no longer needed 2024-01-27 21:37:22 +01:00
Nathan Adams 3be2efe7cf wgpu: Clean up DynamicTransforms, after the merge 2024-01-27 21:37:22 +01:00
Nathan Adams c3423b86f8 wgpu: Use vertex buffer and staging belt for bevel filter 2024-01-27 21:37:22 +01:00
Nathan Adams 7e0bd48061 wgpu: Use vertex buffer and staging belt for glow filter 2024-01-27 21:37:22 +01:00
Nathan Adams 2722a6588e wgpu: Use vertex buffer and staging belt for simple filters 2024-01-27 21:37:22 +01:00
Nathan Adams 9320de354c wgpu: Use staging belt and single buffer for filter arguments 2024-01-27 21:37:22 +01:00
Nathan Adams 76d07faacf wgpu: Make sync index Option<> in make_queue_sync_handle 2024-01-27 21:37:22 +01:00
Nathan Adams f99f89122a wgpu: Remove uniform encoder 2024-01-27 21:37:22 +01:00
Nathan Adams de975a9727 wgpu: Merge Transforms and ColorAdjustments 2024-01-27 21:37:22 +01:00
Nathan Adams 1231d2fead wgpu: Extract out ESTIMATED_OBJECTS_PER_CHUNK, set it to 200 2024-01-27 21:37:22 +01:00
Nathan Adams 574e83f3a3 wgpu: Use max_uniform_buffer_binding_size from adapter 2024-01-27 21:37:22 +01:00
Nathan Adams befce41e11 wgpu: Remove push constant support - simplifies code significantly, and it should be same perf now 2024-01-27 21:37:22 +01:00
Nathan Adams fd604b3a18 wgpu: Try using a single buffer/bindgroup for transform/colortransforms, no longer dynamically allocated 2024-01-27 21:37:22 +01:00
Nathan Adams 6824f33cc6 wgpu: Add limits to BufferBuilder (but currently not respected for Meshes) 2024-01-27 21:37:22 +01:00
Adrian Wielgosik 4981cbd89b avm2: Avoid double lookup in setPropertyIsEnumerable 2024-01-27 16:51:17 +01:00
Nathan Adams e778e5ed58 desktop: Fix context menu, use new approach rather than trying to hack activate egui's menu 2024-01-27 09:44:31 +01:00
Tom Schuster 941e60aef5 web: Temporary disable display_file_save_dialog to prevent panics 2024-01-27 00:41:14 +01:00
Crowdin Bot 4769a45999 chore: Update translations from Crowdin 2024-01-26 22:54:04 +01:00
arthomnix 3e82ba9a63 desktop: Allow specifying WGPU instance flags from environment 2024-01-26 22:33:18 +01:00
Tom Schuster 7a73dd0661 avm2: Only use embedded CFF fonts for TLF 2024-01-26 21:57:48 +01:00
sleepycatcoding 36fc30e283 debug_ui: Do not render container as collapsible if it has no children 2024-01-26 20:34:49 +01:00
Nathan Adams f678d13ca8 tests: Throw an Err, not panic, in Approximations::compare 2024-01-26 18:59:06 +01:00
Nathan Adams aee051fa45 tests: Split test running into tick/test phases. This is enough to make it work on web. 2024-01-26 18:59:06 +01:00
Nathan Adams b6614d9705 tests: Turn Test::run() into Test::create_test_runner() - handle running externally 2024-01-26 18:59:06 +01:00
Nathan Adams 1b8d3f7392 tests: Output comparison is part of the TestRunner 2024-01-26 18:59:06 +01:00
Nathan Adams 7c4e345905 tests: Make Environment::create_renderer only make one renderer, not N amount 2024-01-26 18:59:06 +01:00
Nathan Adams bd64ee2942 tests: Extract out Test::movie() 2024-01-26 18:59:06 +01:00
Nathan Adams 5040bf3aff tests: Extract out a TestRunner struct 2024-01-26 18:59:06 +01:00
Moulins ac7086528f avm1: Implement proper behavior for Gradient***Filter array setters
Among other things:
- resizing `colors` should also resize `alphas` and `ratios`
- shrinking `ratios` should also shrink `colors` and `alphas`, but
  growing it doesn't change the size
2024-01-26 18:40:06 +01:00
Moulins 19ff294e60 avm1: Follow FP 32 (not FP 11) behavior for ColorMatrix/ConvolutionFilter 2024-01-26 18:40:06 +01:00
Moulins bd2165bd0f swf: Properly read/write ConvolutionFilters; these contain f32s, not Fixed16s 2024-01-26 18:40:06 +01:00
Moulins 659917bff2 avm1: Fix inaccuracies in DisplacementMapFilter
- `mode` should reject non-lowercased values
- `mapPoint` should reset to `(0, 0)` when set to an invalid value
2024-01-26 18:40:06 +01:00
Moulins 5ef911abc9 avm1: Don't overwrite alpha when setting the color field on BitmapFilters 2024-01-26 18:40:06 +01:00
Moulins 31e69c51b5 test: Rewrite AVM filter tests and regroup them in a single file
This uncovers some bugs in our implementation, so mark the test as a
known failure for now.
2024-01-26 18:40:06 +01:00
Kamil Jarosz 225f42db2a tests: Test EditText's HTML behavior for SWF version 6 2024-01-26 18:20:06 +01:00
Kamil Jarosz ed59195ad1 tests: Test EditText's HTML behavior for SWF version 7 2024-01-26 18:20:06 +01:00
Kamil Jarosz 03b88259ca tests: Test EditText's HTML behavior for SWF version 8 2024-01-26 18:20:06 +01:00
Kamil Jarosz ec345d20a5 core: Improve HTML handling for EditText and add support for SWF 6,7
This patch improves the logic of parsing and formatting HTML
for EditText, and adds support for SWF versions 6 and 7.

Examples of bugs fixed:
* invalid HTML: When generating HTML, Ruffle sometimes generated
  mismatched tags, e.g. tried to close a tag which was never opened.
* text outside of tags: sometimes, especially in case of multiline
  fields with multiple paragraphs, Ruffle generated proper tags,
  but the text was placed outside of them.
* BR/SBR closing issues: When opened, Ruffle waited for a close tag
  and ignored every other closing tag. BR/SBR do not need to be closed,
  so Ruffle often waited indefinitely.
* P/LI behavior: P and LI have a very peculiar behavior, but a very
  important one, because it influences the number of paragraphs/bullets
  and thus newlines for multiline fields.

Support for SWF 6,7:
* whitespace in SWF 6,7: SWF versions 6,7 ignore witespace-only text.
  This significantly influences the behavior of newlines and paragraphs.
* kerning in SWF 6,7: Enabling kerning in `<font>` works only for SWF 8+.
* multiline in SWF 6: FP 6 defines the `multiline` property, but it
  completely ignores it, and the field behaves as if it's always multiline.
2024-01-26 18:20:06 +01:00
Kamil Jarosz 5422792eb7 core: Add font and style structures for TextSpan
They make operating on text spans more natural, e.g. easy comparison.
2024-01-26 18:20:06 +01:00