Commit Graph

15 Commits

Author SHA1 Message Date
Felix Mattick cea5218dc7
Extremely minor fixes
Only doing this to remedy a very minor annoyance of mine. These are not major (or even very helpful) changes by any measure.

- Removes an unneeded `use` statement
- Fixes a [deprecated](https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html) use of `panic!`
2022-02-05 17:33:00 -06:00
Patrick Walton 9ff46b39cd Update examples 2020-06-23 13:31:53 -07:00
Corey Farwell e1ec307b3f Switch to the embedded loader for the examples. 2020-05-08 21:17:23 -04:00
Patrick Walton ac83f79d94 Add a compute shader path, optimize GPU memory management, and switch from SDL
to `surfman`.

This is a large commit; explanations of each change follow.

This adds an optional compute shader path, off by default, for rendering fills
to alpha masks. It usually does not improve performance at present, but it
provides a good baseline for further optimizations. Later improvements will
likely aim to avoid writes to the mask texture entirely. Supporting
infrastructure for compute shader has been added to `pathfinder_gpu` for the
OpenGL and Metal backends.

The Metal backend has been optimized to avoid unneccessary buffer allocations
and reflection. As part of this, argument buffers have been removed, as the
current SPIRV-Cross compiler no longer requires them.

The GPU renderer has been improved to avoid stalls. Now, separate buffers are
allocated for each fill batch and for each frame. This can be extended in the
future to allow for separate buffers for tile draw operations as well.

SDL usage has been removed in favor of the native Rust `surfman` and `winit`.
Because `surfman` allows for selection of the integrated GPU on multi-GPU
system, it is chosen by default. The demo supports a new
`--high-performance-gpu` option to opt into the discrete GPU.
2020-04-30 13:33:29 -07:00
Patrick Walton 794dd55038 Add some implicit conversions between scalars and vectors where appropriate 2020-04-01 17:20:32 -07:00
Patrick Walton 93f5fbc6d2 Add convenience constructors: `vec2f`, `vec2i`, `Vector2F::zero()`,
`Vector2I::zero()`
2020-03-31 11:29:21 -07:00
Patrick Walton 0f35d9c817 Add an embedded resource loader that places resources directly in the binary.
This is useful for WebGL and for downstream crates.io use.
2020-02-28 17:10:53 -08:00
Emmanuel Gil Peyrot 6ce416e77c Bump all outdated dependencies
I’m pleasantly surprised that none of these required any (visible) code
change, but tests pass so let’s go with that. :)
2020-02-06 09:39:50 +01:00
Emmanuel Gil Peyrot fb22aafada Update swf-related crates
swf-tree got renamed into swf-types for their 0.10 release.
2020-02-06 09:39:50 +01:00
Patrick Walton bcac119324 Rename `Transform2DF` to `Transform2F` and `Transform3DF` to `Transform4F` 2019-07-11 14:59:10 -07:00
Patrick Walton 431dcf3d2e Rename `pathfinder_geometry::basic` to simply `pathfinder_geometry`, and move
the remaining code in that crate to a new crate, `pathfinder_content`

The old hierarchy was confusing.
2019-06-21 10:06:19 -07:00
Patrick Walton b16300bf02 Move the SWF assets into `resources/`. 2019-06-21 09:32:48 -07:00
Patrick Walton 336f2ca302 Rename `pathfinder_flash` to `pathfinder_swf` for consistency with other crates
in the Rust Flash ecosystem
2019-06-21 09:28:15 -07:00
Jon Hardie 4d53ab60fc [WIP] Updating to master 2019-06-21 11:10:26 +12:00
Jon Hardie 5d698998e9 [WIP] Initial support for rendering graphic symbols from swf files. 2019-06-15 16:08:46 +12:00