Nathan Adams
ded46e20e7
render: Replace PushBlendMode/PopBlendMode with Blend
2023-01-03 03:39:13 +01:00
dependabot[bot]
664c67ea27
build(deps): bump clap from 4.0.29 to 4.0.32
...
Bumps [clap](https://github.com/clap-rs/clap ) from 4.0.29 to 4.0.32.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.29...v4.0.32 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-12-26 22:04:33 +01:00
dependabot[bot]
5ea1076e35
build(deps): bump enum-map from 2.4.1 to 2.4.2
...
Bumps [enum-map](https://github.com/xfix/enum-map ) from 2.4.1 to 2.4.2.
- [Release notes](https://github.com/xfix/enum-map/releases )
- [Changelog](https://github.com/xfix/enum-map/blob/master/CHANGELOG.md )
- [Commits](https://github.com/xfix/enum-map/compare/v2.4.1...v2.4.2 )
---
updated-dependencies:
- dependency-name: enum-map
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-12-19 16:30:46 -08:00
CUB3D
1013a6a162
avm2: Button bounds_with_transform should include bounds of current state child
2022-12-18 13:32:24 -07:00
CUB3D
690191dbdf
avm2: Fix SimpleButton bounds
2022-12-18 13:32:24 -07:00
Mike Welsh
696c9062d3
chore: Inherit cargo metadata from workspace
...
Use workspace inheritance added in Rust 1.64 to de-duplicate
various settings across all packages.
2022-12-16 15:53:59 -08:00
relrelb
bd9078addf
chore: Fix `clippy::uninlined_format_args` lints
2022-12-15 08:59:38 +02:00
relrelb
cf03ee7430
wgpu: Bump to 0.14.2
2022-12-14 23:59:53 +02:00
dependabot[bot]
d6c8d5d3fd
build(deps): bump insta from 1.22.0 to 1.23.0
...
Bumps [insta](https://github.com/mitsuhiko/insta ) from 1.22.0 to 1.23.0.
- [Release notes](https://github.com/mitsuhiko/insta/releases )
- [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mitsuhiko/insta/compare/1.22.0...1.23.0 )
---
updated-dependencies:
- dependency-name: insta
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-12-12 23:47:32 +01:00
dependabot[bot]
6136c2fa74
build(deps): bump insta from 1.21.2 to 1.22.0
...
Bumps [insta](https://github.com/mitsuhiko/insta ) from 1.21.2 to 1.22.0.
- [Release notes](https://github.com/mitsuhiko/insta/releases )
- [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mitsuhiko/insta/compare/1.21.2...1.22.0 )
---
updated-dependencies:
- dependency-name: insta
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-12-05 23:49:58 +01:00
Aaron Hill
173a1a80cb
Fix BitmapHandle downcasting in webgl and canvas backends
...
There were two issues:
1. We were accidentally calling `as_any` on `handle,` rather than
`handle.0`
2. Calling `as_any` can invoke the wrong implementation, depending on
what traits are in scope. We want the method implemented on the
underlying type (`RegistryData`) to be used, but if `Downcast` is
explicitly imported, then we appear to invoke it on the trait object
`dyn BitmapHandleImpl` itself (using the fact that trait objects
themselves implement `Any`). We now explicitly call the generated
method on the trait object, which avoids this issue.
2022-12-04 14:53:00 -06:00
Aaron Hill
1b3070ab85
core: Make `BitmapHandle` hold a trait object instead of an id
...
`BitmapHandle` now holds `Arc<dyn BitmapHandleImpl>`.
This allows us to move all of the per-bitmap backend data into
`BitmapHandle`, instead of holding an id to a backend-specific
hashmap.
This fixes the memory leak issue with bitmaps. Once the AVM side of a
bitmap (`Bitmap`/`BitmapData`) gets garbage-collected, the
`BitmapHandle` will get dropped, freeing all of the GPU resources
assoicated with the bitmap.
2022-12-03 19:44:44 -06:00
Adrian Wielgosik
0861153626
swf: make Clippy happy
2022-12-03 22:18:22 +01:00
dependabot[bot]
281ca6a1b8
build(deps): bump insta from 1.21.1 to 1.21.2
...
Bumps [insta](https://github.com/mitsuhiko/insta ) from 1.21.1 to 1.21.2.
- [Release notes](https://github.com/mitsuhiko/insta/releases )
- [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mitsuhiko/insta/compare/1.21.1...1.21.2 )
---
updated-dependencies:
- dependency-name: insta
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-30 12:36:14 +01:00
Marco Grassi
ad81b3bf14
upgrade lock and toml dependencies
2022-11-26 14:04:59 -05:00
Aaron Hill
b8745f0ff1
avm2: Partially implement Stage3D for wgpu backend
...
This PR implements core 'stage3D' APIs. We are now able
to render at least two demos from the Context3D docs - a simple
triangle render, and a rotating cube.
Implemented in this PR:
* Stage3D access and Context3D creation
* IndexBuffer3D and VertexBuffer3D creation, uploading, and usage
* Program3D uploading and usage (via `naga-agal`)
* Context3D: configureBackBuffer, clear, drawTriangles, and present
Not yet implemented:
* Any 'dispose()' methods
* Depth and stencil buffers
* Context3D texture apis
* Scissor rectangle
General implementation strategy:
A new `Object` variant is added for each of the Stage3D objects
(VertexBuffer3D, Program3D, etc). This stores a handle to the
parent `Context3D`, and (depending on the object) a handle
to the underlying native resource, via `Rc<dyn
SomeRenderBackendTrait>`).
Calling methods on Context3D does not usually result in an immediate
call to a `wgpu` method. Instead, we queue up commands in our
`Context3D` instance, and execute them all on a call to `present`.
This avoids some nasty wgpu lifetime issues, and is very similar
to the approah we use for normal rendering.
The actual rendering happens on a `Texture`, with dimensions
determined by `createBackBuffer`. During 'Stage' rendering,
we render all of these Stage3D textures *behind* the normal
stage (but in front of the overall stage background color).
2022-11-25 21:43:00 -07:00
Aaron Hill
104b2265f2
Fix rebase fallout
2022-11-25 16:08:42 -07:00
Aaron Hill
3bef8c4fd6
render: Remove `get_bitmap_pixels` and store data in `Character::Bitmap`
...
We only called `get_bitmap_pixels` when creating a `BitmapData`
for an SWF-provided `Bitmap`. We now store the initial pixels
in `Character::Bitmap`, and use them to initialize a `BitmapData`
when needed.
This lets us simplify the wgpu backend, which no longer needs
to store a `Bitmap` object. In addition to saving space for
`BitmapData` objects that lack an SWF `Bitmap`, this will make
it easier to move data from `bitmap_registry` into `BitmapHandle`
itself.
2022-11-25 16:08:42 -07:00
Mark Richins
d345523d02
Fix conflicts
2022-11-23 20:45:37 -07:00
Mark Richins
63a291ac4b
Fix promblems caused by moving Twips
2022-11-23 20:45:37 -07:00
Aaron Hill
bdadb17a95
render: Don't use BitmapHandle in tessellator
...
Currently, we rely on ShapeTessellator being able to get a BitmapHandle
without a RenderBackend. With the upcoming BitmapData refactor,
we will always need a RenderBackend to get a BitmapHandle, which creates
borrow-checker issues in ShapeTessellator (which is stored in a
RenderBackend).
To solve this, we split BitmapSource.bitmap into two methods -
BitmapSource.bitmap and BitmapSource.bitmap_handle. ShapeTessellator
continues to use BitmapSource.bitmap, and uses the u16 bitmap id
instead of a BitmapHandle. The BitmapSource.bitmap_handle method
is used inside each render backend to convert the id to a BitmapHandle,
avoiding borrow-checker issues.
2022-11-21 21:04:40 -07:00
dependabot[bot]
ccb1fa1b1b
build(deps): bump clap from 4.0.24 to 4.0.26
...
Bumps [clap](https://github.com/clap-rs/clap ) from 4.0.24 to 4.0.26.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.24...v4.0.26 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-21 18:07:28 -07:00
dependabot[bot]
c2319da673
build(deps): bump gif from 0.11.4 to 0.12.0
...
Bumps [gif](https://github.com/image-rs/image-gif ) from 0.11.4 to 0.12.0.
- [Release notes](https://github.com/image-rs/image-gif/releases )
- [Changelog](https://github.com/image-rs/image-gif/blob/master/Changes.md )
- [Commits](https://github.com/image-rs/image-gif/compare/v0.11.4...v0.12.0 )
---
updated-dependencies:
- dependency-name: gif
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-21 16:12:02 -07:00
dependabot[bot]
78dac5e8ea
build(deps): bump insta from 1.21.0 to 1.21.1
...
Bumps [insta](https://github.com/mitsuhiko/insta ) from 1.21.0 to 1.21.1.
- [Release notes](https://github.com/mitsuhiko/insta/releases )
- [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mitsuhiko/insta/commits/1.21.1 )
---
updated-dependencies:
- dependency-name: insta
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-21 15:21:32 -07:00
dependabot[bot]
b3debc96af
build(deps): bump clap from 4.0.22 to 4.0.24
...
Bumps [clap](https://github.com/clap-rs/clap ) from 4.0.22 to 4.0.24.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.22...v4.0.24 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-15 09:33:20 +02:00
dependabot[bot]
4c34fa361d
build(deps): bump image from 0.24.4 to 0.24.5
...
Bumps [image](https://github.com/image-rs/image ) from 0.24.4 to 0.24.5.
- [Release notes](https://github.com/image-rs/image/releases )
- [Changelog](https://github.com/image-rs/image/blob/master/CHANGES.md )
- [Commits](https://github.com/image-rs/image/compare/v0.24.4...v0.24.5 )
---
updated-dependencies:
- dependency-name: image
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-15 08:12:38 +02:00
dependabot[bot]
63a297608e
build(deps): bump lyon from 1.0.0 to 1.0.1
...
Bumps [lyon](https://github.com/nical/lyon ) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/nical/lyon/releases )
- [Commits](https://github.com/nical/lyon/commits )
---
updated-dependencies:
- dependency-name: lyon
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-08 09:00:31 +02:00
dependabot[bot]
9303304e3b
build(deps): bump clap from 4.0.18 to 4.0.22
...
Bumps [clap](https://github.com/clap-rs/clap ) from 4.0.18 to 4.0.22.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.18...v4.0.22 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-08 00:25:12 +02:00
dependabot[bot]
7ea0dd1221
build(deps): bump bytemuck from 1.12.2 to 1.12.3
...
Bumps [bytemuck](https://github.com/Lokathor/bytemuck ) from 1.12.2 to 1.12.3.
- [Release notes](https://github.com/Lokathor/bytemuck/releases )
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md )
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.12.2...v1.12.3 )
---
updated-dependencies:
- dependency-name: bytemuck
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-07 22:32:10 +02:00
relrelb
d16e9e1511
wgpu: Use `Depth24PlusStencil8` again
...
This reverts #8297 . Instead, pin `wgpu-hal` and `wgpu-types` to
include https://github.com/gfx-rs/wgpu/pull/3165 , which fixes
https://github.com/gfx-rs/wgpu/issues/3112 .
2022-11-03 20:42:39 +02:00
relrelb
b3cdd6dda1
Revert "wgpu: Use `Depth32FloatStencil8` over `Depth24PlusStencil8`"
...
This reverts commit 37f171de06
.
2022-11-03 20:42:39 +02:00
relrelb
89f3445d62
swf: Introduce and use `Rectangle::width()` and `Rectangle::height()`
2022-11-01 09:49:04 +02:00
dependabot[bot]
f4e7f43d1a
build(deps): bump bytemuck from 1.12.1 to 1.12.2
...
Bumps [bytemuck](https://github.com/Lokathor/bytemuck ) from 1.12.1 to 1.12.2.
- [Release notes](https://github.com/Lokathor/bytemuck/releases )
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md )
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.12.1...v1.12.2 )
---
updated-dependencies:
- dependency-name: bytemuck
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-01 00:17:08 +02:00
dependabot[bot]
e5313c81f8
build(deps): bump once_cell from 1.15.0 to 1.16.0
...
Bumps [once_cell](https://github.com/matklad/once_cell ) from 1.15.0 to 1.16.0.
- [Release notes](https://github.com/matklad/once_cell/releases )
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md )
- [Commits](https://github.com/matklad/once_cell/compare/v1.15.0...v1.16.0 )
---
updated-dependencies:
- dependency-name: once_cell
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-10-31 23:48:15 +02:00
dependabot[bot]
9e3d849db5
build(deps): bump png from 0.17.6 to 0.17.7
...
Bumps [png](https://github.com/image-rs/image-png ) from 0.17.6 to 0.17.7.
- [Release notes](https://github.com/image-rs/image-png/releases )
- [Changelog](https://github.com/image-rs/image-png/blob/master/CHANGES.md )
- [Commits](https://github.com/image-rs/image-png/commits )
---
updated-dependencies:
- dependency-name: png
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-10-31 23:14:44 +02:00
Aaron Hill
68471723b3
core: Fix clippy format string lint
2022-10-27 08:49:39 +03:00
dependabot[bot]
3c7e9235f6
build(deps): bump futures from 0.3.24 to 0.3.25
...
Bumps [futures](https://github.com/rust-lang/futures-rs ) from 0.3.24 to 0.3.25.
- [Release notes](https://github.com/rust-lang/futures-rs/releases )
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.24...0.3.25 )
---
updated-dependencies:
- dependency-name: futures
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-10-25 09:19:27 +03:00
dependabot[bot]
c9f5524748
build(deps): bump clap from 4.0.15 to 4.0.18
...
Bumps [clap](https://github.com/clap-rs/clap ) from 4.0.15 to 4.0.18.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.15...v4.0.18 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-10-25 09:00:26 +03:00
dependabot[bot]
973b95396a
build(deps): bump jpeg-decoder from 0.2.6 to 0.3.0
...
Bumps [jpeg-decoder](https://github.com/image-rs/jpeg-decoder ) from 0.2.6 to 0.3.0.
- [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/compare/v0.2.6...v0.3.0 )
---
updated-dependencies:
- dependency-name: jpeg-decoder
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-10-24 23:35:49 +03:00
Aaron Hill
8ae6454337
webgl: Update 'viewport_scale_factor' field
...
Previously, we were ignoring changes to the scale factor.
2022-10-18 14:00:54 -05:00
Aaron Hill
d0230a2bea
render: Add 'naga-agal' crate to compile AGAL shaders to Naga
...
This is the first part of the Stage3D implementation, and can
be reviewed independently.
Stage3D shaders use the Adobe Graphics Assembly Language (AGAL),
which is a binary shader format. It supports vertex attributes,
varying registers, program constants (uniforms), and texture sampling.
This PR only implements a few parts of AGAL:
* The 'mov' and 'm44' opcodes
* Vertex attributes, varying registers, program constants, and 'output'
registers (position or color, depending on shader type)
This is sufficient to get a non-trivial Stage3D program
running (the rotating cube demo from the Adobe docs).
The output of `naga-agal` is a `naga::Module`. This can be passed
directly to wgpu, or compiled into a shader language using
a Naga backend (glsl, wgsl, SPIR-V, etc). The test suite
output WGSL files, and uses the 'insta' crate to compare against
saved files on disk.
Currently, the only real way to write AGAL bytecode is using
the Adobe-provided 'AGALMiniAssembler' flash class.
This class assembles the textual reprentation of AGAL into
the binary format.
To make writing tests easier, I've added a 'agal_compiler' test, which
can easily be modified to add more Agal textual assembly.
2022-10-17 13:22:02 -05:00
Aaron Hill
45515be0a3
render: Improve support for BitmapData.draw
...
This PR fixes a numbe of interconnected bugs:
* We weren't consistently uploading a dirty BitmapData to the render
backend before drawing to/from it.
* BitmapData.draw should *not* add a fill color - it should draw over
the current contents of the BitmapData
* After drawing to a non-transparent BitmapData, we need to manually
set the opacity back to 255 for each pixel (the drawing process
takes transparency into account, but the opacity information is
thrown away at the end).
2022-10-17 12:53:38 -05:00
relrelb
86ef4bd7fe
core: Simplify `Bitmap` creation
...
Change `Bitmap::new()` to accept a `ruffle_render::bitmap::Bitmap`
directly, instead of `width`, `height` and `bitmap_handle`. As a
consequence, all `RenderBackend::register_bitmap_*` methods are no
longer necessary - we can use `ruffle_redner::utils::*` to obtain
a `ruffle_render::bitmap::Bitmap` right before calling `Bitmap::new()`.
2022-10-17 20:05:30 +03:00
relrelb
37f171de06
wgpu: Use `Depth32FloatStencil8` over `Depth24PlusStencil8`
...
Credit to @crumblingstatue.
Per `wgpu` documentation, the latter has wider support than the former.
Fixes #8295 , #8296 .
2022-10-15 23:35:44 +03:00
relrelb
178bf4fe24
chore: Extract Cargo `edition` to `[workspace.package]`
...
This is possible since Rust 1.64.0: https://blog.rust-lang.org/2022/09/22/Rust-1.64.0.html#cargo-improvements-workspace-inheritance-and-multi-target-builds
2022-10-14 22:13:29 +03:00
relrelb
183b8adbf0
wgpu: Bump to `0.14.0`
...
Also bump `raw-window-handle` to `0.5`, as now required.
2022-10-14 21:49:40 +03:00
relrelb
dbfd28e708
web: Bump `wasm-bindgen` to 0.2.83
...
This restores commit 084b252030
.
As usual, also bump its helper crates (`js-sys`, `web-sys` and
`wasm-bindgen-futures`) to the latest versions.
2022-10-14 21:49:40 +03:00
Aaron Hill
491ffbbf09
wgpu: Fix argument order when calling `BitmapSamplers.get_sampler`
2022-10-13 15:07:53 -05:00
dependabot[bot]
76f18cbc37
build(deps): bump clap from 4.0.9 to 4.0.12
...
Bumps [clap](https://github.com/clap-rs/clap ) from 4.0.9 to 4.0.12.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.9...v4.0.12 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-10-11 00:32:53 +03:00
relrelb
bf0ace0b88
chore: Appease clippy
2022-10-09 13:46:28 +05:45
Tal Hayon
7d27a5acb5
webgl: vertex array, buffer and texture cleanup
2022-10-06 22:19:45 +03:00
relrelb
a9dedf759a
chore: Fix `clap` update
...
As described in https://github.com/clap-rs/clap/blob/master/CHANGELOG.md#400---2022-09-28 .
2022-10-05 21:33:34 +03:00
dependabot[bot]
32a370f803
build(deps): bump clap from 3.2.20 to 4.0.9
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.2.20 to 4.0.9.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v3.2.20...v4.0.9 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-10-05 21:33:34 +03:00
dependabot[bot]
8bb03e3dec
build(deps): bump ouroboros from 0.15.4 to 0.15.5
...
Bumps [ouroboros](https://github.com/joshua-maros/ouroboros ) from 0.15.4 to 0.15.5.
- [Release notes](https://github.com/joshua-maros/ouroboros/releases )
- [Commits](https://github.com/joshua-maros/ouroboros/commits )
---
updated-dependencies:
- dependency-name: ouroboros
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-10-04 17:54:42 +03:00
dependabot[bot]
dbdc159a32
build(deps): bump once_cell from 1.14.0 to 1.15.0
...
Bumps [once_cell](https://github.com/matklad/once_cell ) from 1.14.0 to 1.15.0.
- [Release notes](https://github.com/matklad/once_cell/releases )
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md )
- [Commits](https://github.com/matklad/once_cell/compare/v1.14.0...v1.15.0 )
---
updated-dependencies:
- dependency-name: once_cell
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-10-04 10:34:06 +03:00
dependabot[bot]
a0ef304ae9
build(deps): bump smallvec from 1.9.0 to 1.10.0
...
Bumps [smallvec](https://github.com/servo/rust-smallvec ) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/servo/rust-smallvec/releases )
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.9.0...v1.10.0 )
---
updated-dependencies:
- dependency-name: smallvec
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-10-04 01:44:21 +03:00
dependabot[bot]
103f384a08
build(deps): bump image from 0.24.3 to 0.24.4
...
Bumps [image](https://github.com/image-rs/image ) from 0.24.3 to 0.24.4.
- [Release notes](https://github.com/image-rs/image/releases )
- [Changelog](https://github.com/image-rs/image/blob/master/CHANGES.md )
- [Commits](https://github.com/image-rs/image/compare/v0.24.3...v0.24.4 )
---
updated-dependencies:
- dependency-name: image
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-10-04 00:49:25 +03:00
relrelb
ed9e9c2a83
webgl: Remove dead `u_num_colors`
...
It wasn't been used since its introduction in fa5c09b0cd
.
2022-10-03 22:38:38 +03:00
Aaron Hill
12b0bffd12
wgpu: Remove `width` and `height` fields from our `Texture` wrapper struct
...
These are duplicates of fields in `Bitmap`
2022-09-26 15:00:26 -05:00
relrelb
e1d01b0a5e
swf: Extract `Rectangle` to a separate file
...
And make it generic, as a first step towards making it a general-purpose
data structure for the whole codebase. Some potential replacements are:
* `BoundingBox` in `render/src/bounding_box.rs`.
* `BoxBounds` in `core/src/html/dimensions.rs`.
* Parameters to a bunch of `BitmapData` methods in
`core/src/bitmap/bitmap_data.rs`.
2022-09-25 10:37:56 +03:00
relrelb
b5084eef25
Revert "web: Bump `wasm-bindgen` to 0.2.83"
...
This reverts commit 1954f6162f
.
2022-09-24 09:52:25 +03:00
relrelb
1954f6162f
web: Bump `wasm-bindgen` to 0.2.83
...
This reverts commit cf721d45f9
and restores
commit 084b252030
, this time without updating
`web-sys`, due to being coupled to `wgpu`.
2022-09-23 17:23:35 +03:00
relrelb
e7643c731b
core: `ColorTransform` cleanup
...
Main changes:
* Merge `ColorTransformParams` into `ColorTransformObject`, as it's only relevant for AVM1.
* Make `BitmapData::color_transform` work with a generic `ColorTransform`, which uses fixed-point
arithmetic.
Note that Ruffle still calculates color transforms slightly different from Flash. This is probably
caused by inaccuracy of the current `ColorTransformObject` to `ColorTransform` conversion and/or the
`ColorTransform` application logic itself. Since this requires further research, it'll be fixed in a
future PR.
2022-09-23 11:10:12 +03:00
relrelb
c31e9e2b11
render: Random cleanups
...
Avoid some `Vec::with_capacity` and de-duplicate code.
2022-09-22 03:00:02 +03:00
relrelb
9d4ab37ef6
core: Replace consecutive `push`es with `extend`
...
This should be slightly more efficient.
2022-09-22 03:00:02 +03:00
Aaron Hill
423d7e4cc4
render: Treat `update_texture` with invalid `BitmapHandle` as an error
...
This should be impossible to trigger from ActionScript, so
we shouldn't ignore it.
2022-09-16 22:03:15 -06:00
Daniel Jacobs
cf721d45f9
Revert "web: Bump `wasm-bindgen` to 0.2.83"
...
This reverts commit 084b252030
.
2022-09-15 22:33:07 +02:00
relrelb
084b252030
web: Bump `wasm-bindgen` to 0.2.83
...
As usual, also bump its helper crates (`js-sys`, `web-sys` and
`wasm-bindgen-futures`) to the latest versions.
Due to https://github.com/rustwasm/wasm-bindgen/pull/3031 , use the
`serde-wasm-bindgen` crate as a replacement to the deprecated
`JsValue::from_serde` function.
2022-09-14 09:03:31 +03:00
Aaron Hill
1d6b3b6f57
chore: Fix Clippy lints and allow `clippy::bool_to_int_with_if`
...
In several cases, the current code seems preferable to the
code required by `clippy::bool_to_int_with_if`. Let's suppress
this for now to get the build passing, and decide later if this
is something that we want to enable.
2022-09-11 13:31:46 +02:00
Nathan Adams
92044c9c02
wgpu: Merge bitmap bind groups 2 and 3
2022-09-11 09:07:53 +02:00
Nathan Adams
d867a370fc
wgpu: Cache direct bitmap draw bind groups (smoothing vs not)
2022-09-11 09:07:53 +02:00
Nathan Adams
57ddb6bdcb
wgpu: Refactor out bitmap bind group from drawtype
2022-09-11 09:07:53 +02:00
Nathan Adams
dd7f23f319
wgpu: Add documentation for pipeline binding groups
2022-09-11 09:07:53 +02:00
Nathan Adams
2d48d78990
wgpu: Removed redundant _pipeline suffix in Pipelines
2022-09-11 09:07:53 +02:00
Nathan Adams
a38cadfd39
wgpu: Cache shape pipelines per texture format & msaa
2022-09-11 09:07:53 +02:00
Nathan Adams
a8ff81ee38
wgpu: Make vertex buffer descriptions const
2022-09-11 09:07:53 +02:00
Aaron Hill
b62c17577b
wgpu: Switch to arena
2022-09-11 09:07:53 +02:00
Nathan Adams
c63aa2cfc8
wgpu: Moved Draw creation outside of backend
2022-09-11 09:07:53 +02:00
Nathan Adams
b2e02db72f
wgpu: Extracted a create_texture_transforms method
2022-09-11 09:07:53 +02:00
Nathan Adams
e7e0905647
wgpu: Moved Mesh, Draw and DrawType to their own file, and code that constructs a DrawType there too
2022-09-11 09:07:53 +02:00
Nathan Adams
f36bcac742
wgpu: Move actual frame rendering to Surface, deduplicates some code
2022-09-11 09:07:53 +02:00
Nathan Adams
b2ecd39648
wgpu: Enable MSAA for offscreen textures
2022-09-11 09:07:53 +02:00
Nathan Adams
69aba474e1
wgpu: Split off srgb and msaa code from backend to a Surface enum
2022-09-11 09:07:53 +02:00
Nathan Adams
03f7719c49
wgpu: Move quad into its own structure under Descriptors
2022-09-11 09:07:53 +02:00
Nathan Adams
a8e8b01a6c
wgpu: Use a static buffer for srgb transform uniforms, reworked it from Frame
2022-09-11 09:07:53 +02:00
Nathan Adams
a1d1da5d25
wgpu: Simplify stencil usage from Frame's perspective
2022-09-11 09:07:53 +02:00
Nathan Adams
794b30e10e
wgpu: Split draw_x into prep_x and draw
2022-09-11 09:07:53 +02:00
Nathan Adams
91f3230a45
wgpu: Split off Frame into CommandRenderer and Frame - command renderer translates commands into draw calls on frame
2022-09-11 09:07:53 +02:00
Nathan Adams
22ba32b785
wgpu: Remove target from Frame
2022-09-11 09:07:53 +02:00
Nathan Adams
8616c898cc
wgpu: Remove globals from Frame
2022-09-11 09:07:53 +02:00
Nathan Adams
14ecc98780
wgpu: Pass quad vbo/ibo as slices
2022-09-11 09:07:53 +02:00
Nathan Adams
09172c8b12
wgpu: Simplified rendering code down to 'apply transform, draw x'
2022-09-11 09:07:53 +02:00
Nathan Adams
5f671c0018
wgpu: Fixed panic if rendering to a texture smaller than 1x1
2022-09-11 09:07:53 +02:00
Nathan Adams
d5ab88f40d
wgpu: Make buffer blocks Pin<Box<Block>>
2022-09-11 09:07:53 +02:00
Nathan Adams
08471c6fb7
wgpu: Don't keep setting globals bind group, it only needs to be set once
2022-09-11 09:07:53 +02:00
Nathan Adams
41239039eb
wgpu: Moved all bind group layouts into their own struct
2022-09-11 09:07:53 +02:00
Nathan Adams
f33e6904cd
wgpu: Moved bind layouts out of Pipelines, they don't change
2022-09-11 09:07:53 +02:00
Nathan Adams
39e1224bda
wgpu: Don't recompile shaders for each Pipelines
2022-09-11 09:07:53 +02:00
Nathan Adams
7e013183a7
wgpu: Removed Descriptors::pipelines, we don't need 3 pipelines
2022-09-11 09:07:53 +02:00
Nathan Adams
8b6c6f8a62
wgpu: Removed DescriptorsTargetData::surface_format and frame_buffer_format as they aren't needed to be target specific
2022-09-11 09:07:53 +02:00
Nathan Adams
6755e1ccbd
wgpu: Pass the pipelines to frame instead of deciding based on a macro
2022-09-11 09:07:53 +02:00
Nathan Adams
13657e16ca
wgpu: Make render_offscreen use its own Frame instead of making a whole new renderer backend
2022-09-11 09:07:53 +02:00
Nathan Adams
697369536c
wgpu: Split off code that actually renders a frame
2022-09-11 09:07:53 +02:00
Nathan Adams
267ea0fd13
render: Introduced render commands, moved to a command list model instead of direct rendering
2022-09-11 09:07:53 +02:00
Nathan Adams
c7f420dde5
wgpu: Moved WgpuRenderBackend into backend.rs
2022-09-11 09:07:53 +02:00
Nathan Adams
70d96654d7
wgpu: Move descriptors out into its own file
2022-09-11 09:07:53 +02:00
Aaron Hill
2f81f5814d
render: Add `premultiplied_alpha` parameter for image capture
...
When rendering offscreen, we want the resulting image to use
premultiplied alpha, since the image will be stored in a texture.
However, when capturing an image in the exporter or test framework,
we want to use straight alpha, so that the resulting image can
be saved as a PNG.
Previously, we incorrectly used straight alpha everywhere, resulting
in incorrect output when using BitmapData.draw with transparency.
2022-09-09 15:46:48 -07:00
relrelb
ca701c4aeb
webgl: Remove `Texture` wrapper
...
`width` and `height` are already stored in `Bitmap`, so simply use
a `WebGlTexture` directly.
2022-09-08 21:04:02 -05:00
relrelb
e0aba46bb2
chore: Remove unused `image` dependency
...
This basically reverts #7254 for all `.toml` files, except for `wgpu`
where it's actually needed on both desktop and web.
2022-09-07 13:09:29 -07:00
Aaron Hill
7218146e04
avm2: Implement BitmapData.dispose
...
We now check if a BitmapData has been disposed by checking
for a zero width or height (which cannot happen otherwise).
As a result, we no longer need the 'disposed' field on the AVM1
BitmapData object.
2022-09-07 11:02:53 -07:00
Aaron Hill
93607aa86e
avm2: Implement `BitmapData.draw` for `wgpu` backend ( #7254 )
...
* avm2: Implement `BitmapData.draw` for `wgpu` backend
This method requires us to have the ability to render directly to a
texture. Fortunately, the `wgpu` backend already supports this in
the form of `TextureTarget`. However, the rendering code required
some refactoring in order to avoid creating duplicate `wgpu` resources.
The current implementation blocks on copying the pixels back
from the GPU to the CPU, so that we can immediately set them in
the Ruffle `BitmapData`. This is likely very inefficient, but will
work for a first implementation.
In the future, we could explore allowing the CPU image data and GPU
texture to be out of sync, and only synchronized when explicitly
necessary (e.g. on `getPixel` or `setPixel` calls).
* Rename `with_offscreen_backend` to `render_offscreen` and use Bitmap
* Don't panic when backend doesn't implement `render_offscreen`
2022-09-06 16:38:48 -05:00
dependabot[bot]
d7a224d2c7
build(deps): bump png from 0.17.5 to 0.17.6
...
Bumps [png](https://github.com/image-rs/image-png ) from 0.17.5 to 0.17.6.
- [Release notes](https://github.com/image-rs/image-png/releases )
- [Changelog](https://github.com/image-rs/image-png/blob/master/CHANGES.md )
- [Commits](https://github.com/image-rs/image-png/commits )
---
updated-dependencies:
- dependency-name: png
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-09-05 15:14:36 -07:00
dependabot[bot]
aacc3c231a
build(deps): bump clap from 3.2.18 to 3.2.20
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.2.18 to 3.2.20.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/v3.2.20/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v3.2.18...v3.2.20 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-09-05 14:47:03 -07:00
Nathan Adams
33b35cc29b
wgpu: Use lowest limits and then bump up only what we need - fixes #5566 , fixes #7256
2022-09-04 18:55:13 -07:00
Nathan Adams
5585772d54
wgpu: Don't make pipelines for blend modes we don't support
2022-09-04 18:55:13 -07:00
Nathan Adams
03744d46f1
web: Rename wgpu feature to webgpu, add wgpu-webgl feature to use webgl through wgpu
2022-09-04 18:55:13 -07:00
Nathan Adams
0ac2a3f361
wgpu: Try lower limits when full aren't available, and use uniforms for gradients if storage won't work
2022-09-04 18:55:13 -07:00
relrelb
fb39bb2b71
swf: Remove `Copy` from `Rectangle`
...
Use `.clone()` explicitly where needed.
2022-09-02 18:21:13 -07:00
relrelb
299da43c16
swf: Extract `ShapeFlag`
2022-09-02 18:21:13 -07:00
Mike Welsh
c17da6e91a
core: Fix some issues with `hitTest`
...
Fixes some issues with our winding # calculation which would cause
incorrect results for hitTest.
* The convention for handling an intersection at endpoints was
not the same between lines and bezier curves.
* The bezier curve winding # function was not properly handling
some cases where the curve was strictly y-monotonic.
* Simplify the code a bit so that ray-curve intersections are
returned in a consistent order based on upward/downward crossing.
2022-09-02 14:51:46 -07:00
relrelb
0d6462cfab
render: Remove `gc-arena` dependency
...
It was only used to make structs `#[derive(gc_arena::Collect)]`, and
generally it doesn't make much sense that `render` needs to be GC-aware.
So instead annotate `render` fields in `core` with `#[collect(require_static)]`.
2022-09-02 09:49:18 -07:00
dependabot[bot]
33cc87ce27
build(deps): bump clap from 3.2.17 to 3.2.18
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.2.17 to 3.2.18.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/v3.2.18/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v3.2.17...v3.2.18 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-08-30 00:19:02 +03:00
dependabot[bot]
802de0e7d1
build(deps): bump futures from 0.3.23 to 0.3.24
...
Bumps [futures](https://github.com/rust-lang/futures-rs ) from 0.3.23 to 0.3.24.
- [Release notes](https://github.com/rust-lang/futures-rs/releases )
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.23...0.3.24 )
---
updated-dependencies:
- dependency-name: futures
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-08-29 23:38:43 +03:00
Aaron Hill
fa0c843a4d
avm2: Implement DisplayObject.scrollRect
...
This property causes a DisplayObject to be both translated
and cropped.
2022-08-26 13:04:01 -07:00
=
211a64b402
webgl: Replace Box<dyn Error> with actual Error enum
2022-08-25 23:43:21 +02:00
=
17f261fc1f
wgpu: Descriptors::new is infallible, removed error path
2022-08-25 23:43:21 +02:00
=
b29b30de58
wgpu: Pipelines::new is infallible, removed error path
2022-08-25 23:43:21 +02:00
=
201ed60d67
canvas: Removed generic error, was never actually used - just an Option worked better
2022-08-25 23:43:21 +02:00
=
461c977be0
render: unregister_bitmap is infallible, removed error path
2022-08-25 23:43:21 +02:00
=
03eb769a33
render: Made render use a real Error enum and not generic box<error>
2022-08-25 23:43:21 +02:00
Aaron Hill
b5391c00f6
tests: Re-add per-platform image tests
...
Reverts #7267
The image tests for the upcoming 'DisplayObject.stageRect' support
differ between Linux and Windows, so we need this support again.
To avoid the Linux filename churn that we previously encountered,
we now only include the platform and graphics backend in the filename
(e.g. `expected-linux-Vulkan`). This may result in some unexpected
'mismatched image' test failures if GHA updates to a version of Lavapipe
that changes rendering output, but this should be relatively easy to
notice.
2022-08-24 21:29:53 -07:00
dependabot[bot]
f93a8800a3
build(deps): bump bytemuck from 1.12.0 to 1.12.1
...
Bumps [bytemuck](https://github.com/Lokathor/bytemuck ) from 1.12.0 to 1.12.1.
- [Release notes](https://github.com/Lokathor/bytemuck/releases )
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md )
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.12.0...v1.12.1 )
---
updated-dependencies:
- dependency-name: bytemuck
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-08-22 13:45:14 -07:00
Aaron Hill
98c7f443ce
core: Only store viewport dimensions in `RenderBackend`
...
Previously, the viewport height and width were stored in
both `Stage` and the `RenderBackend`. Any changes to the viewport
dimensions (e.g. due to window resizing) needed to be updated in both
places to keep our handling of the viewport consistent.
This PR adds a new `ViewportDimensions` type, which holds the
width, height, and scale factor. It is stored inside the
`RenderBackend` impl, and is retrieved using the newly added
method `RenderBackend.get_viewport_dimensions`. After a `Player`
has been constructed, any code that needes access to the viewport
dimensions will ultimate go through this method.
Unfortunately, `Stage` needs to use the viewport dimensions
in `build_matrices`. Therefore, any code modifying the viewport
dimensions should go through `player.set_viewport_dimensions`,
which ensures that the stage matrices are rebuilt after the render
backend is updated.
2022-08-22 13:44:30 -07:00
Mike Welsh
89cb1212ad
render: Disable most blend modes
...
Avoid blend modes except ADD and SUBTRACT until they can be
implemented properly.
2022-08-19 14:59:08 -07:00
Aaron Hill
8a1e297e26
wgpu: Convert from premultiplied to straight alpha when capturing image
...
The captured WGPU texture uses premultiplied alpha.
This image gets saved as a PNG, so it should use straight alpha.
Note that all of our current image tests have 'alpha = 1.0' for all
of the pixels, so this currently has no effect.
2022-08-19 13:35:07 -07:00
Mike Welsh
f72e02f4b2
core: Add unmultiply_alpha_rgba
2022-08-19 13:35:07 -07:00
Mike Welsh
04c440e860
webgl: Stub out more blend modes
2022-08-18 16:38:17 -07:00
Mike Welsh
a6b70e60ea
wgpu: Stub out more blend modes
2022-08-18 16:38:17 -07:00
Mike Welsh
0861bc86eb
canvas: Stub out more blend modes
2022-08-18 16:38:17 -07:00
Aaron Hill
f7205a02a9
render: Add BlendMode infrastructure and implement BlendMode.ADD
...
Each render backend keeps track of a stack of BlenModes,
which are pushed and popped by 'core' as we render objects
in the displaay tree. For now, I've just implemented BlendMode.ADD,
which maps directly onto blend mode supported by each backend.
All other blend modes (besides 'NORMAL') will produce a warning
when we try to render using them. This may produce a very large amount
of log output, but it's simpler than emitting each warning only once,
and will help to point developers in the right direction when they
get otherwise inexplicable rendering issues (due to a blend mode
not being implemented).
The wgpu implementation is by far the most complicated, as we need
to construct a `RenderPipeline` for each possible
`(BlendMode, MaskState)`. I haven't been able to find any documentation
about the maximum supported number of (simultaneous) WebGPU render
pipelines - if this becomes an issue, we may need to register them
on-demand when a particular blend mode is requested.
2022-08-18 16:38:17 -07:00
dependabot[bot]
82716d9be3
build(deps): bump bytemuck from 1.11.0 to 1.12.0
...
Bumps [bytemuck](https://github.com/Lokathor/bytemuck ) from 1.11.0 to 1.12.0.
- [Release notes](https://github.com/Lokathor/bytemuck/releases )
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md )
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.11.0...v1.12.0 )
---
updated-dependencies:
- dependency-name: bytemuck
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-08-16 01:39:03 +03:00
dependabot[bot]
7ffe92a36a
build(deps): bump clap from 3.2.16 to 3.2.17
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.2.16 to 3.2.17.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/v3.2.17/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v3.2.16...v3.2.17 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-08-16 00:30:12 +03:00
dependabot[bot]
ad2b1bbd24
build(deps): bump futures from 0.3.21 to 0.3.23
...
Bumps [futures](https://github.com/rust-lang/futures-rs ) from 0.3.21 to 0.3.23.
- [Release notes](https://github.com/rust-lang/futures-rs/releases )
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.21...0.3.23 )
---
updated-dependencies:
- dependency-name: futures
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-08-15 23:37:47 +03:00
Nathan Adams
c4488fc883
render: Removed common_tess and moved tessellator to render
2022-08-14 18:38:14 -07:00
Nathan Adams
e1f38b26c0
render: Removed ruffle_core dep from all renderers
2022-08-14 18:38:14 -07:00
Nathan Adams
824b4aa8d1
render: Moved render backend from core to render
2022-08-14 18:38:14 -07:00
Nathan Adams
760da753fb
render: Moved Transform from core to render
2022-08-14 18:38:14 -07:00
Nathan Adams
f088d8ac3a
render: Moved color_transform from core to render
2022-08-14 18:38:14 -07:00
Nathan Adams
35082b687f
render: Moved shape_utils from core to render
2022-08-14 18:38:14 -07:00
Nathan Adams
b3afb59b53
render: Moved BoundingBox from core to render
2022-08-14 18:38:14 -07:00
Nathan Adams
91a7047ebb
render: Moved Matrix from core to render
2022-08-14 18:38:14 -07:00
Nathan Adams
9fd8fd938e
render: Moved render utils from core to render
2022-08-14 18:38:14 -07:00
Nathan Adams
bc0c7cbccb
render: Made new render crate, moved Bitmap stuff to it
2022-08-14 18:38:14 -07:00
Nathan Adams
cebe11ee38
wgpu: Avoid panics when attempting to create a texture larger than the device supports
2022-08-13 02:35:30 -07:00
Nathan Adams
3d235ac58f
wgpu: Make descriptors an Arc
2022-08-09 23:19:42 +02:00
Nathan Adams
08de63afb2
wgpu: Store Uniforms Buffer outside of Descriptor, so Descriptor can be immutable once again
2022-08-09 23:19:42 +02:00
Nathan Adams
9b33a18c7c
wgpu: Store Globals outside of Descriptor, so Descriptor can be immutable once again
2022-08-09 23:19:42 +02:00
relrelb
761759c4b3
wgpu: Pull out more code to `mask_render_state`
2022-08-07 10:18:48 +03:00
dependabot[bot]
d0535f4cb8
build(deps): bump clap from 3.2.15 to 3.2.16
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.2.15 to 3.2.16.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v3.2.15...v3.2.16 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-08-02 23:06:07 +03:00
dependabot[bot]
bb96025800
build(deps): bump enum-map from 2.4.0 to 2.4.1
...
Bumps [enum-map](https://github.com/xfix/enum-map ) from 2.4.0 to 2.4.1.
- [Release notes](https://github.com/xfix/enum-map/releases )
- [Changelog](https://github.com/xfix/enum-map/blob/master/CHANGELOG.md )
- [Commits](https://github.com/xfix/enum-map/compare/v2.4.0...v2.4.1 )
---
updated-dependencies:
- dependency-name: enum-map
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-08-02 20:34:41 +03:00
Mike Welsh
8c4dcf29ee
web: Rollback to web-sys 0.3.58
2022-07-30 19:07:39 +02:00
relrelb
286dccc274
wgpu: Introduce `create_shape_pipeline`
...
It is essentially a unification of `create_color_pipeline`, `create_bitmap_pipeline`
and `create_gradient_pipeline`.
2022-07-29 11:00:48 -07:00
relrelb
79f36964b4
web: Bump wasm-bindgen to 0.2.82
...
As usual, also bump its helper crates (`js-sys`, `web-sys` and
`wasm-bindgen-futures`) to the latest versions.
2022-07-29 09:40:14 -07:00
dependabot[bot]
df07f610e7
build(deps): bump clap from 3.2.14 to 3.2.15
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.2.14 to 3.2.15.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/v3.2.15/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v3.2.14...v3.2.15 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-07-25 23:35:39 +03:00
relrelb
afb9ecc4ab
webgl: Avoid zeroing `renderbuffer_{width,height}`
...
This basically reverts #5737 and #6458 for the WebGL backend, which
regressed a bug where setting the style `display: none;` to a Ruffle
player logged many WebGL warnings to the console. This happened
because `renderbuffer_width` and `renderbuffer_height` were set to zero,
leading to problems when trying to pass them to WebGL APIs.
Avoid such situation by ensuring that `renderbuffer_width` and
`renderbuffer_height` are at least `1`, exactly as done before.
Also add a comment that explains why `.clamp()` isn't used.
Fixes #1264 .
2022-07-24 23:37:54 +03:00
Mike Welsh
6f142c21fa
canvas: Fix transforming of gradient/bitmap strokes
2022-07-19 15:01:17 -07:00
Mike Welsh
1980d6f420
canvas: Scale stroke width based on shape transform
2022-07-19 15:01:17 -07:00
dependabot[bot]
80dd295748
build(deps): bump lyon from 0.17.10 to 1.0.0
...
Bumps [lyon](https://github.com/nical/lyon ) from 0.17.10 to 1.0.0.
- [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 )
---
updated-dependencies:
- dependency-name: lyon
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-07-11 23:36:39 +03:00
relrelb
115f15806e
chore: Fix `needless_borrow` clippy lints
...
Though https://github.com/rust-lang/rust-clippy/pull/8355 has been
merged, it seems to still report false-positives on nightly channel.
For now just fix the instances reported by stable clippy, and keep
`needless_borrow` allowed.
2022-07-08 14:14:30 +03:00
dependabot[bot]
cfe3d37905
build(deps): bump bytemuck from 1.9.1 to 1.10.0
...
Bumps [bytemuck](https://github.com/Lokathor/bytemuck ) from 1.9.1 to 1.10.0.
- [Release notes](https://github.com/Lokathor/bytemuck/releases )
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md )
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.9.1...v1.10.0 )
---
updated-dependencies:
- dependency-name: bytemuck
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-07-04 23:55:22 +03:00
Mike Welsh
d3c64d4eb7
webgl/wgpu: Omit strokes when drawing a mask stencil
...
Adjust `common_tess` to add an additional `mask_index_count` to
draws. This is used to not render strokes when drawing a shape as
a mask stencil.
Fixes #7027 .
2022-07-02 16:57:53 -07:00
Mike Welsh
b39d54de2c
wgpu: Update exporter for wgpu 0.13
2022-07-02 16:44:37 -07:00
Mike Welsh
cb70d6e612
wgpu: Prefer linear surface formats
...
wgpu 0.13 added `Surface::get_supported_formats`, so we can check
if a non-sRGB surface format is supported on the current platform.
Because Flash colors and blending are in sRGB space, we want a
linear surface when possible to prevent the colors from being
fiddled with by the GPU.
2022-07-02 16:44:37 -07:00
relrelb
65be2adc63
wgpu: Bump to `0.13.0`
...
Based on the work in #6717 , plus additional adaptions mentioned in
https://github.com/gfx-rs/wgpu/blob/master/CHANGELOG.md#wgpu-013-2022-06-30 ,
and more not-mentioned but required changes.
Also bump `wasm-bindgen` to `0.2.81` (along with its helper crates), as
required by the new `wgpu` version.
Note that I don't fully understand some of the required changes, notably:
* `wgpu::PresentMode::Mailbox` no longer works on my machine (Windows 11) -
The `wgpu` documentation says that `wgpu::PresentMode::Fifo` is the
only guaranteed to be supported, so I switched over to it instead.
* `self.staging_belt.recall()` doesn't return a `Future` anymore -
I assume it became synchronous so I simply removed the `executor`
from there.
2022-07-02 16:44:37 -07:00
Aaron Hill
a79aa08f08
core: Free render backend resources on `BitmapData.dispose`
...
Currently, all three render backends hold on texture-related
resources indefinitely (`register_bitmap` pushes to a `Vec`,
and never removes anything). As a result, the resources used
by the render backend (which may include GPU memory) will grow
over time, even if the corresponding `BitmapData` has been deallocated.
This commit adds a new `unregister_bitmap` method, which is called from
`BitmapData.dispose`. All render backs are changed to now use an
`FnvHashMap<BitmapHandle, _>` instead of a `Vec`, allowing us to
remove individual entries.
Currently, we only call `unregister_bitmap in response to
`BitmapData.dispose` - when `BitmapData` is freed by the
garbage collector, `unregister_bitmap` is *not* called.
This will be addressed in a future PR.
2022-06-29 15:16:43 -07:00
dependabot[bot]
06d9a96b4a
build(deps): bump clap from 3.2.1 to 3.2.2
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.2.1 to 3.2.2.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v3.2.1...v3.2.2 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-21 09:54:39 +03:00
dependabot[bot]
4fb6afd993
build(deps): bump enum-map from 2.3.0 to 2.4.0
...
Bumps [enum-map](https://github.com/xfix/enum-map ) from 2.3.0 to 2.4.0.
- [Release notes](https://github.com/xfix/enum-map/releases )
- [Changelog](https://github.com/xfix/enum-map/blob/master/CHANGELOG.md )
- [Commits](https://github.com/xfix/enum-map/compare/v2.3.0...v2.4.0 )
---
updated-dependencies:
- dependency-name: enum-map
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-21 08:53:40 +03:00
dependabot[bot]
a3f5fda85d
build(deps): bump clap from 3.1.18 to 3.2.1
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.1.18 to 3.2.1.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v3.1.18...clap_complete-v3.2.1 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-17 07:58:21 +03:00
relrelb
53ef80f514
render: Introduce `RenderBackend::register_bitmap`
...
Since all `RenderBackend::register_bitmap_*` implementations are
identical now, move them to the default implementation of `RenderBackend`.
Also, turn `RenderBackend::register_bitmap_raw` into `RenderBackend::register_bitmap`,
which accepts a single `Bitmap` parameter.
2022-06-02 15:27:29 -07:00
relrelb
4fb77edfb1
render: Move `srgb_to_linear` to `common_tess`
...
Since it's the only user of it. Also make it mutate the float array
parameter instead of returning a new one, just to simply things a
bit.
2022-05-31 21:48:11 +03:00
relrelb
34d5a8f9d4
canvas: Remove dead `srgb_to_linear` function
...
There's another similar function in `core/src/backend/render.rs`.
2022-05-31 21:48:11 +03:00
dependabot[bot]
e4ef3c6406
build(deps): bump enum-map from 2.2.0 to 2.3.0
...
Bumps [enum-map](https://github.com/xfix/enum-map ) from 2.2.0 to 2.3.0.
- [Release notes](https://github.com/xfix/enum-map/releases )
- [Changelog](https://github.com/xfix/enum-map/blob/master/CHANGELOG.md )
- [Commits](https://github.com/xfix/enum-map/commits/v2.3.0 )
---
updated-dependencies:
- dependency-name: enum-map
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 23:36:14 +03:00
Aaron Hill
811af340c3
render: Fix swapped 'width' and 'height' in wgpu `register_bitmap_raw`
...
These arguments were being passed in the wrong order, leading to a crash
when the width and height are not equal.
2022-05-25 21:56:34 +03:00
Mike Welsh
4f6959184b
canvas: Remove `BitmapDataStorage` and fix lifetime of bitmap data
...
* Remove `BitmapDataStorage` as its no longer necessary, and store
the bitmap canvas/context in `BitmapData` instead.
* Store the `Bitmap` RBGA buffer in the canvas backend. Previously
this was thrown away when converted to `ImageData`, but this
causes the glitchy pixels mentioned in:
https://github.com/ruffle-rs/ruffle/pull/6975#issuecomment-1127942520
`ImageData` does not copy the buffer passed to it, so store it
to keep it alive. See:
https://github.com/rustwasm/wasm-bindgen/issues/2445
2022-05-22 05:47:46 -07:00
Mike Welsh
32bf7e1412
chore: Appease clippy
2022-05-22 02:34:18 -07:00
dependabot[bot]
5a50f4cec1
build(deps): bump enum-map from 2.1.0 to 2.2.0
...
Bumps [enum-map](https://gitlab.com/KonradBorowski/enum-map ) from 2.1.0 to 2.2.0.
- [Release notes](https://gitlab.com/KonradBorowski/enum-map/tags )
- [Changelog](https://gitlab.com/KonradBorowski/enum-map/blob/master/CHANGELOG.md )
- [Commits](https://gitlab.com/KonradBorowski/enum-map/commits/master )
---
updated-dependencies:
- dependency-name: enum-map
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-05-21 23:04:43 -07:00
Mike Welsh
ff3407cbe0
canvas: Use `DomMatrix` instead of `SvgMatrix`
2022-05-21 19:34:49 -07:00
Mike Welsh
169e86ceb4
canvas: Reimplement masking
...
Use `CanvasRenderingContext2d.clip` for masking instead of using
intermediate canvases.
2022-05-21 19:34:49 -07:00
Mike Welsh
c503f78e13
canvas: Remove `pixelated_property_value`
...
This is no longer used with the removal of the SVG paths in #6975 .
2022-05-19 16:12:54 -07:00
Mike Welsh
a10c2ff9c7
canvas: Remove Firefox hack for additive alpha color transforms
...
This was added in fecb981
to workaround an issue with additive
alpha color transforms in Firefox. This seems to have been fixed
and is no longer necessary, so Firefox can use the normal code
path.
2022-05-19 16:12:54 -07:00
Mike Welsh
48f7ff5f4d
core: Add `Bitmap::to_rgba`
2022-05-19 10:43:54 -07:00
Mike Welsh
e710f3fa0e
core: Clean up `render::Bitmap`
...
* Make `BitmapFormat` a fieldless enum and move `data` to its own
field for ease of use.
* Make `Bitmap` fields private.
2022-05-19 10:43:54 -07:00
Mike Welsh
6615ed17f9
core: Verify bitmap length after decoding
...
Guarantee bitmap data after decoding has the expected length for
the given width+height+format. This eases the burden from backends
to worry about this. Pad or truncate the data if it doesn't have
the expected size.
2022-05-19 10:43:54 -07:00
relrelb
f3af11db9c
canvas: Remove some unused dependencies
...
They're now unused thanks to #6975 .
Also remove the `crate-type` field from `Cargo.toml`. I'm not sure
exactly what it does and why it was introduced, but seems working
without it.
2022-05-17 09:51:13 -07:00
Mike Welsh
2f99d039cc
canvas: Remove `BitmapDataStorage::ImageElement`
...
Remove the `ImageElement` data path for storing bitmaps, as the
asynciness of this is difficult to manage when we need to render
bitmaps immediately. This code path was only being used for JPEG
images that could be decoded by the browser (no alpha).
Instead, always use canvases for bitmap storage. This simplifies
the code and solves some issues with bitmaps not being rendered
properly, although it is likely a little slower toe decode these
JPEGs on the Rust side.
2022-05-16 17:13:48 -07:00
Mike Welsh
d0aa7b4df2
canvas: Remove SVG rendering path
...
Remove `CanvasDrawCommand::DrawImage` and all associated machinery
that generates an SVG.
2022-05-16 17:13:48 -07:00
Mike Welsh
ce044409e4
canvas: Use canvas drawing commands for gradients
...
Most gradients are "simply transformed" and can be rendered
directly using canvas commands. But even for complex transforms,
we can push the gradient's transform to the canvas, then
un-transform the path using the inverse of the gradient transform.
2022-05-16 17:13:48 -07:00
dependabot[bot]
27da91b7a0
build(deps): bump clap from 3.1.17 to 3.1.18
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.1.17 to 3.1.18.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v3.1.17...v3.1.18 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-05-16 13:54:02 -07:00
TÖRÖK Attila
c40c0d7ef9
webgl: Use clamp(x, 0.0, 1.0) instead of saturate(x)
...
The latter seems to not exist
2022-05-13 09:31:21 -07:00
Mike Welsh
edad1569fb
webgl: Clamp alpha in shaders ( fix #6954 )
2022-05-12 14:50:25 -07:00
Mike Welsh
121c2577b4
wgpu: Clamp alpha in shaders ( fix #6954 )
2022-05-12 14:50:25 -07:00
relrelb
cab49ae6e1
swf: Introduce `Color::WHITE`
...
And use it where possible, to improve code readablity.
2022-05-12 12:12:06 -07:00
dependabot[bot]
7352aca3bc
build(deps): bump jpeg-decoder from 0.2.5 to 0.2.6
...
Bumps [jpeg-decoder](https://github.com/image-rs/jpeg-decoder ) from 0.2.5 to 0.2.6.
- [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/compare/v0.2.5...v0.2.6 )
---
updated-dependencies:
- dependency-name: jpeg-decoder
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-05-09 13:46:12 -07:00
dependabot[bot]
a853b897ca
build(deps): bump clap from 3.1.15 to 3.1.17
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.1.15 to 3.1.17.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v3.1.15...v3.1.17 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-05-09 13:45:19 -07:00
relrelb
f6153ff7c1
chore: Appease clippy
2022-05-06 10:36:38 -07:00
dependabot[bot]
fcc199b0e5
build(deps): bump jpeg-decoder from 0.2.4 to 0.2.5
...
Bumps [jpeg-decoder](https://github.com/image-rs/jpeg-decoder ) from 0.2.4 to 0.2.5.
- [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/compare/v0.2.4...v0.2.5 )
---
updated-dependencies:
- dependency-name: jpeg-decoder
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 14:48:42 -07:00
dependabot[bot]
c1bcc98668
build(deps): bump image from 0.24.1 to 0.24.2
...
Bumps [image](https://github.com/image-rs/image ) from 0.24.1 to 0.24.2.
- [Release notes](https://github.com/image-rs/image/releases )
- [Changelog](https://github.com/image-rs/image/blob/master/CHANGES.md )
- [Commits](https://github.com/image-rs/image/commits/v0.24.2 )
---
updated-dependencies:
- dependency-name: image
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 14:48:00 -07:00
dependabot[bot]
7ab8c340fa
build(deps): bump clap from 3.1.12 to 3.1.15
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.1.12 to 3.1.15.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v3.1.12...v3.1.15 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 14:47:37 -07:00
dependabot[bot]
1aafd5c62b
build(deps): bump clap from 3.1.9 to 3.1.12
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.1.9 to 3.1.12.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v3.1.9...v3.1.12 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-25 13:41:09 -07:00
dependabot[bot]
e6576df298
build(deps): bump clap from 3.1.8 to 3.1.9
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.1.8 to 3.1.9.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v3.1.8...v3.1.9 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-18 14:59:23 -07:00
Mike Welsh
3305ac69c4
web: Support wmode parameter
2022-04-17 08:33:51 -07:00
Mike Welsh
4a38d36cd7
wgpu: Output premultiplied alpha
2022-04-17 08:33:51 -07:00
Mike Welsh
70b7222d20
webgl: Output premultiplied alpha
2022-04-17 08:33:51 -07:00
Mike Welsh
2d43ace225
wgpu: Don't create intermediate render targets when unnecessary
2022-04-15 14:52:33 -07:00
Mike Welsh
f4d72dcc2d
wgpu: Disable depth writes
2022-04-15 14:52:33 -07:00
Mike Welsh
9c11870a08
wgpu: Use linear color render target
...
Always use a non-sRGB texture as the render target so that color
and alpha blending are in sRGB space, matching Flash behavior.
If the surface format requires sRGB, render to an intermediate
linear buffer and copy to the surface as a final render step.
2022-04-15 14:52:33 -07:00
Mike Welsh
00419c6959
wgpu: Use BlendState::ALPHA_BLENDING const
2022-04-15 14:52:33 -07:00
Mike Welsh
e1fbcc70f8
canvas: Handle gradient/bitmap strokes
2022-04-11 22:50:40 -07:00
Mike Welsh
e5a7dc94ba
wgpu/webgl: Handle gradient/bitmap strokes
2022-04-11 22:50:40 -07:00
Mike Welsh
146b8adc68
swf: Clean up LineStyle
...
* Remove LineStyle::color, instead using fill_style with
FillStyle::Color to indicate solid color.
* Store `flags` in the struct instead of separate bools/values.
* Add getters/setters for ease of use.
* Add builder-style methods for setting LineStyle properties.
* Fix misnamed ALLOW_CLOSE flag to NO_CLOSE.
2022-04-11 22:50:40 -07:00
relrelb
eeb5eb18f6
web: Bump wasm-bindgen to 0.2.80
...
As usual, also bump its helper crates (`js-sys`, `web-sys` and
`wasm-bindgen-futures`) to the latest versions.
2022-04-08 09:56:23 -07:00
dependabot[bot]
e456fb3ed6
build(deps): bump jpeg-decoder from 0.2.3 to 0.2.4
...
Bumps [jpeg-decoder](https://github.com/image-rs/jpeg-decoder ) from 0.2.3 to 0.2.4.
- [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/compare/v0.2.3...v0.2.4 )
---
updated-dependencies:
- dependency-name: jpeg-decoder
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-04 14:42:32 -07:00
dependabot[bot]
359e687ec9
build(deps): bump clap from 3.1.6 to 3.1.8
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.1.6 to 3.1.8.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v3.1.6...v3.1.8 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-04 14:25:14 -07:00
dependabot[bot]
1960fc57c3
build(deps): bump bytemuck from 1.9.0 to 1.9.1
...
Bumps [bytemuck](https://github.com/Lokathor/bytemuck ) from 1.9.0 to 1.9.1.
- [Release notes](https://github.com/Lokathor/bytemuck/releases )
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md )
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.9.0...v1.9.1 )
---
updated-dependencies:
- dependency-name: bytemuck
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-04 13:36:47 -07:00
dependabot[bot]
93d2a410a3
build(deps): bump bytemuck from 1.8.0 to 1.9.0
...
Bumps [bytemuck](https://github.com/Lokathor/bytemuck ) from 1.8.0 to 1.9.0.
- [Release notes](https://github.com/Lokathor/bytemuck/releases )
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md )
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.8.0...v1.9.0 )
---
updated-dependencies:
- dependency-name: bytemuck
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-30 11:53:10 -07:00
dependabot[bot]
e5a3365957
build(deps): bump image from 0.23.14 to 0.24.1
...
Bumps [image](https://github.com/image-rs/image ) from 0.23.14 to 0.24.1.
- [Release notes](https://github.com/image-rs/image/releases )
- [Changelog](https://github.com/image-rs/image/blob/master/CHANGES.md )
- [Commits](https://github.com/image-rs/image/commits )
---
updated-dependencies:
- dependency-name: image
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-30 08:55:55 +03:00
relrelb
8bc3e9abd2
wgpu: Switch `Bgra` over to `Rgba`
...
The `image` crate removed `Bgra` in version 0.24.0:
https://github.com/image-rs/image/blob/master/CHANGES.md#version-0240
So stop using it, and start using `Rgba` instead when capturing
images.
2022-03-29 17:18:29 -07:00
relrelb
e27240e434
canvas: Remove `clamped_u8_color` function
...
Since Rust 1.45, the `as` keyword performs a saturating cast when
casting from float to int. Therefore the `clamped_u8_color` function
is useless, and `as` can be simply used instead.
2022-03-28 14:33:32 -07:00
dependabot[bot]
bf57d2c15a
build(deps): bump jpeg-decoder from 0.2.2 to 0.2.3
...
Bumps [jpeg-decoder](https://github.com/image-rs/jpeg-decoder ) from 0.2.2 to 0.2.3.
- [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/compare/v0.2.2...v0.2.3 )
---
updated-dependencies:
- dependency-name: jpeg-decoder
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-29 00:09:01 +03:00
Mike Welsh
ac765bd187
chore: Update copyright
...
I (Michael R. Welsh) assign to Ruffle LLC all rights, title, and
interest to copyrights of my personal contributions to Ruffle,
effective March 26, 2022.
2022-03-26 18:13:14 -07:00
dependabot[bot]
755d5f05ad
build(deps): bump enum-map from 2.0.3 to 2.1.0
...
Bumps [enum-map](https://gitlab.com/KonradBorowski/enum-map ) from 2.0.3 to 2.1.0.
- [Release notes](https://gitlab.com/KonradBorowski/enum-map/tags )
- [Changelog](https://gitlab.com/KonradBorowski/enum-map/blob/master/CHANGELOG.md )
- [Commits](https://gitlab.com/KonradBorowski/enum-map/commits/master )
---
updated-dependencies:
- dependency-name: enum-map
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-26 11:07:23 -07:00
relrelb
7e3c85b0c1
web: Cleanup `web-sys` features
...
Remove unused ones, sort them alphabetically and wrap to 120 columns
per line.
2022-03-18 03:57:20 +02:00
relrelb
e45810f585
webgl: Avoid clamp assertion
...
If `gl.drawingBufferWidth` returns `0`, then a `clamp` in
`WebGlRenderBackend::set_viewport_dimensions` hits an assertion that
`1 <= self.gl.drawing_buffer_width()` is `false`. I was able to
reproduce this on Chrome by creating many dummy WebGL contexts until
Ruffle's one is lost, and then resize the Ruffle player, but this may
happen in other cases as well.
Fix this by allowing `renderbuffer_width` and `renderbuffer_height`
to be `0`. From basic testing, this seems harmless.
2022-03-16 13:53:34 +02:00
relrelb
3e51b7d95b
webgl: Remove parameters of `build_msaa_buffers`
...
Use `self.renderbuffer_{width,height}` instead.
2022-03-14 22:17:43 +02:00
relrelb
02812c7878
webgl: Inline `build_matrices` into `set_viewport_dimensions`
...
And remove the `view_{width,height}` fields, because they're now
used as locals.
2022-03-14 22:17:43 +02:00
relrelb
d2bf6302fc
webgl: De-duplicate code in `register_bitmap`
2022-03-14 22:17:43 +02:00
relrelb
f8f2764ac7
chore: Stop using traits available in prelude
...
This commit does the same as 36353df7f7
,
cleaning up any leftovers and new code added since.
2022-03-14 01:16:00 +02:00
dependabot[bot]
697ad92db5
build(deps): bump bytemuck from 1.7.3 to 1.8.0
...
Bumps [bytemuck](https://github.com/Lokathor/bytemuck ) from 1.7.3 to 1.8.0.
- [Release notes](https://github.com/Lokathor/bytemuck/releases )
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md )
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.7.3...v1.8.0 )
---
updated-dependencies:
- dependency-name: bytemuck
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 23:59:40 +02:00
dependabot[bot]
71758be08b
build(deps): bump png from 0.17.4 to 0.17.5
...
Bumps [png](https://github.com/image-rs/image-png ) from 0.17.4 to 0.17.5.
- [Release notes](https://github.com/image-rs/image-png/releases )
- [Changelog](https://github.com/image-rs/image-png/blob/master/CHANGES.md )
- [Commits](https://github.com/image-rs/image-png/compare/v0.17.4...v0.17.5 )
---
updated-dependencies:
- dependency-name: png
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 23:59:02 +02:00
dependabot[bot]
56ef543f16
build(deps): bump clap from 3.1.3 to 3.1.6
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.1.3 to 3.1.6.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v3.1.3...v3.1.6 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 23:58:51 +02:00
dependabot[bot]
8e6ed37ba4
build(deps): bump enum-map from 2.0.2 to 2.0.3
...
Bumps [enum-map](https://gitlab.com/KonradBorowski/enum-map ) from 2.0.2 to 2.0.3.
- [Release notes](https://gitlab.com/KonradBorowski/enum-map/tags )
- [Changelog](https://gitlab.com/KonradBorowski/enum-map/blob/master/CHANGELOG.md )
- [Commits](https://gitlab.com/KonradBorowski/enum-map/commits/master )
---
updated-dependencies:
- dependency-name: enum-map
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-02-28 23:20:04 +02:00
dependabot[bot]
9657bde02c
build(deps): bump clap from 3.1.2 to 3.1.3
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v3.1.2...v3.1.3 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-02-28 22:31:25 +02:00
dependabot[bot]
b5f65463b6
build(deps): bump png from 0.17.3 to 0.17.4
...
Bumps [png](https://github.com/image-rs/image-png ) from 0.17.3 to 0.17.4.
- [Release notes](https://github.com/image-rs/image-png/releases )
- [Changelog](https://github.com/image-rs/image-png/blob/master/CHANGES.md )
- [Commits](https://github.com/image-rs/image-png/commits )
---
updated-dependencies:
- dependency-name: png
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-02-28 22:31:11 +02:00
dependabot[bot]
ff3aadd134
build(deps): bump clap from 3.0.14 to 3.1.1
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.0.14 to 3.1.1.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v3.0.14...v3.1.1 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-02-21 23:36:57 +02:00
dependabot[bot]
8597b35b6c
build(deps): bump enum-map from 2.0.1 to 2.0.2
...
Bumps [enum-map](https://gitlab.com/KonradBorowski/enum-map ) from 2.0.1 to 2.0.2.
- [Release notes](https://gitlab.com/KonradBorowski/enum-map/tags )
- [Changelog](https://gitlab.com/KonradBorowski/enum-map/blob/master/CHANGELOG.md )
- [Commits](https://gitlab.com/KonradBorowski/enum-map/commits/master )
---
updated-dependencies:
- dependency-name: enum-map
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-02-21 22:55:54 +02:00
dependabot[bot]
4e2f7b02fc
build(deps): bump futures from 0.3.19 to 0.3.21
...
Bumps [futures](https://github.com/rust-lang/futures-rs ) from 0.3.19 to 0.3.21.
- [Release notes](https://github.com/rust-lang/futures-rs/releases )
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.19...0.3.21 )
---
updated-dependencies:
- dependency-name: futures
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-02-13 19:44:57 +02:00
dependabot[bot]
db888ad739
build(deps): bump png from 0.17.2 to 0.17.3
...
Bumps [png](https://github.com/image-rs/image-png ) from 0.17.2 to 0.17.3.
- [Release notes](https://github.com/image-rs/image-png/releases )
- [Changelog](https://github.com/image-rs/image-png/blob/master/CHANGES.md )
- [Commits](https://github.com/image-rs/image-png/commits )
---
updated-dependencies:
- dependency-name: png
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-02-13 18:43:46 +02:00
dependabot[bot]
c154b24393
build(deps): bump clap from 3.0.6 to 3.0.14
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.0.6 to 3.0.14.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v3.0.6...v3.0.14 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-02-13 18:10:29 +02:00
dependabot[bot]
036218ed01
build(deps): bump jpeg-decoder from 0.2.1 to 0.2.2
...
Bumps [jpeg-decoder](https://github.com/image-rs/jpeg-decoder ) from 0.2.1 to 0.2.2.
- [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/compare/v0.2.1...v0.2.2 )
---
updated-dependencies:
- dependency-name: jpeg-decoder
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-02-13 16:47:13 +02:00
dependabot[bot]
0ba9ed99c2
build(deps): bump enum-map from 2.0.0 to 2.0.1
...
Bumps [enum-map](https://gitlab.com/KonradBorowski/enum-map ) from 2.0.0 to 2.0.1.
- [Release notes](https://gitlab.com/KonradBorowski/enum-map/tags )
- [Changelog](https://gitlab.com/KonradBorowski/enum-map/blob/master/CHANGELOG.md )
- [Commits](https://gitlab.com/KonradBorowski/enum-map/commits/master )
---
updated-dependencies:
- dependency-name: enum-map
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-02-13 16:13:10 +02:00