Skip to content

Sparse Strips v0.1.0

Choose a tag to compare

@LaurenzV LaurenzV released this 29 Jul 18:58
· 45 commits to main since this release
1b63b04

This release has an MSRV of 1.88.

Vello CPU

Vello CPU is our 2d renderer which doesn't use a GPU.
The imaging model exposed by Vello CPU is very similar to that of current Vello.
Crates.io | Docs

This implementation is now broadly usable, with a reasonably complete imaging model and competitive performance.
It does not however have any API stability guarantees, as we intend to redesign the API to be consistent across the Vello renderers.
Performance information can be seen at https://laurenzv.github.io/vello_chart/ (although note that this URL is not "time-locked", so might show results from a slightly newer or older version than this tag).

Added

  • RenderContext::reset_and_resize, allowing a render context to be reused after its target size changes. (#1705 by @LaurenzV)
  • RenderContext::is_multi_threaded for querying whether the context uses multi-threaded rendering. (#1703 by @LaurenzV)
  • Inverse blurred rounded rectangles through the new invert parameter on RenderContext::fill_blurred_rounded_rect, enabling inset box shadows. (#1715 by @nicoburns)
  • FilterPrimitive::DropShadowOnly for rendering a drop shadow without compositing the original input over it. (#1763 by @LaurenzV)

Changed

  • Breaking change: The methods render_to_pixmap and composite_to_pixmap_at_offset have been replaced with unified render and render_with methods, whose settings control the target, pixel format, compositing, and rendering mode. (#1665 by @LaurenzV)
  • The Vello CPU frontend and coarse rasterizer have been rewritten. As a result:
    • Filter layers always render correctly, even at viewport boundaries.
    • A number of issues with layer clipping have been fixed.
    • Performance improves by up to 10% across a variety of rendering workloads. (#1701 by @LaurenzV)

Fixed

  • Opaque image rendering when blend modes or masks are active. (#1697 by @LaurenzV)
  • Gaussian blur strength changing abruptly at decimation thresholds. (#1720 by @grebmeg)
  • Panics when resetting or dropping a multi-threaded render context while worker tasks are still in flight. (#1732, #1756 by @yezhizhen)

Optimized

  • x86 rendering, including blending and high-quality image sampling, through improved SIMD code generation. (#1688 by @LaurenzV)
  • Clip-path intersection by skipping rows outside the paths' shared vertical extent and locating the first relevant strip with binary search. (#1690, #1691 by @LaurenzV)
  • Radial-gradient evaluation and gradient lookup-table generation. (#1723, #1726 by @LaurenzV)
  • Rendering opaque peniko::ImageData by computing and retaining its transparency hint during conversion. (#1760 by @tronical)

Vello Hybrid

This release is a minor release of Vello Hybrid, which uses the CPU for preprocessing and the GPU for rasterization. The imaging model exposed by Vello Hybrid is very similar to that of current Vello.
Crates.io | Docs

This implementation is in its early stages and does not yet provide any API stability guarantees (see the roadmap for more details). It also doesn’t have feature parity with Vello CPU. A few known issues remain, which we plan to address soon.

Added

  • Inverse blurred rounded rectangles through the new invert parameter on Scene::fill_blurred_rounded_rect, enabling inset box shadows. (#1715 by @nicoburns)
  • Resources::new_with_config for configuring the image and glyph atlas used by resources. (#1750 by @grebmeg)
  • FilterPrimitive::DropShadowOnly for rendering a drop shadow without compositing the original input over it. (#1763 by @LaurenzV)
  • Scene::reset_and_resize, allowing a scene to be reused after its target size changes. (#1769 by @LaurenzV)

Changed

  • Breaking change: WebGlRenderer::probe is now asynchronous. It returns a WebGlPendingProbe, which can be polled with try_finish, avoiding a synchronous GPU-to-CPU readback stall and providing specific WebGL error codes on failure. (#1671, #1735 by @LaurenzV)
  • Breaking change: Vello Hybrid's core scene scheduling and rendering architecture has been rewritten, removing coarse rasterization. The rewrite improves layer performance, allows filter output beyond the root viewport, reduces memory use for filter-heavy scenes, and removes the need for scene constraints. (#1759 by @LaurenzV)
  • Breaking change: RenderSettings now contains MemorySettings, with separate image-atlas and intermediate-layer configuration. SceneConstraints and RenderError::SlotsExhausted have been removed, and LayersConfig allows applications to limit and tune intermediate textures. (#1759 by @LaurenzV)
  • WebGL APIs are now exported whenever the webgl feature is enabled, including on non-Wasm targets. (#1682 by @jesses-canva)
  • Relaxed the minimum versions of wasm-bindgen-related dependencies. (#1683 by @LaurenzV)

Fixed

  • Opaque image rendering when blend modes or masks are active. (#1697 by @LaurenzV)
  • Gaussian blur strength changing abruptly at decimation thresholds. (#1720 by @grebmeg)
  • Fast rectangle rendering at the maximum u16 coordinates. (#1666 by @dipeshbabu)
  • WebGL renderer resources are now deleted when dropped instead of relying on garbage collection, allowing renderers to be recreated safely after context loss. (#1674 by @LaurenzV)
  • WebGL probing after rendering filter layers no longer corrupts the renderer's atlas state. (#1734 by @LaurenzV)

Optimized

  • Image-atlas textures and intermediate filter/layer textures are allocated lazily, substantially reducing initial GPU memory use for scenes that do not use images, layers, or filters. (#1747, #1757, #1759 by @grebmeg, @LaurenzV)
  • Clip-path intersection by skipping rows outside the paths' shared vertical extent and locating the first relevant strip with binary search. (#1690, #1691 by @LaurenzV)
  • Gradient lookup-table generation. (#1726 by @LaurenzV)
  • Rendering opaque peniko::ImageData by computing and retaining its transparency hint during conversion. (#1760 by @tronical)

Vello Common

This release also contains Vello Common, a support crate used by Vello CPU and Vello Hybrid.
Crates.io | Docs

Vello Common itself does not currently have any stable API surface, as it is only an implementation detail of Vello CPU and Vello Hybrid.

Added

  • FilterPrimitive::DropShadowOnly for rendering a drop shadow without compositing the original input over it. (#1763 by @LaurenzV)
  • Support for inverse blurred rounded rectangles, enabling inset box shadows in the renderer crates. (#1715 by @nicoburns)

Changed

  • Breaking change: Filter bounds now distinguish the output expansion from the source expansion required to compute a filter. The bounds_expansion APIs have been replaced by filter_expansion and source_expansion. (#1701 by @LaurenzV)
  • Breaking change: Filter padding now uses the new PaddingU16 type, RectU16::intersect no longer produces inverted rectangles, and strip_bbox now returns Option<RectU16>. (#1751 by @LaurenzV)

Removed

  • Breaking change: The old coarse rasterizer and render graph, including the public coarse and render_graph modules. The rewritten CPU and hybrid renderers no longer use them. (#1762 by @LaurenzV)

Fixed

  • Opaque image rendering when blend modes or masks are active. (#1697 by @LaurenzV)
  • Gaussian blur strength changing abruptly at decimation thresholds. (#1720 by @grebmeg)
  • Fast rectangle rendering at the maximum u16 coordinates. (#1666 by @dipeshbabu)

Optimized

  • Clip-path intersection by skipping rows outside the paths' shared vertical extent and locating the first relevant strip with binary search. (#1690, #1691 by @LaurenzV)
  • Gradient lookup-table generation. (#1726 by @LaurenzV)
  • x86 rendering, including blending and high-quality image sampling, through improved SIMD code generation. (#1688 by @LaurenzV)
  • Rendering opaque peniko::ImageData by computing and retaining its transparency hint during conversion. (#1760 by @tronical)
  • Filter processing for drop shadows by tightening their source and output bounds. (#1768 by @LaurenzV)

Vello Sparse Shaders

This release also contains Vello Sparse Shaders, a support crate used by Vello Hybrid.
Crates.io | Docs

This crate does not currently have any stable API guarantees.

Full Changelog: sparse-strips-v0.0.9...sparse-strips-v0.1.0