Patrick Walton
5efdf2a04a
Implement the missing pieces of `TextMetrics` for canvas.
...
This required a `font-kit` upgrade, and with it a `skribo` upgrade.
2020-04-14 15:01:30 -07:00
Patrick Walton
0399061a70
Bump versions of `pathfinder_simd` and `pathfinder_geometry`
2020-04-09 10:31:18 -07:00
Patrick Walton
895f73096e
Switch back to instanced drawing for tiles.
...
Improves tile build time by something around 2x in the NanoVG demo.
2020-04-08 17:16:54 -07:00
Patrick Walton
ae97ccea5a
Improve ergonomics of the canvas font interface, and use the right fonts in the
...
NanoVG demo.
2020-04-01 16:25:13 -07:00
Patrick Walton
f1d5906c9e
Switch to my branch of `skribo` for much better `fill_text()` performance
2020-03-30 21:30:14 -07:00
Patrick Walton
a1f0ae097a
Add thumbnail images to the NanoVG demo
2020-03-30 16:18:41 -07:00
Patrick Walton
9723fa441b
Update `image`, `glutin`, and `jni` crates.
...
From #277 .
2020-03-27 15:49:26 -07:00
Patrick Walton
55df287fec
Move radial gradients from the CPU to the GPU
2020-03-26 21:24:20 -07:00
Patrick Walton
0c93045f50
Replace the individual tile shaders with an ubershader
2020-03-25 21:59:51 -07:00
乌戈
22f9c3bf6e
Use instant crate to build for wasm32 target
2020-03-05 01:54:36 +08:00
Patrick Walton
f607b607b0
Composite render targets using tiles, taking the Z-buffer into account.
...
We can do more tile-based optimization, but this should be enough to ensure a
correct rendering.
This temporarily breaks subpixel AA, but it should be fixable by modifying
`blur.fs.glsl`.
Closes #271 .
2020-03-02 20:10:10 -08: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
Sebastian K
e2fbde820d
Implement a WebGL backend
...
Signed-off-by: Patrick Walton <pcwalton@mimiga.net>
2020-02-28 10:41:35 -08:00
Patrick Walton
d1c7da8bd2
Implement pattern repeating and image smoothing control
2020-02-26 14:56:05 -08:00
Patrick Walton
4933efb513
Add Lighten and Darken composite ops
2020-02-20 20:38:43 -08:00
Patrick Walton
16a2de88df
Rename "postprocessing" to "effects" and start initial work on composite ops
2020-02-20 14:22:07 -08:00
Patrick Walton
25f9346160
Add an incomplete port of the NanoVG example app
2020-02-19 11:00:03 -08:00
Patrick Walton
243f2cc9b2
Add basic, incomplete support for clip paths in SVG
2020-02-16 15:02:37 -08:00
Patrick Walton
90445bac7e
Implement basic support for non-repeating image patterns.
2020-02-11 17:20:21 -08:00
Patrick Walton
5a21557a6d
Implement basic linear gradients.
...
This is not a very efficient implementation yet, but it seems to work.
2020-02-10 16:01:05 -08:00
Emmanuel Gil Peyrot
124472cff1
Regenerate Cargo.lock with the latest changes
2020-02-06 09:39:58 +01:00
Emmanuel Gil Peyrot
cc6fe7864b
Add quickcheck build-dependency
...
quickcheck usage in pathfinder_content had been added in
b8f622203a
, but not to the Cargo.toml.
This makes tests pass again.
2020-02-05 14:35:20 +01:00
Patrick Walton
b269723254
Switch to per-pixel texture lookup for paints.
...
This is a prerequisite for supporting gradients and images.
2020-02-04 21:50:13 -08:00
Patrick Walton
2db43797c3
Split colors out into their own crate.
...
A lot of downstream consumers of `pathfinder_gpu` want to use colors without
the path stuff.
2020-01-31 09:17:04 +01:00
Patrick Walton
5ea86ccba8
Bump `pathfinder_geometry` and `pathfinder_simd` to version 0.4
2020-01-23 18:24:56 -08:00
Sebastian K
e38e2d800f
update usvg to 0.8
2019-12-28 11:46:31 +03:00
Patrick Walton
0662f6433f
Allow any texture format to be uploaded; fix Metal compilation on newer rustcs
2019-12-20 11:48:51 -08:00
Patrick Walton
7c655246ae
Add some more features to blending, and expand texture upload features
2019-12-19 08:58:02 -08:00
Patrick Walton
9124d9856a
Add some more methods to 3D vectors, and a `gluLookAt()` workalike
2019-12-18 15:19:42 -08:00
Kamal Ahmad
29713c5cd9
Bump lyon, font-kit and skribo versions to fix crashes
2019-11-20 22:51:03 +05:00
Patrick Walton
ff212dce36
Add 2D matrix uniform types and a couple more useful geometry methods
2019-11-10 10:28:20 -08:00
est31
ad143712a8
Remove redundant fixedbitset dependency
2019-08-30 20:24:09 +02:00
Patrick Walton
4cdded74b4
Fix SVG export in the demo; update `Cargo.lock`
2019-06-25 11:32:26 -07:00
Patrick Walton
9efe44640d
Update `Cargo.lock`
2019-06-24 12:05:59 -07:00
Patrick Walton
2c49a3360e
Add Metal support to the C API
2019-06-21 13:37:17 -07:00
Patrick Walton
1c34b12948
Add some font functions to the C API
2019-06-21 13:17:11 -07:00
Patrick Walton
9107f21966
wip
2019-06-21 10:40:32 -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
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
Patrick Walton
82b0826407
Merge remote-tracking branch 'hardiesoft/swf_renderer'
2019-06-21 09:25:00 -07:00
Patrick Walton
0012f09eeb
Fix examples
2019-06-20 21:43:57 -07:00
Patrick Walton
010bc66073
Upgrade `resvg` to 0.7
2019-06-20 17:13:15 -07:00
Patrick Walton
36db39883c
Add C bindings to the canvas text APIs
2019-06-20 16:07:38 -07:00
Jon Hardie
b1dc8a1ab7
Merge remote-tracking branch 'origin/swf_renderer' into swf_renderer
2019-06-21 11:00:49 +12:00
Patrick Walton
487577a11b
Add Metal support.
...
This commit substantially reworks the `pathfinder_gpu` API to better support
modern APIs like Metal. It should open the door to `gfx-rs`, `wgpu`, Vulkan,
and D3D12 backends relatively straightforwardly.
A new example, `canvas_metal_minimal`, has been added.
Note that the new Metal shaders require a patched version of `spirv-cross` to
build properly. An upstream patch is forthcoming.
2019-06-20 11:47:22 -07:00
jonathanhardie
b17d6c605a
Remove incorrect debug assertion
2019-06-19 11:25:26 +12:00
Patrick Walton
5dfe14ebc4
Add a minimal `glutin` example
2019-06-12 10:50:24 -07:00
Patrick Walton
bc713a5181
Remove the rustache dependency.
...
1/3 reduction in binary size for `canvas_minimal`.
Closes #158 .
2019-05-26 13:02:52 -07:00
Patrick Walton
e04cc273ee
Add enough C bindings to recreate `canvas_minimal` in C.
...
Closes #12 .
2019-05-25 20:21:38 -07:00
Bastien Orivel
349c1a9cd0
Update quickcheck to 0.8
...
This dedupes some dependencies
2019-05-24 19:22:23 +02:00
Patrick Walton
8c4f05ce39
Initial rudimentary Lottie parsing code
2019-05-23 18:03:09 -07:00
Patrick Walton
7518fa65c0
Update dependencies
2019-05-13 18:47:19 -07:00
Patrick Walton
89ca998fa8
Add a convenience method for creating a scene proxy with an empty scene.
...
This makes animation rendering loops a bit easier for users.
2019-05-13 18:29:57 -07:00
Patrick Walton
f24d93819b
Add arc building methods and switch the Moiré demo to use them.
...
Also, stop taking points by reference in many methods, for consistency.
2019-05-13 12:42:13 -07:00
Patrick Walton
639a8f39e8
Add Moiré demo
2019-05-11 11:53:50 -07:00
Patrick Walton
a078766dc6
Implement basic text rendering in canvas with `skribo` and `font-kit`.
...
Skribo currently writes some debugging info to standard output. A patch is
forthcoming to fix that.
2019-05-09 15:21:18 -07:00
Patrick Walton
9de7d95d33
Start a simple HTML canvas-like API, and add a minimal example to show how to
...
use it.
2019-05-03 14:15:38 -07:00
Patrick Walton
8606cd013e
Replace commented out printlns with proper debug statements
2019-04-29 16:43:24 -07:00
Patrick Walton
b85dc2f001
Add basic pinch zoom support on Android
2019-04-26 22:29:38 -07:00
Patrick Walton
6c31e1bc01
In VR mode, render one eye and then reproject to both eyes instead of rendering
...
twice.
This reduces both CPU and GPU time a lot in exchange for a small loss in
quality.
2019-04-26 17:22:54 -07:00
Alan Jeffrey
bc89d88222
Dead code elimination
2019-04-15 12:43:41 -04:00
Alan Jeffrey
4c1e532f7f
Regenerated Cargo.lock
2019-04-15 12:43:41 -04:00
Alan Jeffrey
685651c119
Wire up magicleap landscape demo cube faces to pathfinder demo
2019-04-15 12:43:41 -04:00
Patrick Walton
9e38da25e1
Remove the `TileObjectPrimitive` structure in favor of a flat list of
...
backdrops.
This reduces memory usage a bit and adds the infrastructure needed to support a
tile map.
2019-04-11 18:54:03 -07:00
Patrick Walton
3d4f8bd008
Pipeline between CPU and GPU at a more fine-grained level.
...
This makes us stop running one frame behind.
2019-04-09 17:06:43 -07:00
Patrick Walton
ae192ffee7
Add ARM SIMD
2019-03-28 19:26:47 -07:00
Patrick Walton
0458d9a7f2
Factor out bits of the postprocessing shader into includes
2019-03-18 21:40:10 -07:00
Patrick Walton
bb32777101
Initial work toward VR support
2019-03-14 14:42:22 -07:00
Patrick Walton
9c404dfdc1
Add an Android port
2019-03-12 13:55:26 -07:00
Patrick Walton
d1728dfe6d
Update the scalar SIMD fallback
2019-03-08 12:30:07 -08:00
Patrick Walton
a74c0abbec
Factor the SDL code out in preparation for other ports
2019-03-07 16:14:26 -08:00
Patrick Walton
40209b6fe8
Show a warning when unsupported SVG features are used
2019-03-06 18:25:08 -08:00
Patrick Walton
8dc3a84d09
Remove `tile-svg` and the serialization code.
...
They can be added later if needed, but for now they're just bitrotting.
2019-03-05 15:38:10 -08:00
Patrick Walton
33aa6f905d
Move UI event code and widgets to the `pathfinder_ui` crate
2019-03-05 15:36:07 -08:00
Patrick Walton
ad0691c146
Move the generic UI code in the renderer crate to a separate crate
2019-03-05 15:13:55 -08:00
Patrick Walton
f7a8b573ce
Move the GPU rendering code out of `pathfinder_gl`, since it's now no longer
...
OpenGL-specific
2019-03-05 14:46:18 -08:00
Patrick Walton
ae450b063e
WIP: Factor out GL code
2019-03-04 14:55:32 -08:00
Patrick Walton
64b480fe32
Some more work on the site
2019-03-01 14:58:02 -08:00
Patrick Walton
ac24b67300
Add a simple SVG-subset-to-Skia-code tool, for benchmarking
2019-02-25 15:06:33 -08:00
Patrick Walton
f6af769486
Add screenshot functionality.
2019-02-25 11:33:26 -08:00
Patrick Walton
fc62e9bc71
Subdivide offset curves to an error bound.
2019-02-20 18:27:27 -08:00
Patrick Walton
3a8478a048
Remove all Lyon dependencies.
...
We may want to re-merge at a later date, but for now all relevant algorithms
have been appropriately SIMD-ified.
2019-02-20 16:46:50 -08:00
Patrick Walton
d30743a69c
Begin refactoring the demo into a shared library and a platform-specific
...
entry point.
This will help the upcoming wasm port.
2019-02-15 18:21:46 -08:00
Patrick Walton
92421943fc
Open a file dialog when the user clicks on the open file
2019-02-08 21:08:03 -08:00
Patrick Walton
dbf880d011
Rename `demo3` to `demo`
2019-02-08 14:53:20 -08:00
Patrick Walton
fe410e066f
Add a SIMD rect type
2019-02-05 10:03:20 -08:00
Patrick Walton
0b0c913332
Split out SIMD into a separate crate
2019-02-01 11:48:10 -08:00
Patrick Walton
dd480feb52
Factor out the GL rendering code into a separate crate
2019-01-30 19:31:29 -08:00
Patrick Walton
b6432fa47d
Add basic timer query support.
...
Inaccurate on macOS.
2019-01-30 15:30:40 -08:00
Patrick Walton
d1ca5fe757
Use a much better technique for curve flattening
2019-01-28 20:36:06 -08:00
Patrick Walton
80db7155b8
wip
2019-01-25 17:07:37 -08:00
Patrick Walton
a4c2796883
Implement a third demo with native code, not working yet
2019-01-14 19:32:53 -08:00
Patrick Walton
821b54b8f4
Factor renderer and SVG code out into separate crates
2019-01-14 14:20:36 -08:00
Patrick Walton
f0353e07aa
Move outlines to the geometry crate
2019-01-14 10:59:48 -08:00
Patrick Walton
bbf193f00f
Remove simdeez
2019-01-12 17:13:58 -08:00
Patrick Walton
37e6e71251
Move the `Segment` type to the geometry crate
2019-01-11 15:50:09 -08:00
Patrick Walton
8ff3da8a68
Build outlines from segments; move SIMD points into `geometry`
2019-01-11 15:24:13 -08:00
Patrick Walton
3165a4a1b0
Remove old demo server; remove `SegmentFlags`
2019-01-10 20:43:03 -08:00
Patrick Walton
ffe9abba6b
Stop using Lyon's monotonic converter
2019-01-10 14:14:59 -08:00
Patrick Walton
adf49ab932
Rename `path-utils` to `geometry`
2019-01-10 10:01:21 -08:00