bors-servo
d4ec17554b
Auto merge of #390 - pcwalton:docs-renderer, r=pcwalton
...
Add API docs for the renderer and associated types
2020-07-13 19:19:07 -04:00
Patrick Walton
3d9b5509ba
Add API docs for the renderer and associated types
2020-07-13 16:18:23 -07:00
bors-servo
7fceca9f97
Auto merge of #389 - pcwalton:gradient-wrap, r=pcwalton
...
Implement gradient wrap/spread modes in SVG.
Closes #386 .
2020-07-13 15:41:15 -04:00
Patrick Walton
2b69ff778f
Implement gradient wrap/spread modes in SVG.
...
Closes #386 .
2020-07-13 12:36:45 -07:00
bors-servo
0bf0f58fa4
Auto merge of #384 - s3bk:PR-pdf, r=pcwalton
...
PDF support for the demo
2020-07-07 17:59:27 -04:00
bors-servo
915f0aecc2
Auto merge of #359 - s3bk:PR5, r=pcwalton
...
Various Outline things
Outline:
- `merge` combine two outlines
- `transformed` variant of `transform` that takes `self`
- `mirror_and_close` to mirror a Contour on the line between its first and last point
- `with_capacity'
- `len`
- `from_rect_rounded`
Contour:
- `from_rect_rounded`: SVG style rect with rounded corners
- `push_svg_arc`: SVG arc
2020-07-07 15:30:09 -04:00
Sebastian K
dec6fa05f0
Merge branch 'master' of https://github.com/servo/pathfinder into PR-pdf
2020-07-07 22:13:57 +03:00
Sebastian K
bff7111310
remove remainds
2020-07-07 21:23:11 +03:00
Sebastian K
7815047329
merge
2020-07-07 21:17:24 +03:00
Sebastian K
c6a5f5f2fb
Merge branch 'master' of https://github.com/servo/pathfinder into PR5
2020-07-07 21:14:25 +03:00
Sebastian K
496556f873
remove mirror_and_close
2020-07-07 21:13:47 +03:00
Sebastian K
fa47d5a181
initial PDF support
2020-07-06 22:34:42 +03:00
bors-servo
b97c92ca8d
Auto merge of #387 - pcwalton:web-canvas, r=pcwalton
...
Flesh out the `web_canvas` crate a bit more
2020-07-06 14:13:04 -04:00
Patrick Walton
a49714e0ba
Flesh out the `web_canvas` crate a bit more
2020-07-06 11:01:38 -07:00
bors-servo
5cabc4a699
Auto merge of #385 - pcwalton:web-canvas, r=pcwalton
...
Start a new `web_canvas` crate, for usage in the browser as a `<canvas>` replacement
2020-07-04 12:36:24 -04:00
Patrick Walton
e54e0e4760
Start a new `web_canvas` crate, for usage in the browser as a `<canvas>` replacement
2020-07-04 09:33:49 -07:00
Sebastian K
3785fcf413
remove patch for s3bk/pathfinder
2020-07-04 17:18:30 +03:00
Sebastian K
8d866bc9c8
initial PDF support
2020-07-04 17:01:21 +03:00
bors-servo
e04f1b7950
Auto merge of #383 - pcwalton:webgl-fix, r=pcwalton
...
Fix WebGL, and add a simple example of WebGL usage
2020-07-02 22:51:53 -04:00
Patrick Walton
5f8fcbeac2
Fix WebGL, and add a simple example of WebGL usage
2020-07-02 19:49:09 -07:00
bors-servo
9b85b077f7
Auto merge of #382 - pcwalton:ssbo-cap, r=pcwalton
...
Combine the Z-buffer and fill indirect draw params buffers to reduce the number of SSBO bindings.
Apparently Mesa RadeonSI drivers have a limit of 8 SSBOs.
Closes #373 .
2020-07-02 14:59:46 -04:00
Patrick Walton
13ae83d6c5
Combine the Z-buffer and fill indirect draw params buffers to reduce the number
...
of SSBO bindings.
Apparently Mesa RadeonSI drivers have a limit of 8 SSBOs.
Closes #373 .
2020-07-02 11:57:45 -07:00
bors-servo
90eeebcae6
Auto merge of #380 - pcwalton:nested-clips, r=pcwalton
...
Implement nested SVG clip paths in the D3D11 backend.
Partially addresses #372 .
2020-07-01 21:40:26 -04:00
Patrick Walton
37c3c62762
Implement nested SVG clip paths in the D3D11 backend.
...
Partially addresses #372 .
2020-07-01 18:26:24 -07:00
bors-servo
a51176a3ba
Auto merge of #377 - NickSpag:feature/expose-embeddedresourceloader-to-c-api, r=pcwalton
...
Expose EmbeddedResourceLoader to c api
### Background
This PR exposes the c api to the EmbeddedResourceLoader, to prevent some of the issues mentioned [here](https://github.com/servo/pathfinder/issues/234 ).
### Approach
- Followed `PFFilesystemResourceLoaderLocate` and simply exposed the ERL's new and boxed it in the ResourceLoaderWrapper
- Used the `Create` terminology in the signature to match the rest of the api where a new() is called
### Notes
- I successfully tested it in a little .NET binding project I'm working on.
- Moved the \`gl\` section comment down with the GL methods, as it seemed a little out of place. added a \`resources\` one. then moved the destroy fn in to the new section.
Let me know if I misinterpreted anything or if there are any changes, stylistic or otherwise, that you'd prefer. Thanks!
2020-06-29 16:13:20 -04:00
bors-servo
c6e7ed0bfc
Auto merge of #378 - pcwalton:macos-fixes, r=pcwalton
...
Fix Metal memory management and the `canvas_metal_minimal`, `canvas_nanovg`, and `macos_app` examples.
`winit` does not create an autorelease pool, so the Metal backend had not taken
the presence of one into account. Now the Metal backend creates and flushes
autorelease pools as necessary.
Closes #334 .
Closes #376 .
2020-06-29 15:54:03 -04:00
Patrick Walton
42289eec6e
Fix Metal memory management and the `canvas_metal_minimal`, `canvas_nanovg`,
...
and `macos_app` examples.
`winit` does not create an autorelease pool, so the Metal backend had not taken
the presence of one into account. Now the Metal backend creates and flushes
autorelease pools as necessary.
Closes #334 .
Closes #376 .
2020-06-29 12:48:49 -07:00
Nick Spagnola
04787f1514
move destroy fn out of `gl`
2020-06-29 07:01:19 -07:00
Nick Spagnola
bd6d7eb489
cleanup comments
2020-06-29 07:00:28 -07:00
Nick Spagnola
43bc5a5829
expose EmbeddedResourceLoader to c api
2020-06-29 06:59:54 -07:00
bors-servo
ac405fb988
Auto merge of #370 - pcwalton:optional-timer-query, r=pcwalton
...
Turn off timer queries if the debug UI is off.
Closes #360 .
2020-06-25 14:07:22 -04:00
Patrick Walton
e16f0a045e
Turn off timer queries if the debug UI is off.
...
Closes #360 .
2020-06-25 11:06:17 -07:00
bors-servo
e21d79bf0f
Auto merge of #369 - pcwalton:nested-svg-fixup, r=pcwalton
...
Fix `Display` impl on `BuildResultFlags`
@bors-servo: r+
2020-06-25 11:37:03 -04:00
bors-servo
72a9deed9f
Auto merge of #368 - pcwalton:vector-additions, r=pcwalton
...
Add `recip`, `angle` and `angle_between` methods to `Vector2F`
2020-06-24 21:35:04 -04:00
Patrick Walton
6d11a8fc8f
Fix `Display` impl on `BuildResultFlags`
2020-06-24 18:00:12 -07:00
Sebastian K
7b244cad68
Add `recip`, `angle` and `angle_between` methods to `Vector2F`
2020-06-24 17:57:37 -07:00
bors-servo
495708dbf1
Auto merge of #367 - pcwalton:transformed, r=pcwalton
...
Add some new Outline methods
2020-06-24 20:52:50 -04:00
Sebastian K
9d86f663ed
Add a new `Outline::len()` method
2020-06-24 17:47:30 -07:00
Sebastian K
e5eee41b48
Micro-optimize `Contour::from_rect()`
2020-06-24 17:43:16 -07:00
Sebastian K
5eb346f77d
Add an `Outline::with_capacity()` method
2020-06-24 17:43:16 -07:00
Sebastian K
4dea6aa258
Add a `transformed()` method to `Outline` and `Contour`.
2020-06-24 17:43:14 -07:00
bors-servo
265e781efa
Auto merge of #365 - pcwalton:c-svg, r=pcwalton
...
Expose `pathfinder_svg` to the C API
Closes #357 .
2020-06-24 20:36:08 -04:00
Emmanuel Gil Peyrot
9e670287d0
Expose `pathfinder_svg` to the C API
2020-06-24 17:35:43 -07:00
Patrick Walton
3e64e29fb2
Rename `BuiltSVG` to `SVGScene`
2020-06-24 17:35:43 -07:00
bors-servo
981677976e
Auto merge of #366 - pcwalton:outline-merge, r=pcwalton
...
Add a function to merge two outlines
2020-06-24 20:12:23 -04:00
Sebastian K
3486d55565
Add a function to merge two outlines
2020-06-24 17:11:07 -07:00
bors-servo
89067a9ab7
Auto merge of #364 - pcwalton:c-api-gl4, r=pcwalton
...
Expose OpenGL 4.x in the C bindings
Closes #352 .
2020-06-24 14:48:21 -04:00
Patrick Walton
bc0b37c56a
Panic when invalid arguments are passed to the C API.
...
Closes #352 .
2020-06-24 11:45:47 -07:00
Patrick Walton
4877e0da57
Expose OpenGL 4.x in the C bindings
2020-06-24 11:34:28 -07:00
bors-servo
bf50e74396
Auto merge of #363 - pcwalton:cargo-c, r=pcwalton
...
Use `cargo-c`, and update the README.
Closes #343 .
2020-06-23 20:41:09 -04:00
Patrick Walton
db80dd8aaa
Use `cargo-c`, and update the README.
...
Closes #343 .
2020-06-23 17:37:59 -07:00
bors-servo
b3232265b4
Auto merge of #362 - pcwalton:nested-svg, r=pcwalton
...
`usvg` should never have nested `<svg>` nodes, so remove code that (doesn't) handle that case.
Closes #349 .
2020-06-23 18:24:55 -04:00
Patrick Walton
dc73e12473
`usvg` should never have nested `<svg>` nodes, so remove code that (doesn't)
...
handle that case.
Closes #349 .
2020-06-23 15:23:43 -07:00
Patrick Walton
3dc70e0111
Merge pull request #350 from pcwalton/gpu-tiling-dicing
...
Add a rendering path for Direct3D 11-class hardware that uses compute shader for most stages.
2020-06-23 14:58:38 -07:00
Patrick Walton
e3a966cc99
Update `Cargo.lock`
2020-06-23 13:31:53 -07:00
Patrick Walton
a2d87a6624
Update the C canvas example
2020-06-23 13:31:53 -07:00
Patrick Walton
9ff46b39cd
Update examples
2020-06-23 13:31:53 -07:00
Patrick Walton
423a91ea1a
Update the demo for the D3D11 backend
2020-06-23 13:15:59 -07:00
Patrick Walton
72cdef2c2a
Update the C backend
2020-06-23 13:15:59 -07:00
Patrick Walton
7a1db16340
Update the WebGL backend
2020-06-23 13:15:59 -07:00
Patrick Walton
769dae4a9c
Update various front-end libraries
2020-06-23 13:15:59 -07:00
Patrick Walton
13b2c91dde
Update the scene proxy
2020-06-23 13:15:59 -07:00
Patrick Walton
f92c631f97
Rework the tile builder for D3D11
2020-06-23 13:15:59 -07:00
Patrick Walton
17356311d6
Rework renderer options
2020-06-23 13:15:59 -07:00
Patrick Walton
7a996d330c
Update `pathfinder_renderer::{paint, scene}`
2020-06-23 13:15:59 -07:00
Patrick Walton
df15c855c4
Significantly rework the GPU renderer for the D3D11 backend
2020-06-23 13:15:59 -07:00
Patrick Walton
58a76f0f16
Update `gpu_data`
2020-06-23 13:15:59 -07:00
Patrick Walton
eabe1b239d
Update `pathfinder_content`
2020-06-23 13:15:59 -07:00
Patrick Walton
385272851a
Remove the separate `z_buffer` module
2020-06-23 13:15:59 -07:00
Patrick Walton
b8055c38c1
Update `pathfinder_geometry`
2020-06-23 13:15:59 -07:00
Patrick Walton
23c171fb6f
Refactor GPU a bit more
2020-06-23 13:15:59 -07:00
Patrick Walton
3bb4a47757
Remove old shaders
2020-06-23 13:15:59 -07:00
Patrick Walton
79326025af
Rework the blit shader
2020-06-23 13:15:59 -07:00
Patrick Walton
661da5e12b
Refactor GPU performance measurement
2020-06-23 13:15:59 -07:00
Patrick Walton
61833168e5
Update the debug UI
2020-06-23 13:15:59 -07:00
Patrick Walton
ff7c13c8fb
Add a new compute-based D3D11 backend
2020-06-23 13:10:06 -07:00
Patrick Walton
4091fe7ce1
Update the Metal backend
2020-06-23 13:10:06 -07:00
Patrick Walton
21a82ae049
Update the OpenGL backend
2020-06-23 13:10:06 -07:00
Patrick Walton
7771fd877d
Add a unified GPU allocator
2020-06-23 13:10:06 -07:00
Patrick Walton
754a44ae22
Rename the existing renderer to `d3d9` in preparation for the D3D11 branch
2020-06-23 13:10:05 -07:00
Sebastian K
6b6a3b324d
add Outline::{len, from_rect_rounded}
2020-06-17 09:04:27 +03:00
Sebastian K
29ef4229a9
Add inv, phi and angle_to to Vector2F
2020-06-17 08:59:17 +03:00
Sebastian K
d954cbd05c
add Contour::{from_rect_rounded, push_svg_arc}
2020-06-17 08:49:14 +03:00
Sebastian K
26e41b82ff
add Outline::with_capacity, Contour::transformed and a small fix
2020-06-17 08:49:07 +03:00
Sebastian K
7e05972549
add mirror_and_close path operator
2020-06-17 08:48:35 +03:00
Sebastian K
636d5da589
add Outline::transformed
2020-06-17 08:45:07 +03:00
Sebastian K
541ad28f64
add Outline::merge to combine two outlines
2020-06-17 08:44:52 +03:00
bors-servo
5e3fb5fed0
Auto merge of #356 - linkmauve:c-resources-path, r=pcwalton
...
Expose creating a resource loader from a path to C
This is useful when Pathfinder is shipped by a Linux distribution, and not with everything bundled.
2020-06-16 12:11:35 -04:00
bors-servo
22d5dbc26a
Auto merge of #353 - linkmauve:no-foreign-types, r=pcwalton
...
Only use foreign-types on macOS in the C API
Its only use is for `CoreAnimationLayerRef::from_ptr()` in `PFMetalDeviceCreate`, so this fixes a warning on other platforms.
The last time I tried to fix this warning I didn’t notice that it was actually used, and thus 2d2bc14e5c
broke the macOS build in #257 .
2020-06-16 11:54:58 -04:00
bors-servo
1b63996fef
Auto merge of #347 - as-cii:metal-manifest, r=pcwalton
...
Add missing Metal shader to resources/MANIFEST
This fixes an issue that caused `pathfinder_metal` to panic when [attempting to load shaders](0f35009215/metal/src/lib.rs (L854)
) using the embedded resource loader.
/cc: @nathansobo
2020-06-16 11:37:25 -04:00
Patrick Walton
a47c703518
Merge pull request #358 from windexlight/scalar-u32x2-fix
...
Implement BitAnd, BitOr, and Not for U32x2 in scalar version.
2020-06-16 08:37:02 -07:00
Sam Schanken
714421b3c6
Implement BitAnd, BitOr, and Not for U32x2 in scalar version.
2020-06-13 17:18:49 -07:00
Emmanuel Gil Peyrot
5e8c20e78c
Expose creating a resource loader from a path to C
2020-06-11 16:02:09 +02:00
Emmanuel Gil Peyrot
f2c0aba352
C API: Only use foreign-types on macOS
...
Its only use is for CoreAnimationLayerRef::from_ptr() in
PFMetalDeviceCreate, so this fixes a warning on other platforms.
The last time I tried to fix this warning I didn’t notice that it was
actually used, and thus 2d2bc14e5c
broke
the macOS build in #257 .
2020-06-05 17:12:35 +02:00
Antonio Scandurra
cc54fa6e03
Add missing Metal shader to resources/MANIFEST
...
Co-Authored-By: Nathan Sobo <nathansobo@gmail.com>
2020-05-28 16:11:23 +02:00
bors-servo
0f35009215
Auto merge of #342 - pcwalton:listener-lifetime, r=pcwalton
...
Don't restrict render command listeners to the static lifetime
2020-05-16 14:05:57 -04:00
bors-servo
523734d95e
Auto merge of #341 - pcwalton:new-tiling-simd, r=pcwalton
...
Use SIMD a bit more in the new tiling code.
2020-05-16 13:49:38 -04:00
Sebastian K
18d2b006ac
Don't restrict render command listeners to the static lifetime
2020-05-16 10:47:06 -07:00
Patrick Walton
13f9fdc96c
Use SIMD a bit more in the new tiling code.
2020-05-16 10:38:34 -07:00
bors-servo
28c4bc194d
Auto merge of #340 - pcwalton:new-tiling, r=pcwalton
...
Replace the tiling algorithm with the one from "Random Access Vector Graphics".
This is a significant improvement in CPU time, as well as an overall
simplification.
2020-05-15 22:38:27 -04:00