Commit Graph

30 Commits

Author SHA1 Message Date
Adrian Wielgosik bc82a4f705 build: Bump Rust edition to 2021 2021-10-21 10:24:05 -07:00
dependabot[bot] c46e468c11 build(deps): bump lyon from 0.17.5 to 0.17.10
Bumps [lyon](https://github.com/nical/lyon) from 0.17.5 to 0.17.10.
- [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-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-18 13:42:13 -07:00
Mike Welsh 554aa7fd63 core: Add backend::render::BitmapSource trait
This interface handles returning a bitmap given an ID and is used
by the render backend to get the bitmap used for a bitmap fill.
This will allow for bitmap fills in the drawing API, as these will
manage their own list of bitmaps.
This also  removes the MovieLibrary dependency from render backends
and will allow for better decoupling in the future.
2021-06-13 20:03:53 -07:00
Mike Welsh d23ea90459 swf: Change Matrix to use Fixed16 for a, b, c, d
Matrices in an SWF file store their scale/skew components in
in 16.16 format (fbits).

Split `ruffle_core::Matrix` and `swf::Matrix`. `swf::Matrix` now
stores its data as `Fixed16` instead of immediately converting to
`f32`.
2021-06-08 14:57:15 -07:00
Mike Welsh 2b98c878f0 swf: Use Fixed in more places 2021-05-30 21:24:03 -07:00
relrelb c953462b6d common_tess: Toss out degenerate draws
This is a reland of bfe57a3c66.
2021-03-23 16:16:35 -07:00
relrelb 15c1cf5bf6 chore: Appease clippy 2021-03-23 16:16:35 -07:00
relrelb 648e14e057 render: Final cleanups 2021-03-23 16:16:35 -07:00
relrelb 627773d0d4 wgpu: Use common_tess
This eliminates tons of duplicate code.
2021-03-23 16:16:35 -07:00
relrelb 398aa98d38 common_tess: Extract swf_gradient_to_uniforms 2021-03-23 16:16:35 -07:00
relrelb e840dce803 common_tess: Make Vertex layout-agnostic
And define a specific layout in webgl instead.
This brings common_tess closer to serve wgpu (which has a different
Vertex layout).
2021-03-23 16:16:35 -07:00
Mike Welsh 60f29719d3 core: Fix stroke artifacts when using drawing API
Some recent changes with lyon's API could cause Ruffle to draw extra
strokes when it sees two Move commands in a row -- an extra zero-length
stroke would appear. Let's merge adjacent Move commands in the
tessellator to avoid this issue.

(TODO: Add an example to visual_tests).
2021-02-05 14:54:55 -08:00
dependabot-preview[bot] c98c8c5ced build(deps): bump lyon from 0.17.4 to 0.17.5
Bumps [lyon](https://github.com/nical/lyon) from 0.17.4 to 0.17.5.
- [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>
2021-01-30 16:28:18 -08:00
dependabot-preview[bot] ef428d95a7 build(deps): bump lyon from 0.17.3 to 0.17.4
Bumps [lyon](https://github.com/nical/lyon) from 0.17.3 to 0.17.4.
- [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>
2021-01-23 19:08:26 -08:00
dependabot-preview[bot] e4d7e73ef1 build(deps): bump lyon from 0.17.1 to 0.17.3
Bumps [lyon](https://github.com/nical/lyon) from 0.17.1 to 0.17.3.
- [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>
2021-01-14 03:04:25 -08:00
relrelb 9a8edda8a6 chore: Update lyon to 0.17.1 2021-01-04 18:08:14 -08:00
Mike Welsh 9b6295f33a render: Pass library to RenderBackend::register_shape (fix #2037)
Pass the movie library to `register_shape` methods so that bitmap
charcter IDs can be resolved immediately on the proper SWF.

This fixes #2037, which cause incorrect bitmaps to be used when
multiple movies were loaded.
2020-12-31 13:10:21 -08:00
Mike Welsh ad4714f3b3 render: Avoid assert from lyon with small miter limits 2020-11-20 00:29:23 -08:00
dependabot-preview[bot] b6f05ecf41 build(deps): bump lyon from 0.16.0 to 0.16.2
Bumps [lyon](https://github.com/nical/lyon) from 0.16.0 to 0.16.2.
- [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-09-29 05:25:14 -07:00
dependabot-preview[bot] d05a8af32b build(deps): bump lyon from 0.15.9 to 0.16.0
Bumps [lyon](https://github.com/nical/lyon) from 0.15.9 to 0.16.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)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-03 11:32:00 -07:00
dependabot-preview[bot] 31e816bf52 build(deps): bump lyon from 0.15.8 to 0.15.9
Bumps [lyon](https://github.com/nical/lyon) from 0.15.8 to 0.15.9.
- [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-07-05 13:51:54 -07:00
Mike Welsh 7d1b3f86f5 render: Filter out consecutive MoveTo drawing commands
lyon would emit a small line segment if a stroke path had
consective MoveTo commands. For the lyon backends, filter out
consecutive MoveTos and only emit the final MoveTo command.

This fixes a small dot appearing in text fields using underlines.
2020-06-24 14:09:10 -07:00
Nathan Adams df6764a69c chore: Add license metadata to all packages & crates 2020-05-27 00:11:02 -07:00
Mike Welsh 09ca11f788 webgl: Implement linear RGB gradients 2020-05-22 11:03:16 -07:00
Nathan Adams eda862c719 swf: Merged core::Matrix into swf::Matrix 2020-05-20 14:54:41 +02:00
Nathan Adams c787e28fcd render: Introduce a DistilledShape and use that instead of swf::Shape for the rendering API 2020-05-10 22:03:56 -07:00
Mike Welsh 23a42d4d8c webgl: Fix gradients
Tweak common_tess to return a more generic gradient type.
2020-05-02 10:38:55 -07:00
Mike Welsh 9583b51ddb webgl: Use u32 for vertex color 2020-05-02 10:38:20 -07:00
Mike Welsh fa5c09b0cd web: Add WebGL render backend 2020-05-02 10:38:18 -07:00
Mike Welsh 834756c167 render: Separate tesselation code into render/common_tess 2020-04-29 23:26:41 -07:00