Fix arm simd shuffling arguments
According to packed_simd docs, the syntax for simd_shuffle4()
is as follows:
"The indices must be in range [0, M * N) where M is the number of input
vectors (1 or 2)and N is the number of lanes of the input vectors. The
indices i in range [0, N) refer to the i-th element of vec0, while the
indices in range [N, 2*N) refer to the i - N-th element of vec1."
I did not find implementation or documentation for simd_shuffle4() but
I believe packed_simd implements exactly the same interface.
Plus, implementing this change has fixed font-kit glyph output on
an Apple M1 mac (64-bit arm).
Closes#450
According to packed_simd docs, the syntax for simd_shuffle4()
is as follows:
"The indices must be in range [0, M * N) where M is the number of input
vectors (1 or 2)and N is the number of lanes of the input vectors. The
indices i in range [0, N) refer to the i-th element of vec0, while the
indices in range [N, 2*N) refer to the i - N-th element of vec1."
I did not find implementation or documentation for simd_shuffle4() but
I believe packed_simd implements exactly the same interface.
Plus, implementing this change has fixed font-kit glyph output on
an Apple M1 mac (64-bit arm).
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.
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.
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.
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.
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.
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.
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
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.
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!
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.
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.