22
33# Vello API
44
5- ** Public API types **
5+ ** Experimental public API for Vello Renderers **
66
77[ ![ Latest published version.] ( https://img.shields.io/crates/v/vello_api.svg )] ( https://crates.io/crates/vello_api )
88[ ![ Documentation build status.] ( https://img.shields.io/docsrs/vello_api.svg )] ( https://docs.rs/vello_api )
1616
1717<!-- We use cargo-rdme to update the README with the contents of lib.rs.
1818To edit the following section, update it in lib.rs, then run:
19- cargo rdme --workspace-project=vello_api --heading-base-level=0
19+ cargo rdme --workspace-project=vello_api
2020Full documentation at https://github.com/orium/cargo-rdme -->
2121
2222<!-- Intra-doc links used in lib.rs should be evaluated here.
@@ -26,18 +26,21 @@ See https://linebender.org/blog/doc-include/ for related discussion. -->
2626
2727<!-- cargo-rdme start -->
2828
29- Vello API is the rendering API of the 2D renderers in the Vello project.
29+ Vello API is the ** experimental** rendering API of the 2D renderers in the Vello project.
30+
31+ Warning: Vello API is currently only released as a preview, and is not ready for usage beyond short-term experiments.
32+ We know of several design decisions which will change before its use can be recommended.
3033
3134There are currently two [ supported Vello renderers] ( #renderers ) , each with different tradeoffs.
3235This crate allows you to write the majority of your application logic to support either of those renderers.
3336These renderers are [ Vello CPU] ( todo ) and [ Vello Hybrid] ( todo ) .
3437
35- # Usage
38+ ## Usage
3639
3740TODO: Mention Renderer trait when it exists. Otherwise, this code isn't really usable yet.
3841TODO: This is a stub just to have an outline to push.
3942
40- # Renderers
43+ ## Renderers
4144
4245The Vello renderers which support this API are:
4346
@@ -65,7 +68,7 @@ Vello API guarantees identical rendering between renderers which implement it, b
6568This doesn't apply to renderer-specific features.
6669<!-- TODO: Is ^ true? -->
6770
68- # Abstraction Boundaries
71+ ## Abstraction Boundaries
6972
7073The abstractions in this crate are focused on 2D rendering, and the resources required to perform that.
7174In particular, this does not abstract over strategies for:
@@ -78,7 +81,7 @@ These functionalities are however catered for where applicable by APIs on the sp
7881The renderer API supports downcasting to the specific renderer, so that these extensions can be called.
7982Each supported renderer will/does have examples showing how to achieve this yourself.
8083
81- # Text
84+ ## Text
8285
8386Vello API does not handle text/glyph rendering itself.
8487This allows for improved resource sharing of intermediate text layout data, for hinting and ink splitting underlines.
@@ -88,15 +91,15 @@ Note that this crate is not currently implemented; design work is ongoing.
8891We also support rendering using using traditional glyph atlases, which may be preferred by some consumers.
8992This is especially useful to achieve subpixel rendering, such as ClearType, which Vello doesn't currently support directly.
9093
91- # Unimplemented Features
94+ ## Unimplemented Features
9295
9396NOTE: This section is not complete; in particular, we have only pushed a half-version of this API to make review more scoped.
9497
9598The current version of Vello API is a minimal viable product for exploration and later expansion.
9699As such, there are several features which we expect to be included in this API, but which are not yet exposed in this crate.
97100These are categorised as follows:
98101
99- ## Out of scope/Renderer specific
102+ ### Out of scope/Renderer specific
100103
101104<!-- This section can be removed once the other three classes are empty -->
102105As discussed above, some features are out-of-scope, as they have concerns which need to be handled individually by each renderer.
@@ -105,7 +108,7 @@ This includes:
105108- Rendering directly to a surface.
106109- Importing "external" textures (e.g. from a ` wgpu::Texture ` )
107110
108- ## Excluded for expedience
111+ ### Excluded for expedience
109112
110113- Renderer specific painting commands (i.e. using downcasting).
111114 This is intended to be an immediate follow-up to the MVP landing.
@@ -122,7 +125,7 @@ This includes:
122125- "Unsetting" the brush; this is mostly useful for append style operations, which may unexpectedly change the brush.
123126- Dynamic version of ` PaintScene ` , allowing ` dyn PaintScene ` for cases where that would be relevant.
124127
125- ## Not cross-renderer
128+ ### Not cross-renderer
126129
127130There are some features which are only implemented in one of our target renderers, so cannot yet be included in the generalised API.
128131As an interim solution, we intend to expose these features as renderer specific extensions (see the "excluded for expedience section").
@@ -136,7 +139,7 @@ For Vello CPU, these are (i.e. Vello Hybrid does not implement these):
136139
137140There are currently no such features the other way around (i.e. which only Vello Hybrid supports).
138141
139- ## Not implemented
142+ ### Not implemented
140143
141144- Path caching. This feature is intended to allow re-using paths efficiently, primarily for glyphs.
142145- Blurred rounded rectangle paints in custom shapes (e.g. to exclude the unblurred parts).
0 commit comments