Michael Tang
157332c667
Add note about line endings
2020-09-12 13:54:29 -07:00
Michael Tang
f8209946e3
Update documentation for building shaders
2020-09-12 13:49:28 -07:00
dependabot[bot]
9fe5cfd943
Bump http-proxy in /examples/canvas_webgl_minimal/www
...
Bumps [http-proxy](https://github.com/http-party/node-http-proxy ) from 1.18.0 to 1.18.1.
- [Release notes](https://github.com/http-party/node-http-proxy/releases )
- [Changelog](https://github.com/http-party/node-http-proxy/blob/master/CHANGELOG.md )
- [Commits](https://github.com/http-party/node-http-proxy/compare/1.18.0...1.18.1 )
Signed-off-by: dependabot[bot] <support@github.com>
2020-09-12 02:57:55 +00:00
Patrick Walton
badf37afcc
Merge pull request #438 from colorhook/master
...
bugfix #436 which endless loop in clip::clip_line_segment_to_rect method
2020-09-09 19:43:52 -07:00
liaojian
7a92724548
bugfix #436 which endless loop in clip::clip_line_segment_to_rect method
2020-08-30 01:18:50 +08:00
Patrick Walton
e858c8dc1d
Merge pull request #437 from s3bk/patch-1
...
add Copy, Clone… to FileFormat
2020-08-28 17:20:13 -07:00
Sebastian
82cccf356b
add Copy, Clone… to FileFormat
2020-08-28 23:32:02 +03:00
bors-servo
fed372229a
Auto merge of #406 - lu-zero:simpler-c-api-instructions, r=pcwalton
...
Simplify the cargo-c usage and generate the library as libpathfinder
2020-07-30 21:41:51 -04:00
bors-servo
2b5c6682d7
Auto merge of #427 - pcwalton:content-docs, r=pcwalton
...
Document the rest of `pathfinder_content`
2020-07-29 15:17:53 -04:00
Patrick Walton
4060baa80c
Document the rest of `pathfinder_content`
2020-07-29 12:17:16 -07:00
bors-servo
bad735e88d
Auto merge of #426 - pcwalton:text-baseline-c, r=pcwalton
...
Expose `CanvasRenderingContext2D::set_text_baseline()` to C.
Closes #425 .
2020-07-29 13:45:07 -04:00
Patrick Walton
c6151da254
Merge pull request #424 from BenGachowski/master
...
Add [defines] section to cbindgen.toml
2020-07-29 10:44:40 -07:00
Patrick Walton
9517fe8c63
Expose `CanvasRenderingContext2D::set_text_baseline()` to C.
...
Closes #425 .
2020-07-29 10:43:37 -07:00
Ben Gachowski
56b432b466
Replace PATHFINDER_MACOS with __APPLE__
2020-07-28 20:16:42 -04:00
bors-servo
9cda2747c4
Auto merge of #423 - pcwalton:put-image-data, r=pcwalton
...
Implement `putImageData()` on canvas.
Partially addresses #388 .
2020-07-28 20:08:17 -04:00
Ben Gachowski
3ff09fb43b
Add [defines] section to cbindgen.toml
2020-07-28 20:05:33 -04:00
Patrick Walton
0c1fda4abb
Implement `putImageData()` on canvas.
...
Partially addresses #388 .
2020-07-28 16:46:51 -07:00
bors-servo
e48b2759dd
Auto merge of #421 - pcwalton:canvas-nested-clip-paths, r=pcwalton
...
Allow clip paths to nest in the canvas API.
Closes #372 .
2020-07-28 17:30:23 -04:00
Patrick Walton
c8a6d8e1f7
Allow clip paths to nest in the canvas API.
...
Closes #372 .
2020-07-28 14:27:53 -07:00
bors-servo
37a328552e
Auto merge of #419 - pcwalton:tile-iteration-cap, r=pcwalton
...
Clip line segments before tiling them, and remove the cap on the number of iterations when tiling.
Closes #416 .
2020-07-28 15:58:36 -04:00
Patrick Walton
441051a8ac
Remove the cap on the number of iterations when tiling.
...
This could trigger spuriously for very long lines outside the view box. It
still indicates potential performance problem, but we shouldn't crash at least.
Closes #416 .
2020-07-28 12:56:40 -07:00
Patrick Walton
41ad372253
Clip line segments before tiling them.
...
This reduces pathological behavior from very large off-screen segments.
Part of #416 .
2020-07-28 12:56:05 -07:00
bors-servo
4c8699a5e2
Auto merge of #418 - pcwalton:resize-clear, r=pcwalton
...
Initialize resized mask textures to rgba(0, 0, 0, 0), not rgba(0, 0, 0, 1).
Partially addresses #405 .
2020-07-27 20:08:25 -04:00
Patrick Walton
31abe4bb52
Initialize resized mask textures to rgba(0, 0, 0, 0), not rgba(0, 0, 0, 1).
...
Partially addresses #405 .
2020-07-27 17:07:13 -07:00
bors-servo
073695749b
Auto merge of #417 - pcwalton:image-border, r=pcwalton
...
Add 1px of texture border around non-repeating image patterns.
Closes #401 .
2020-07-27 16:45:59 -04:00
Patrick Walton
444cae2b72
Add 1px of texture border around non-repeating image patterns.
...
Closes #401 .
2020-07-27 13:44:59 -07:00
bors-servo
a05270f0a7
Auto merge of #414 - pcwalton:radial-gradient-epsilon, r=pcwalton
...
Allow radial gradients to be evaluated with any nonzero discriminant, not just ones with magnitude above `EPSILON`.
Closes #399 .
2020-07-23 16:47:01 -04:00
Patrick Walton
0e82acda2b
Allow radial gradients to be evaluated with any nonzero discriminant, not just
...
ones with magnitude above `EPSILON`.
Closes #399 .
2020-07-23 13:45:20 -07:00
bors-servo
536cb4c093
Auto merge of #413 - pcwalton:s3bk-color-matrix, r=pcwalton
...
Add ColorMatrix filter
2020-07-23 15:47:57 -04:00
Sebastian K
dd0ac124d8
Add ColorMatrix filter
2020-07-23 12:46:59 -07:00
bors-servo
953a1dab60
Auto merge of #404 - leroycep:minimal-example-rerendering, r=pcwalton
...
Make `canvas_minimal` example rerender on refresh
I'm not sure if this actually works, because the `canvas_minimal` example doesn't run on my computer.
2020-07-23 14:18:55 -04:00
Patrick Walton
cd129e81f3
Merge pull request #407 from servo/dependabot/npm_and_yarn/examples/canvas_webgl_minimal/www/lodash-4.17.19
...
Bump lodash from 4.17.15 to 4.17.19 in /examples/canvas_webgl_minimal/www
2020-07-22 20:13:17 -07:00
LeRoyce Pearson
263dc0ab15
Make canvas minimal render on first loop
2020-07-22 12:28:36 -06:00
bors-servo
ca201ac0c8
Auto merge of #408 - pcwalton:font-metadata-caching, r=pcwalton
...
Make the fields of `TextMetrics` lazily calculated, and add an API that eliminates double layouts.
This adds an extension to the HTML canvas API that allows you to pass the
`TextMetrics` object returned by `measure_text()` to `fill_text()` and/or
`stroke_text()` to draw the measured text without laying it out again. It
improves performance on the `canvas_nanovg` demo.
2020-07-21 22:33:37 -04:00
Patrick Walton
d01bc5d002
Make the fields of `TextMetrics` lazily calculated, and add an API that
...
eliminates double layouts.
This adds an extension to the HTML canvas API that allows you to pass the
`TextMetrics` object returned by `measure_text()` to `fill_text()` and/or
`stroke_text()` to draw the measured text without laying it out again. It
improves performance on the `canvas_nanovg` demo.
2020-07-21 19:33:15 -07:00
dependabot[bot]
368418f61a
Bump lodash in /examples/canvas_webgl_minimal/www
...
Bumps [lodash](https://github.com/lodash/lodash ) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases )
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19 )
Signed-off-by: dependabot[bot] <support@github.com>
2020-07-21 10:03:01 +00:00
Luca Barbato
03017e9a23
Simplify the cargo-c usage and generate the library as libpathfinder
2020-07-20 18:22:15 +02:00
bors-servo
448ede2b1f
Auto merge of #402 - leroycep:text-example-rerendering, r=pcwalton
...
Make `canvas_text` example render on expose
Before this change, the `canvas_text` example would become blank after
navigating to another workspace or being put beneath another window.
This change will listen for the SDL window exposed event, and will
render then instead of only at the beginning.
2020-07-17 19:51:30 -04:00
LeRoyce Pearson
5951b32ede
Make `canvas_minimal` example rerender on refresh
2020-07-17 16:40:04 -06:00
LeRoyce Pearson
f0ee329c05
Make `canvas_text` example render on expose
...
Before this change, the `canvas_text` example would become blank after
navigating to another workspace or being put beneath another window.
This change will listen for the SDL window exposed event, and will
render then instead of only at the beginning.
2020-07-17 14:55:37 -06:00
bors-servo
e75b347c8d
Auto merge of #398 - pcwalton:gradient-fixes, r=pcwalton
...
Fix some reported gradient issues
2020-07-16 13:43:35 -04:00
Patrick Walton
1570c38217
Clamp to prevent overflow when interpolating between two gradient stops.
...
Closes #397 .
2020-07-16 10:37:31 -07:00
Patrick Walton
6a32f8c055
Stop clamping radial gradient t values to [0.0, 1.0].
...
Closes #393 .
2020-07-16 10:30:39 -07:00
bors-servo
38252f8314
Auto merge of #396 - pcwalton:docs-content, r=pcwalton
...
Document `pathfinder_content` more
2020-07-15 20:59:23 -04:00
Patrick Walton
c24fdf318d
Document `pathfinder_content` more
2020-07-15 17:58:44 -07:00
bors-servo
36c347afef
Auto merge of #395 - pcwalton:warnings, r=pcwalton
...
Fix warnings
2020-07-15 16:15:20 -04:00
Patrick Walton
94174b81c9
Fix warnings
2020-07-15 13:12:55 -07:00
bors-servo
83c725e3f1
Auto merge of #394 - pcwalton:image-caching, r=pcwalton
...
Cache images from frame to frame.
Images are cached for one frame; if they are not used the next frame, they're
freed.
2020-07-15 15:37:24 -04:00
Patrick Walton
bb89f52d39
Cache images from frame to frame.
...
Images are cached for one frame; if they are not used the next frame, they're
freed.
2020-07-15 12:36:52 -07:00
bors-servo
f62f85354f
Auto merge of #392 - pcwalton:docs-outline, r=pcwalton
...
Document the `pathfinder_content::outline` module
2020-07-14 15:08:45 -04:00
Patrick Walton
e2e3ec7e21
Document the `pathfinder_content::outline` module
2020-07-14 12:08:00 -07:00
bors-servo
19bdbfa737
Auto merge of #391 - pcwalton:docs-renderer-2, r=pcwalton
...
Document the remainder of the `pathfinder_renderer` API
2020-07-13 22:24:58 -04:00
Patrick Walton
26bf6cce4e
Document the remainder of the `pathfinder_renderer` API
2020-07-13 19:24:32 -07:00
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