Mike Welsh
fa5c09b0cd
web: Add WebGL render backend
2020-05-02 10:38:18 -07:00
Mike Welsh
e9a03859ca
chore: cargo update
2020-05-02 08:48:23 -07:00
Mike Welsh
5ead49a067
wgpu: Clamp minimum framebuffer size to 1 to avoid panic
2020-05-02 08:44:15 -07:00
Mike Welsh
9c503cecc9
Merge pull request #540 from Herschel/event-loop-clean
...
core: Clean up core loop
2020-05-02 05:30:42 -07:00
Mike Welsh
f09bd8c079
core: Clean up tick/render loop
...
Don't call `render` from `Player::tick`; instead, require the
frontends to explicitly call `render` when they wish to redraw.
The frontend can query `Player::needs_render` to see if the stage
is dirty and needs a redraw. Update desktop and web to use this
new method.
This fits better with the newer winit event loop model, which
requires explicitly calling `request_redraw`, and should avoid
spurious renders.
2020-05-02 04:25:21 -07:00
Mike Welsh
6339c74d67
render: Add wgpu backend (merge #527 )
...
Adds a wgpu-rs render backend.
2020-05-02 03:42:05 -07:00
Mike Welsh
bfe57a3c66
wgpu: Toss out degenerate draws
...
wgpu would panic in this case, so filter out draws with < 3 indices.
2020-04-30 20:02:11 -07:00
Mike Welsh
beb0eba3a3
chore: WGPURenderBackend -> WgpuRenderBackend
2020-04-30 20:00:07 -07:00
Mike Welsh
552ddd531b
wgpu: Add MSAA support (default to 4x for now)
2020-04-30 19:56:07 -07:00
Nathan Adams
8384847084
avm1: Deleting on a non-object is a silent failure & warning, not a hard error
2020-04-30 14:18:54 -07:00
dependabot-preview[bot]
04660a9540
build(deps): bump quote from 1.0.3 to 1.0.4
...
Bumps [quote](https://github.com/dtolnay/quote ) from 1.0.3 to 1.0.4.
- [Release notes](https://github.com/dtolnay/quote/releases )
- [Commits](https://github.com/dtolnay/quote/compare/1.0.3...1.0.4 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-30 21:18:17 +00:00
Nathan Adams
760677a2a1
render: Add From<ColorTransform> for ColorAdjustments uniforms
2020-04-30 16:40:08 +02:00
Nathan Adams
99d15aef0d
render: Cache color transforms in wgpu backend, don't re-upload unchanged values
2020-04-30 16:33:41 +02:00
Nathan Adams
90195340c3
render: Implement letterbox on wgpu renderer
2020-04-30 16:15:35 +02:00
dependabot-preview[bot]
a4961fc72b
build(deps): bump svg from 0.7.2 to 0.8.0
...
Bumps [svg](https://github.com/bodoni/svg ) from 0.7.2 to 0.8.0.
- [Release notes](https://github.com/bodoni/svg/releases )
- [Commits](https://github.com/bodoni/svg/commits )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-30 08:46:32 +00:00
Nathan Adams
9599b2d09f
render: Move some loose utility functions to utils.rs in wgpu renderer
2020-04-30 08:48:34 +02:00
Nathan Adams
f4abf4b705
render: Split off shape/mesh code into its own file in wgpu renderer
2020-04-30 08:48:34 +02:00
Nathan Adams
1879d7f29e
render: Implement render_bitmap for wgpu renderer
2020-04-30 08:48:34 +02:00
Nathan Adams
36d9d3ce4a
render: Implement masks in wgpu renderer
2020-04-30 08:48:34 +02:00
Nathan Adams
bdaf86dc3b
render: Add Pipelines struct to group together wgpu pipelines
2020-04-30 08:48:34 +02:00
Nathan Adams
dd1fa2700f
render: Split off macros & pipeline creation from wgpu renderer
2020-04-30 08:48:34 +02:00
Nathan Adams
c42333e254
render: Added feature render_debug_labels to enable debugging and profiling of wgpu renderer in external tools
2020-04-30 08:48:34 +02:00
Nathan Adams
9278e24228
docs: Update readme for wgpu usage
2020-04-30 08:48:33 +02:00
Nathan Adams
c2290ed5ef
render: Remove dependency on winit from wgpu renderer
2020-04-30 08:48:33 +02:00
Nathan Adams
f0445d94b8
render: Add wgpu-rs based renderer, used by desktop
2020-04-30 08:48:33 +02:00
Mike Welsh
834756c167
render: Separate tesselation code into render/common_tess
2020-04-29 23:26:41 -07:00
Mike Welsh
6fb0046bd3
render: Move Glium renderer to separate subcrate
2020-04-29 23:26:41 -07:00
Mike Welsh
87bf0f44c4
render: Move canvas renderer to separate subcrate
2020-04-29 23:26:41 -07:00
Sean-Thomas
97d1eb5eb9
Web Demo Mobile Styling Changes + Bug Fix
...
- Mobile styling changes for web demo page on mobile devices. Now the sample dropdown will show up on smaller devices.
-Fixed bug with random selection of SWF files.
2020-04-29 23:26:11 -07:00
JustinCB
a3733705a8
web: Add "frames" polyfill setting
2020-04-29 23:23:25 -07:00
Justin-CB
c8989e4d28
web: Add all_frames to make extension work on pages with frames
2020-04-29 23:23:25 -07:00
Mike Welsh
37951c1d10
chore: Bump CI to Rust 1.43
2020-04-28 08:28:11 -07:00
Mike Welsh
4a53d95753
web: Add width and height to observed attributes for Ruffle elements
2020-04-28 06:10:41 -07:00
Mike Welsh
46b14e5a7f
web: Tweak shadow template CSS to ensure default width/height ( fix #529 )
2020-04-28 05:50:50 -07:00
dependabot-preview[bot]
014df249a8
build(deps): bump jpeg-decoder from 0.1.18 to 0.1.19
...
Bumps [jpeg-decoder](https://github.com/image-rs/jpeg-decoder ) from 0.1.18 to 0.1.19.
- [Release notes](https://github.com/image-rs/jpeg-decoder/releases )
- [Changelog](https://github.com/image-rs/jpeg-decoder/blob/master/CHANGELOG.md )
- [Commits](https://github.com/image-rs/jpeg-decoder/commits )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-28 04:54:23 +00:00
Mike Welsh
0921f18417
web: Avoid out-of-bounds slice from zero sample SoundStreamBlock
2020-04-27 07:49:59 -07:00
Mike Welsh
8aa12d181f
render: Remove RenderBackend::draw_pause_overlay
2020-04-27 04:45:53 -07:00
Mike Welsh
c94df5243e
web: Add nicer play button
2020-04-27 04:45:53 -07:00
Mike Welsh
03d4ed953c
core: Merge #499 , fix super
...
Allow supercalled methods to access properties of this correctly
2020-04-26 15:13:35 -07:00
dependabot-preview[bot]
56bed86a89
build(deps): bump svg from 0.7.2 to 0.8.0
...
Bumps [svg](https://github.com/bodoni/svg ) from 0.7.2 to 0.8.0.
- [Release notes](https://github.com/bodoni/svg/releases )
- [Commits](https://github.com/bodoni/svg/commits )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-26 21:18:43 +00:00
dependabot-preview[bot]
dd2f191daf
build(deps): bump lyon from 0.15.7 to 0.15.8
...
Bumps [lyon](https://github.com/nical/lyon ) from 0.15.7 to 0.15.8.
- [Release notes](https://github.com/nical/lyon/releases )
- [Changelog](https://github.com/nical/lyon/blob/master/CHANGELOG.md )
- [Commits](https://github.com/nical/lyon/commits )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-26 21:18:17 +00:00
David Wendt
ed29b1c3bb
It turns out Macromedia just used an undocumented but user-modifiable property called `__constructor__` to store the constructor.
...
A previous version of this PR (whose history has been scrubbed, but go check 918d88abe68b7467a4194738b95e5bf3e9b5bb72 if you're curious) implemented a new `TObject` property which basically every line of code that dealt with object construction had to populate. It was terrible.
2020-04-25 14:37:24 -04:00
David Wendt
bb879870ec
Add test for the constructor property on v6 and v7 SWFs
2020-04-25 13:25:21 -04:00
Nathan Adams
b3322acc8c
tests: Copy as2_super_and_this test for manual prototype setting, used by mx (currently broken)
2020-04-25 13:25:20 -04:00
David Wendt
aaa6f481ac
Add a v6 version of the super-and-this test, which is exactly the same source compiled to SWF version 6.
2020-04-25 13:25:20 -04:00
David Wendt
17d96a0fa6
Constructing a new object sets `constructor` on that object for SWFv6 and lower.
2020-04-25 13:25:20 -04:00
David Wendt
b8fd1eac9c
Invoke virtual setters defined in the prototype chain.
...
This is accomplished via two new `TObject` methods: `has_own_virtual` and `call_setter`. If an object does not contain it's own version of a property, it will first crawl the prototype chain to see if there is an overwritable virtual. If so, it will invoke that prototype's setter.
A bit of borrow finangling was required to do this; `super` now no longer caches it's proto and constr values and instead dynamically constructs them. This also means it can't be downcasted to `Executable` anymore.
With this commit, virtual setters and super-setters now work correctly.
2020-04-25 13:25:19 -04:00
David Wendt
35197f889f
`Property.set` should return a `ReturnValue` as it can potentially execute AVM code
2020-04-25 13:25:19 -04:00
David Wendt
e76ba4de87
Method calls on `super` objects should substitute the child object instead of itself as `this`.
2020-04-25 13:25:19 -04:00
David Wendt
869cbd17da
Extend `as2_super_and_this` to cover accessing object properties in super-methods, super-getters, and super-setters.
2020-04-25 13:25:18 -04:00