Nathan Adams
50238f2600
core: Made BitmapData::get_pixel take u32 and use raw access
2023-03-20 05:52:27 +01:00
Nathan Adams
4bd1a5b9f8
core: Remove BitmapData::set_transparency, it can only be set at creation
2023-03-20 05:52:27 +01:00
Nathan Adams
483afc4f9a
core: Made BitmapData::set_pixel32 use set_pixel32_raw
2023-03-20 05:52:27 +01:00
Nathan Adams
2e487b0661
core: Made BitmapData::set_pixel use set_pixel32_raw
2023-03-20 05:52:27 +01:00
Nathan Adams
ec0434a2bb
core: Optimized BitmapData::copy_channel
2023-03-20 05:52:27 +01:00
Nathan Adams
48cebdbbc0
core: Make BitmapData::fill_rect use set_pixel32_raw
2023-03-20 05:52:27 +01:00
Nathan Adams
69721c06a8
core: Make BitmapData::set_pixel32_raw inline
2023-03-20 05:52:27 +01:00
Nathan Adams
aa17ef695c
core: Remove set_cpu_dirty from BitmapData::set_pixel32_raw
2023-03-20 05:52:27 +01:00
David Wendt
479411b05f
chore: For some reason, the reproducible source archive upload is failing, so switch to an actually maintained workflow for now
2023-03-19 21:07:20 -07:00
renovate[bot]
f6f646a756
chore(deps): lock file maintenance rust dependencies
2023-03-19 19:45:30 -07:00
Toad06
911982eb7d
tests: Test MovieClip methods for loaded images
2023-03-20 01:36:04 +01:00
Toad06
e2415be734
core: Store correct data for loaded images
2023-03-20 01:36:04 +01:00
Huw Pritchard
645ff76bcd
avm2: Add 11 AS3 classes ( #10003 )
2023-03-20 00:19:31 +00:00
AllinolCP
b69af5d70a
tests: add tests for XML.parent()
2023-03-19 16:06:01 -07:00
AllinolCP
19b38da394
avm2: implement XML.parent()
2023-03-19 16:06:01 -07:00
Nathan Adams
078672782c
wgpu: Skip Alpha/Erase blends with no parent Layer
2023-03-19 14:59:48 -07:00
Mike Welsh
3f7ea0b07f
avm2: Implement `updateAfterEvent`
...
Implement `updateAfterEvent` for `MouseEvent`, `TimerEvent` and
`TouchEvent`.
2023-03-19 14:39:17 -07:00
David Wendt
1a266bafeb
web: Fix extension source code upload (again)
2023-03-19 14:08:28 -07:00
Dejan Varmedja
fca4bfde25
avm2: Add AVM2 keyboard constants ( close #10248 )
2023-03-19 12:16:31 +01:00
Mike Welsh
e76154009c
tests: Add image tests for BitmapData.colorTransform
2023-03-19 09:59:13 +01:00
Mike Welsh
2d6d8ea0f4
core: Fix BitmapData.colorTransform
...
* Pixels with 0 alpha are not affected by color transforms.
* Color channels should be clamped to the 0-255 range.
* A color transform with only an alpha multiplier of >1 has no
effect.
2023-03-19 09:59:13 +01:00
Lord-McSweeney
c48dfb4a72
Fix ordering of flash.xml classes.
2023-03-19 09:44:17 +01:00
Lord-McSweeney
acc05f377f
avm2: Add XMLDocument to globals
2023-03-19 09:44:17 +01:00
Lord-McSweeney
8ce16901ee
avm2: Stub flash.xml.XMLDocument
2023-03-19 09:44:17 +01:00
Lord-McSweeney
6b2dcad7f3
avm2: Implement flash.xml.XMLNode
2023-03-19 09:44:17 +01:00
Lord-McSweeney
16c2317455
avm2: Implement flash.xml.XMLNodeType
2023-03-19 09:44:17 +01:00
Nathan Adams
b5cf5bc707
avm2: Fix comment for dispatch_event
2023-03-19 09:15:42 +01:00
Nathan Adams
e94861a8ad
avm2: Convert errors to error messages at root level
2023-03-19 09:15:42 +01:00
Nathan Adams
8b5f6c3691
core: Log when an error is encountered perfoming avm2 callbacks
2023-03-19 09:15:42 +01:00
Nathan Adams
b7c061a7a2
avm2: Implement LocalConnection.domain getter
2023-03-19 09:05:00 +01:00
Aaron Hill
8425eab1f0
render: Compile a different version of 'bitmap.wgsl' for Stage3D
...
When using the bitmap.wgsl shader for normal rendering, we need
to saturate immediately after applying the color transformation
to reproduce Flash Player's behavior. This makes the (possibly
transformed) alpha value get multiplied by a in-range color,
instead of a potentially out-of-range color.
However, Stage3D just applies a no-op color transformation,
and should only saturate at the very end
(not after the intermediate division by the original alpha value).
To support both of these requirements, I've added in a new
`early_saturate` ifdef that controls when we apply 'saturate'.
We then compile the shader twice (once with early_saturate=true
and once with early_saturate=false), and use the two versions
in the right pipelines.
We could use a simpler shader for Stage3D - however, it can't just
be a plain copy, as we need to apply the viewport transformation.
For now, I'm re-using the shader code to keep things simple. If
this becomes a performance issue in stage3d, we could revisit this.
2023-03-19 02:15:26 -05:00
Nathan Adams
ea424f3d1e
avm2: Fix panic when constructing custom BitmapData from timeline
2023-03-19 07:47:40 +01:00
MrCheeze
9e71ea9124
web: Allow ExternalInterface.call to call methods of primitive types ( close #9105 )
2023-03-19 07:18:01 +01:00
Nathan Adams
ae25ace3f6
tests: Recreated edittext tests
2023-03-19 06:55:07 +01:00
Nathan Adams
909a399911
tests: Add visual test for font selection
2023-03-19 06:55:07 +01:00
Nathan Adams
9cfd37cab2
core: Respect use_device_font for bullets
2023-03-19 06:55:07 +01:00
Nathan Adams
0f66f7bcb2
core: Fallback font lookup by any font with the same name
2023-03-19 06:55:07 +01:00
Nathan Adams
27f28fb547
avm2: Don't create new texts/sprites/buttons with an empty movie
2023-03-19 06:55:07 +01:00
Lord-McSweeney
e5f75ff126
avm2: Fix TextField.getTextFormat arguments
...
These are used in the Rust handler, but were not correctly set in the AS bindings, leading to errors such as "Attempted to call flash::text::TextField::getTextFormat with 2 arguments (more than 0 is prohibited)"
2023-03-18 21:59:41 -07:00
Mike Welsh
dfeba5330e
tests: Add AVM1 BitmapData.hitTest test
2023-03-18 19:47:39 -07:00
Mike Welsh
ea75dd3739
avm1: Implement BitmapData.hitTest
2023-03-18 19:47:39 -07:00
Mike Welsh
b173176fee
tests: Add test for #9885
...
A simpliied test case to test the #9885 , where a hang occurred when
a button is removed while executing code in a v5 SWF.
2023-03-18 19:25:16 -07:00
Nicholas Cioli
9876e03ece
core: Fix endless loop in `process_swf5_references`
...
This commit fixes an issue where ruffle locks up while trying to
resolve an item with non-MovieClip parents.
2023-03-18 19:25:16 -07:00
Nathan Adams
60a3765be2
core: Store winding rule in Drawing
2023-03-18 19:14:08 -07:00
Nathan Adams
bc9e1d7c14
swf: Rename HAS_FILL_WINDING_RULE to NON_ZERO_WINDING_RULE
2023-03-18 19:14:08 -07:00
Nathan Adams
1004f3fee9
tests: Add a test for a shape with HAS_FILL_WINDING_RULE
2023-03-18 19:14:08 -07:00
Nathan Adams
dc17f7dc30
tests: Add a test for rendering a self-intersecting glyph
2023-03-18 19:14:08 -07:00
Nathan Adams
6987c81623
render: Respect HAS_FILL_WINDING_RULE
2023-03-18 19:14:08 -07:00
Nathan Adams
e7b812c2cd
render: Glyphs are assumed to have HAS_FILL_WINDING_RULE
2023-03-18 19:14:08 -07:00
Tom Schuster
e9e342fe23
avm2: Implement String call handler
2023-03-18 17:51:22 -07:00