├── .cargo └── config.toml ├── .clippy.toml ├── .gitattributes ├── .github ├── copyright.sh └── workflows │ ├── ci.yml │ └── web-demo.yml ├── .gitignore ├── .taplo.toml ├── .typos.toml ├── .vscode └── settings.json ├── AUTHORS ├── CHANGELOG.md ├── Cargo.lock ├── Cargo.toml ├── LICENSE-APACHE ├── LICENSE-MIT ├── README.md ├── doc ├── ARCHITECTURE.md ├── blogs.md ├── images │ └── piet-gpu-diagram.jpg ├── pathseg.md ├── roadmap_2023.md └── vision.md ├── examples ├── assets │ ├── Ghostscript_Tiger.svg │ ├── colr_test_glyphs │ │ ├── LICENSE.txt │ │ ├── README.md │ │ └── test_glyphs-glyf_colr_1.ttf │ ├── downloads │ │ └── .tracked │ ├── inconsolata │ │ ├── Inconsolata.ttf │ │ └── LICENSE.txt │ ├── noto_color_emoji │ │ ├── LICENSE.txt │ │ ├── NotoColorEmoji-CBTF-Subset.ttf │ │ ├── NotoColorEmoji-Subset.ttf │ │ └── README.md │ ├── roboto │ │ ├── LICENSE.txt │ │ └── Roboto-Regular.ttf │ └── splash-flower.jpg ├── headless │ ├── Cargo.toml │ ├── outputs │ │ └── .tracked │ └── src │ │ └── main.rs ├── run_wasm │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── scenes │ ├── Cargo.toml │ └── src │ │ ├── images.rs │ │ ├── lib.rs │ │ ├── mmark.rs │ │ ├── pico_svg.rs │ │ ├── simple_text.rs │ │ ├── svg.rs │ │ └── test_scenes.rs ├── simple │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── simple_sdl2 │ ├── Cargo.toml │ └── src │ │ └── main.rs └── with_winit │ ├── Cargo.toml │ ├── README.md │ └── src │ ├── hot_reload.rs │ ├── lib.rs │ ├── main.rs │ ├── minimal_pipeline_cache.rs │ ├── multi_touch.rs │ └── stats.rs ├── image_filters ├── README.md └── vello_filters_cpu │ ├── Cargo.toml │ ├── LICENSE-APACHE │ ├── LICENSE-MIT │ └── src │ └── lib.rs ├── rustfmt.toml ├── sparse_strips ├── README.md ├── vello_api │ ├── Cargo.toml │ ├── LICENSE-APACHE │ ├── LICENSE-MIT │ ├── README.md │ └── src │ │ └── lib.rs ├── vello_bench │ ├── Cargo.toml │ ├── README.md │ ├── benches │ │ └── main.rs │ ├── data │ │ └── .gitignore │ └── src │ │ ├── data.rs │ │ ├── fine │ │ ├── blend.rs │ │ ├── fill.rs │ │ ├── gradient.rs │ │ ├── image.rs │ │ ├── mod.rs │ │ ├── rounded_blurred_rect.rs │ │ └── strip.rs │ │ ├── lib.rs │ │ ├── strip.rs │ │ └── tile.rs ├── vello_common │ ├── Cargo.toml │ ├── LICENSE-APACHE │ ├── LICENSE-MIT │ ├── README.md │ └── src │ │ ├── blurred_rounded_rect.rs │ │ ├── coarse.rs │ │ ├── colr.rs │ │ ├── encode.rs │ │ ├── execute.rs │ │ ├── flatten.rs │ │ ├── glyph.rs │ │ ├── lib.rs │ │ ├── mask.rs │ │ ├── math.rs │ │ ├── paint.rs │ │ ├── pico_svg.rs │ │ ├── pixmap.rs │ │ ├── strip.rs │ │ └── tile.rs ├── vello_cpu │ ├── Cargo.toml │ ├── LICENSE-APACHE │ ├── LICENSE-MIT │ ├── README.md │ └── src │ │ ├── fine │ │ ├── blend.rs │ │ ├── gradient.rs │ │ ├── image.rs │ │ ├── mod.rs │ │ └── rounded_blurred_rect.rs │ │ ├── lib.rs │ │ ├── render.rs │ │ └── util.rs ├── vello_dev_macros │ ├── Cargo.toml │ └── src │ │ ├── bench.rs │ │ ├── lib.rs │ │ └── test.rs ├── vello_hybrid │ ├── Cargo.toml │ ├── LICENSE-APACHE │ ├── LICENSE-MIT │ ├── README.md │ ├── examples │ │ ├── native_webgl │ │ │ ├── Cargo.toml │ │ │ ├── README.md │ │ │ ├── src │ │ │ │ ├── lib.rs │ │ │ │ └── main.rs │ │ │ └── tests │ │ │ │ └── webgl.rs │ │ ├── render_to_file.rs │ │ ├── scenes │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── clip.rs │ │ │ │ ├── lib.rs │ │ │ │ ├── simple.rs │ │ │ │ ├── svg.rs │ │ │ │ └── text.rs │ │ ├── wgpu_webgl │ │ │ ├── Cargo.toml │ │ │ ├── README.md │ │ │ ├── src │ │ │ │ ├── lib.rs │ │ │ │ └── main.rs │ │ │ └── tests │ │ │ │ └── webgl.rs │ │ └── winit │ │ │ ├── Cargo.toml │ │ │ ├── README.md │ │ │ └── src │ │ │ ├── main.rs │ │ │ └── render_context.rs │ └── src │ │ ├── lib.rs │ │ ├── render │ │ ├── common.rs │ │ ├── mod.rs │ │ ├── webgl.rs │ │ └── wgpu.rs │ │ ├── scene.rs │ │ ├── schedule.rs │ │ └── util.rs ├── vello_sparse_shaders │ ├── Cargo.toml │ ├── LICENSE-APACHE │ ├── LICENSE-MIT │ ├── README.md │ ├── build.rs │ ├── shaders │ │ ├── clear_slots.wgsl │ │ └── render_strips.wgsl │ └── src │ │ ├── compile.rs │ │ ├── lib.rs │ │ └── types.rs ├── vello_sparse_tests │ ├── .gitignore │ ├── Cargo.toml │ ├── README.md │ ├── snapshots │ │ ├── bevel_stroked_rect.png │ │ ├── blurred_rounded_rect_large_std_dev.png │ │ ├── blurred_rounded_rect_medium_std_dev.png │ │ ├── blurred_rounded_rect_none.png │ │ ├── blurred_rounded_rect_small_std_dev.png │ │ ├── blurred_rounded_rect_with_large_radius.png │ │ ├── blurred_rounded_rect_with_radius.png │ │ ├── blurred_rounded_rect_with_transform.png │ │ ├── clip_deeply_nested_circles.png │ │ ├── clip_rectangle_and_circle.png │ │ ├── clip_rectangle_with_star_evenodd.png │ │ ├── clip_rectangle_with_star_nonzero.png │ │ ├── clip_single_wide_tile.png │ │ ├── clip_transformed_rect.png │ │ ├── clip_triangle_with_star.png │ │ ├── clip_with_multiple_transforms.png │ │ ├── clip_with_opacity.png │ │ ├── clip_with_rotate.png │ │ ├── clip_with_save_restore.png │ │ ├── clip_with_scale.png │ │ ├── clip_with_translation.png │ │ ├── compose_clear.png │ │ ├── compose_copy.png │ │ ├── compose_dest.png │ │ ├── compose_dest_atop.png │ │ ├── compose_dest_in.png │ │ ├── compose_dest_out.png │ │ ├── compose_dest_over.png │ │ ├── compose_plus.png │ │ ├── compose_src_atop.png │ │ ├── compose_src_in.png │ │ ├── compose_src_out.png │ │ ├── compose_src_over.png │ │ ├── compose_xor.png │ │ ├── eo_filling_missing_anti_aliasing.png │ │ ├── fill_command_respects_clip_bounds.png │ │ ├── filled_aligned_rect.png │ │ ├── filled_circle.png │ │ ├── filled_circle_with_opacity.png │ │ ├── filled_fully_overflowing_circle.png │ │ ├── filled_overflowing_circle.png │ │ ├── filled_overlapping_circles.png │ │ ├── filled_transformed_rect_1.png │ │ ├── filled_transformed_rect_2.png │ │ ├── filled_transformed_rect_3.png │ │ ├── filled_transformed_rect_4.png │ │ ├── filled_triangle.png │ │ ├── filled_unaligned_rect.png │ │ ├── filled_vertical_hairline_rect.png │ │ ├── filled_vertical_hairline_rect_2.png │ │ ├── filling_evenodd_rule.png │ │ ├── filling_nonzero_rule.png │ │ ├── filling_unclosed_path_1.png │ │ ├── filling_unclosed_path_2.png │ │ ├── full_cover_1.png │ │ ├── glyphs_bitmap_apple.png │ │ ├── glyphs_bitmap_noto.png │ │ ├── glyphs_colr_noto.png │ │ ├── glyphs_colr_test_glyphs.png │ │ ├── glyphs_filled.png │ │ ├── glyphs_filled_unhinted.png │ │ ├── glyphs_glyph_transform.png │ │ ├── glyphs_glyph_transform_unhinted.png │ │ ├── glyphs_scaled.png │ │ ├── glyphs_scaled_unhinted.png │ │ ├── glyphs_skewed.png │ │ ├── glyphs_skewed_long.png │ │ ├── glyphs_skewed_long_unhinted.png │ │ ├── glyphs_skewed_unhinted.png │ │ ├── glyphs_skewed_unskewed.png │ │ ├── glyphs_skewed_unskewed_unhinted.png │ │ ├── glyphs_small.png │ │ ├── glyphs_small_unhinted.png │ │ ├── glyphs_stroked.png │ │ ├── glyphs_stroked_unhinted.png │ │ ├── gradient_linear_2_stops.png │ │ ├── gradient_linear_2_stops_with_alpha.png │ │ ├── gradient_linear_4_stops.png │ │ ├── gradient_linear_complex_shape.png │ │ ├── gradient_linear_negative_direction.png │ │ ├── gradient_linear_spread_method_pad.png │ │ ├── gradient_linear_spread_method_reflect.png │ │ ├── gradient_linear_spread_method_repeat.png │ │ ├── gradient_linear_vertical.png │ │ ├── gradient_linear_with_downward_y.png │ │ ├── gradient_linear_with_transform_identity.png │ │ ├── gradient_linear_with_transform_negative_scale.png │ │ ├── gradient_linear_with_transform_rotate_1.png │ │ ├── gradient_linear_with_transform_rotate_2.png │ │ ├── gradient_linear_with_transform_scale.png │ │ ├── gradient_linear_with_transform_scale_and_translate.png │ │ ├── gradient_linear_with_transform_scaling_non_uniform.png │ │ ├── gradient_linear_with_transform_skew_x_1.png │ │ ├── gradient_linear_with_transform_skew_x_2.png │ │ ├── gradient_linear_with_transform_skew_y_1.png │ │ ├── gradient_linear_with_transform_skew_y_2.png │ │ ├── gradient_linear_with_transform_translate.png │ │ ├── gradient_linear_with_upward_y.png │ │ ├── gradient_linear_with_y_reflect.png │ │ ├── gradient_linear_with_y_repeat.png │ │ ├── gradient_on_3_wide_tiles.png │ │ ├── gradient_radial_2_stops.png │ │ ├── gradient_radial_2_stops_with_alpha.png │ │ ├── gradient_radial_4_stops.png │ │ ├── gradient_radial_c0_bigger.png │ │ ├── gradient_radial_center_offset_bottom_left.png │ │ ├── gradient_radial_center_offset_bottom_right.png │ │ ├── gradient_radial_center_offset_top_left.png │ │ ├── gradient_radial_center_offset_top_right.png │ │ ├── gradient_radial_complex_shape.png │ │ ├── gradient_radial_focal_on_circle.png │ │ ├── gradient_radial_natively_focal.png │ │ ├── gradient_radial_non_overlapping_c0_larger.png │ │ ├── gradient_radial_non_overlapping_c0_smaller.png │ │ ├── gradient_radial_non_overlapping_cone.png │ │ ├── gradient_radial_non_overlapping_same_size.png │ │ ├── gradient_radial_spread_method_pad.png │ │ ├── gradient_radial_spread_method_reflect.png │ │ ├── gradient_radial_spread_method_repeat.png │ │ ├── gradient_radial_swapped.png │ │ ├── gradient_radial_with_transform_identity.png │ │ ├── gradient_radial_with_transform_negative_scale.png │ │ ├── gradient_radial_with_transform_rotate_1.png │ │ ├── gradient_radial_with_transform_rotate_2.png │ │ ├── gradient_radial_with_transform_scale.png │ │ ├── gradient_radial_with_transform_scale_and_translate.png │ │ ├── gradient_radial_with_transform_scale_non_uniform.png │ │ ├── gradient_radial_with_transform_skew_x_1.png │ │ ├── gradient_radial_with_transform_skew_x_2.png │ │ ├── gradient_radial_with_transform_skew_y_1.png │ │ ├── gradient_radial_with_transform_skew_y_2.png │ │ ├── gradient_radial_with_transform_translate.png │ │ ├── gradient_sweep_2_stops.png │ │ ├── gradient_sweep_2_stops_with_alpha.png │ │ ├── gradient_sweep_4_stops.png │ │ ├── gradient_sweep_complex_shape.png │ │ ├── gradient_sweep_not_in_center.png │ │ ├── gradient_sweep_spread_method_pad.png │ │ ├── gradient_sweep_spread_method_reflect.png │ │ ├── gradient_sweep_spread_method_repeat.png │ │ ├── gradient_sweep_with_transform_identity.png │ │ ├── gradient_sweep_with_transform_negative_scale.png │ │ ├── gradient_sweep_with_transform_rotate_1.png │ │ ├── gradient_sweep_with_transform_rotate_2.png │ │ ├── gradient_sweep_with_transform_scale.png │ │ ├── gradient_sweep_with_transform_scale_and_translate.png │ │ ├── gradient_sweep_with_transform_scale_non_uniform.png │ │ ├── gradient_sweep_with_transform_skew_x_1.png │ │ ├── gradient_sweep_with_transform_skew_x_2.png │ │ ├── gradient_sweep_with_transform_skew_y_1.png │ │ ├── gradient_sweep_with_transform_skew_y_2.png │ │ ├── gradient_sweep_with_transform_translate.png │ │ ├── gradient_with_color_spaces_1.png │ │ ├── gradient_with_color_spaces_2.png │ │ ├── gradient_with_color_spaces_3.png │ │ ├── gradient_with_global_alpha.png │ │ ├── image_bicubic_10x_scale.png │ │ ├── image_bicubic_10x_scale_2.png │ │ ├── image_bicubic_2x_scale.png │ │ ├── image_bicubic_5x_scale.png │ │ ├── image_bicubic_identity.png │ │ ├── image_bicubic_with_rotation.png │ │ ├── image_bicubic_with_translation.png │ │ ├── image_bilinear_10x_scale.png │ │ ├── image_bilinear_10x_scale_2.png │ │ ├── image_bilinear_2x_scale.png │ │ ├── image_bilinear_5x_scale.png │ │ ├── image_bilinear_identity.png │ │ ├── image_bilinear_with_rotation.png │ │ ├── image_bilinear_with_translation.png │ │ ├── image_complex_shape.png │ │ ├── image_global_alpha.png │ │ ├── image_luma_image.png │ │ ├── image_lumaa_image.png │ │ ├── image_pad_x_pad_y.png │ │ ├── image_pad_x_repeat_y.png │ │ ├── image_reflect_x_pad_y.png │ │ ├── image_reflect_x_reflect_y.png │ │ ├── image_repeat_x_repeat_y.png │ │ ├── image_rgb_image.png │ │ ├── image_rgba_image.png │ │ ├── image_with_transform_identity.png │ │ ├── image_with_transform_negative_scale.png │ │ ├── image_with_transform_rotate_1.png │ │ ├── image_with_transform_rotate_2.png │ │ ├── image_with_transform_scale.png │ │ ├── image_with_transform_scale_and_translate.png │ │ ├── image_with_transform_scaling_non_uniform.png │ │ ├── image_with_transform_skew_x_1.png │ │ ├── image_with_transform_skew_x_2.png │ │ ├── image_with_transform_skew_y_1.png │ │ ├── image_with_transform_skew_y_2.png │ │ ├── image_with_transform_translate.png │ │ ├── incorrect_filling_1.png │ │ ├── incorrect_filling_2.png │ │ ├── incorrect_filling_3.png │ │ ├── incorrect_filling_4.png │ │ ├── incorrect_filling_5.png │ │ ├── incorrect_filling_6.png │ │ ├── incorrect_filling_7.png │ │ ├── incorrect_filling_8.png │ │ ├── layer_multiple_properties_1.png │ │ ├── mask_alpha.png │ │ ├── mask_luminance.png │ │ ├── mix_color.png │ │ ├── mix_color_burn.png │ │ ├── mix_color_dodge.png │ │ ├── mix_color_with_solid.png │ │ ├── mix_darken.png │ │ ├── mix_difference.png │ │ ├── mix_exclusion.png │ │ ├── mix_hard_light.png │ │ ├── mix_hue.png │ │ ├── mix_lighten.png │ │ ├── mix_luminosity.png │ │ ├── mix_multiply.png │ │ ├── mix_normal.png │ │ ├── mix_overlay.png │ │ ├── mix_saturation.png │ │ ├── mix_saturation_with_solid.png │ │ ├── mix_screen.png │ │ ├── mix_soft_light.png │ │ ├── mix_with_transparent_bg.png │ │ ├── nested_clip_path_panic_2.png │ │ ├── opacity_nested_on_layer.png │ │ ├── opacity_on_layer.png │ │ ├── overflowing_stroked_rect.png │ │ ├── oversized_star.png │ │ ├── rectangle_above_viewport.png │ │ ├── rectangle_left_of_viewport.png │ │ ├── round_stroked_rect.png │ │ ├── strip_inscribed_rect.png │ │ ├── stroked_aligned_rect.png │ │ ├── stroked_circle.png │ │ ├── stroked_transformed_rect_1.png │ │ ├── stroked_transformed_rect_2.png │ │ ├── stroked_transformed_rect_3.png │ │ ├── stroked_transformed_rect_4.png │ │ ├── stroked_triangle.png │ │ ├── stroked_unaligned_rect.png │ │ ├── stroked_unaligned_rect_as_path.png │ │ ├── transparent_paint.png │ │ ├── triangle_above_and_wider_than_viewport.png │ │ ├── triangle_exceeding_viewport_1.png │ │ └── triangle_exceeding_viewport_2.png │ └── tests │ │ ├── assets │ │ ├── cowboy.png │ │ ├── luma_image_10x10.png │ │ ├── lumaa_image_10x10.png │ │ ├── rgb_image_10x10.png │ │ ├── rgb_image_2x2.png │ │ ├── rgb_image_2x3.png │ │ └── rgba_image_10x10.png │ │ ├── basic.rs │ │ ├── blurred_rounded_rect.rs │ │ ├── clip.rs │ │ ├── compose.rs │ │ ├── glyph.rs │ │ ├── gradient.rs │ │ ├── image.rs │ │ ├── issues.rs │ │ ├── layer.rs │ │ ├── mask.rs │ │ ├── mix.rs │ │ ├── mod.rs │ │ ├── opacity.rs │ │ ├── renderer.rs │ │ └── util.rs └── vello_toy │ ├── Cargo.toml │ └── src │ └── debug.rs ├── vello ├── Cargo.toml ├── LICENSE-APACHE ├── LICENSE-MIT ├── README.md └── src │ ├── debug.rs │ ├── debug │ ├── renderer.rs │ └── validate.rs │ ├── lib.rs │ ├── recording.rs │ ├── render.rs │ ├── scene.rs │ ├── shaders.rs │ ├── util.rs │ └── wgpu_engine.rs ├── vello_encoding ├── Cargo.toml ├── LICENSE-APACHE ├── LICENSE-MIT ├── README.md └── src │ ├── binning.rs │ ├── clip.rs │ ├── config.rs │ ├── draw.rs │ ├── encoding.rs │ ├── estimate.rs │ ├── glyph.rs │ ├── glyph_cache.rs │ ├── image_cache.rs │ ├── lib.rs │ ├── mask.rs │ ├── math.rs │ ├── monoid.rs │ ├── path.rs │ ├── ramp_cache.rs │ └── resolve.rs ├── vello_shaders ├── Cargo.toml ├── LICENSE-APACHE ├── LICENSE-MIT ├── README.md ├── build.rs ├── shader │ ├── UNLICENSE │ ├── backdrop.wgsl │ ├── backdrop_dyn.wgsl │ ├── bbox_clear.wgsl │ ├── binning.wgsl │ ├── clip_leaf.wgsl │ ├── clip_reduce.wgsl │ ├── coarse.wgsl │ ├── draw_leaf.wgsl │ ├── draw_reduce.wgsl │ ├── fine.wgsl │ ├── flatten.wgsl │ ├── path_count.wgsl │ ├── path_count_setup.wgsl │ ├── path_tiling.wgsl │ ├── path_tiling_setup.wgsl │ ├── pathtag_reduce.wgsl │ ├── pathtag_reduce2.wgsl │ ├── pathtag_scan.wgsl │ ├── pathtag_scan1.wgsl │ ├── permutations │ ├── shared │ │ ├── bbox.wgsl │ │ ├── blend.wgsl │ │ ├── bump.wgsl │ │ ├── clip.wgsl │ │ ├── config.wgsl │ │ ├── cubic.wgsl │ │ ├── drawtag.wgsl │ │ ├── pathtag.wgsl │ │ ├── ptcl.wgsl │ │ ├── segment.wgsl │ │ ├── tile.wgsl │ │ ├── transform.wgsl │ │ └── util.wgsl │ └── tile_alloc.wgsl └── src │ ├── compile │ ├── mod.rs │ ├── msl.rs │ ├── permutations.rs │ └── preprocess.rs │ ├── cpu.rs │ ├── cpu │ ├── backdrop.rs │ ├── bbox_clear.rs │ ├── binning.rs │ ├── clip_leaf.rs │ ├── clip_reduce.rs │ ├── coarse.rs │ ├── draw_leaf.rs │ ├── draw_reduce.rs │ ├── euler.rs │ ├── fine.rs │ ├── flatten.rs │ ├── path_count.rs │ ├── path_count_setup.rs │ ├── path_tiling.rs │ ├── path_tiling_setup.rs │ ├── pathtag_reduce.rs │ ├── pathtag_scan.rs │ ├── tile_alloc.rs │ └── util.rs │ ├── lib.rs │ └── types.rs └── vello_tests ├── Cargo.toml ├── README.md ├── build.rs ├── comparisons └── .gitignore ├── current └── .gitignore ├── debug_outputs └── .gitignore ├── snapshots ├── .gitignore ├── big_bitmap.png ├── big_bitmap_apple.png ├── big_colr.png ├── bitmap_undef.png ├── blurred_rounded_rect.png ├── colr_undef.png ├── deep_blend.png ├── fill_types.png ├── funky_paths.png ├── gradient_extend.png ├── image_extend_modes_bilinear.png ├── image_extend_modes_nearest_neighbor.png ├── image_sampling.png ├── integer_translation.png ├── little_bitmap.png ├── little_colr.png ├── longpathdash_butt.png ├── many_clips.png ├── non_integer_translation.png ├── rounded_rectangle_watertight.png ├── scaled_hinted.png ├── simple_hinted.png ├── smoke │ ├── data_image_roundtrip.png │ ├── filled_circle.png │ ├── filled_square.png │ └── two_emoji.png ├── splash.png ├── stroke_styles.png ├── stroke_styles_non_uniform.png ├── stroke_styles_skew.png └── tricky_strokes.png ├── src ├── compare.rs ├── lib.rs └── snapshot.rs └── tests ├── compare_gpu_cpu.rs ├── emoji.rs ├── hinting.rs ├── known_issues.rs ├── property.rs ├── regression.rs ├── smoke_snapshots.rs └── snapshot_test_scenes.rs /.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [target.wasm32-unknown-unknown] 2 | rustflags = ['--cfg', 'getrandom_backend="wasm_js"'] 3 | 4 | [alias] 5 | run_wasm = "run --release --package run_wasm --" 6 | # Other crates use the alias run-wasm, even though crate names should use `_`s not `-`s 7 | # Allow this to be used 8 | run-wasm = "run_wasm" 9 | -------------------------------------------------------------------------------- /.clippy.toml: -------------------------------------------------------------------------------- 1 | # LINEBENDER LINT SET - .clippy.toml - v1 2 | # See https://linebender.org/wiki/canonical-lints/ 3 | 4 | # The default Clippy value is capped at 8 bytes, which was chosen to improve performance on 32-bit. 5 | # Given that we are building for the future and even low-end mobile phones have 64-bit CPUs, 6 | # it makes sense to optimize for 64-bit and accept the performance hits on 32-bit. 7 | # 16 bytes is the number of bytes that fits into two 64-bit CPU registers. 8 | trivial-copy-size-limit = 16 9 | 10 | # END LINEBENDER LINT SET 11 | 12 | doc-valid-idents = ["MotionMark", "WebGPU", "PostScript", ".."] 13 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # LFS settings 2 | # If changing, also change in .github/workflows/ci.yml 3 | vello_tests/snapshots/*.png filter=lfs diff=lfs merge=lfs -text 4 | sparse_strips/vello_sparse_tests/snapshots/*.png filter=lfs diff=lfs merge=lfs -text 5 | -------------------------------------------------------------------------------- /.github/copyright.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # If there are new files with headers that can't match the conditions here, 4 | # then the files can be ignored by an additional glob argument via the -g flag. 5 | # For example: 6 | # -g "!src/special_file.rs" 7 | # -g "!src/special_directory" 8 | 9 | # Check all the standard Rust source files 10 | output=$(rg "^// Copyright (19|20)[\d]{2} (.+ and )?the Vello Authors( and .+)?$\n^// SPDX-License-Identifier: Apache-2\.0 OR MIT$\n\n" --files-without-match --multiline -g "*.rs" -g "!vello_shaders/{shader,src/cpu}" .) 11 | 12 | if [ -n "$output" ]; then 13 | echo -e "The following files lack the correct copyright header:\n" 14 | echo $output 15 | echo -e "\n\nPlease add the following header:\n" 16 | echo "// Copyright $(date +%Y) the Vello Authors" 17 | echo "// SPDX-License-Identifier: Apache-2.0 OR MIT" 18 | echo -e "\n... rest of the file ...\n" 19 | exit 1 20 | fi 21 | 22 | # Check all the shaders, both WGSL and CPU shaders in Rust, as they also have Unlicense 23 | output=$(rg "^// Copyright (19|20)[\d]{2} (.+ and )?the Vello Authors( and .+)?$\n^// SPDX-License-Identifier: Apache-2\.0 OR MIT OR Unlicense$\n\n" --files-without-match --multiline -g "vello_shaders/{shader,src/cpu}/**/*.{rs,wgsl}" .) 24 | 25 | if [ -n "$output" ]; then 26 | echo -e "The following shader files lack the correct copyright header:\n" 27 | echo $output 28 | echo -e "\n\nPlease add the following header:\n" 29 | echo "// Copyright $(date +%Y) the Vello Authors" 30 | echo "// SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense" 31 | echo -e "\n... rest of the file ...\n" 32 | exit 1 33 | fi 34 | 35 | echo "All files have correct copyright headers." 36 | exit 0 37 | 38 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /debug.svg 3 | /trace.json 4 | .DS_Store 5 | 6 | examples/assets/downloads/* 7 | !examples/assets/downloads/.tracked 8 | examples/headless/outputs/* 9 | !examples/headless/outputs/.tracked 10 | -------------------------------------------------------------------------------- /.taplo.toml: -------------------------------------------------------------------------------- 1 | # See https://taplo.tamasfe.dev/configuration/file.html 2 | # and https://taplo.tamasfe.dev/configuration/formatter-options.html 3 | 4 | [formatting] 5 | # Aligning comments with the largest line creates 6 | # diff noise when neighboring lines are changed. 7 | align_comments = false 8 | 9 | # Matches how rustfmt formats Rust code 10 | column_width = 100 11 | indent_string = " " 12 | -------------------------------------------------------------------------------- /.typos.toml: -------------------------------------------------------------------------------- 1 | # See the configuration reference at 2 | # https://github.com/crate-ci/typos/blob/master/docs/reference.md 3 | 4 | # Corrections take the form of a key/value pair. The key is the incorrect word 5 | # and the value is the correct word. If the key and value are the same, the 6 | # word is treated as always correct. If the value is an empty string, the word 7 | # is treated as always incorrect. 8 | 9 | # Match Identifier - Case Sensitive 10 | [default.extend-identifiers] 11 | thm = "thm" 12 | wdth = "wdth" 13 | 14 | # Match Inside a Word - Case Insensitive 15 | [default.extend-words] 16 | 17 | [files] 18 | # Include .github, .cargo, etc. 19 | ignore-hidden = false 20 | # /.git isn't in .gitignore, because git never tracks it. 21 | # Typos doesn't know that, though. 22 | extend-exclude = ["/.git"] 23 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the list of Vello's significant contributors. 2 | # 3 | # This does not necessarily list everyone who has contributed code, 4 | # especially since many employees of one corporation may be contributing. 5 | # To see the full list of contributors, see the revision history in 6 | # source control. 7 | Google LLC 8 | Raph Levien 9 | Chad Brokaw 10 | Arman Uguray 11 | Elias Naur 12 | Daniel McNab 13 | Spencer C. Imbleau 14 | Bruce Mitchener 15 | Tatsuyuki Ishi 16 | Markus Siglreithmaier 17 | Rose Hudson 18 | Brian Merchant 19 | Matt Rice 20 | Kaur Kuut 21 | -------------------------------------------------------------------------------- /LICENSE-MIT: -------------------------------------------------------------------------------- 1 | Copyright 2020 the Vello Authors 2 | 3 | Permission is hereby granted, free of charge, to any 4 | person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the 6 | Software without restriction, including without 7 | limitation the rights to use, copy, modify, merge, 8 | publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software 10 | is furnished to do so, subject to the following 11 | conditions: 12 | 13 | The above copyright notice and this permission notice 14 | shall be included in all copies or substantial portions 15 | of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 18 | ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 19 | TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 20 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 21 | SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 23 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 24 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /doc/blogs.md: -------------------------------------------------------------------------------- 1 | # Blogs and writing 2 | 3 | Much of the research progress on piet-gpu is documented in blog entries. Here are the most relevant: 4 | 5 | * [Requiem for piet-gpu-hal](https://raphlinus.github.io/rust/gpu/2023/01/07/requiem-piet-gpu-hal.html) 6 | * [piet-gpu progress: clipping](https://raphlinus.github.io/rust/graphics/gpu/2022/02/24/piet-gpu-clipping.html), Feb 24, 2022 7 | * [Fast 2D rendering on GPU](https://raphlinus.github.io/rust/graphics/gpu/2020/06/13/fast-2d-rendering.html), Jun 13, 2020 8 | * [A sort-middle architecture for 2D graphics](https://raphlinus.github.io/rust/graphics/gpu/2020/06/12/sort-middle.html), Jun 12, 2020 9 | * [piet-gpu progress report](https://raphlinus.github.io/rust/graphics/gpu/2020/06/01/piet-gpu-progress.html), Jun 1, 2020 10 | * [2D Graphics on Modern GPU](https://raphlinus.github.io/rust/graphics/gpu/2019/05/08/modern-2d.html), May 8, 2019 11 | 12 | There are some posts more general to GPU compute programming that might be of some interest: 13 | 14 | * [The stack monoid revisited](https://raphlinus.github.io/gpu/2021/05/13/stack-monoid-revisited.html), May 13, 2021 15 | * [Prefix sum on portable compute shaders](https://raphlinus.github.io/gpu/2021/11/17/prefix-sum-portable.html), Nov 17, 2021 16 | * [The stack monoid](https://raphlinus.github.io/gpu/2020/09/05/stack-monoid.html), Sep 5, 2020 17 | * [Prefix sum on Vulkan](https://raphlinus.github.io/gpu/2020/04/30/prefix-sum.html), Apr 30, 2020 18 | * [GPU resources](https://raphlinus.github.io/gpu/2020/02/12/gpu-resources.html), Feb 12, 2020 19 | 20 | A paper, [Fast GPU bounding boxes on tree-structured scenes], describes the algorithm to compute bounding boxes for clipping and blending. 21 | 22 | [Fast GPU bounding boxes on tree-structured scenes]: https://arxiv.org/abs/2205.11659 -------------------------------------------------------------------------------- /doc/images/piet-gpu-diagram.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linebender/vello/33f4be83cedd7de855553ca9c5465a181ce32fea/doc/images/piet-gpu-diagram.jpg -------------------------------------------------------------------------------- /examples/assets/colr_test_glyphs/README.md: -------------------------------------------------------------------------------- 1 | Font is taken from https://github.com/googlefonts/color-fonts -------------------------------------------------------------------------------- /examples/assets/colr_test_glyphs/test_glyphs-glyf_colr_1.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linebender/vello/33f4be83cedd7de855553ca9c5465a181ce32fea/examples/assets/colr_test_glyphs/test_glyphs-glyf_colr_1.ttf -------------------------------------------------------------------------------- /examples/assets/downloads/.tracked: -------------------------------------------------------------------------------- 1 | This directory is used to store the downloaded scenes by default 2 | -------------------------------------------------------------------------------- /examples/assets/inconsolata/Inconsolata.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linebender/vello/33f4be83cedd7de855553ca9c5465a181ce32fea/examples/assets/inconsolata/Inconsolata.ttf -------------------------------------------------------------------------------- /examples/assets/noto_color_emoji/NotoColorEmoji-CBTF-Subset.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linebender/vello/33f4be83cedd7de855553ca9c5465a181ce32fea/examples/assets/noto_color_emoji/NotoColorEmoji-CBTF-Subset.ttf -------------------------------------------------------------------------------- /examples/assets/noto_color_emoji/NotoColorEmoji-Subset.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linebender/vello/33f4be83cedd7de855553ca9c5465a181ce32fea/examples/assets/noto_color_emoji/NotoColorEmoji-Subset.ttf -------------------------------------------------------------------------------- /examples/assets/noto_color_emoji/README.md: -------------------------------------------------------------------------------- 1 | # Noto Color Emoji Subset 2 | 3 | This folder contains a small subset of [Noto Color Emoji](https://fonts.google.com/noto/specimen/Noto+Color+Emoji), licensed under the [OFL version 1.1](LICENSE). 4 | We do not include the full set of Emoji, because including the entire Emoji set would increase the repository size too much. 5 | Included emoji are: 6 | 7 | - ✅ Check Mark - \u{2705}/`:white_check_mark:` 8 | - 👀 Eyes - \u{1f440}/`:eyes:` 9 | - 🎉 Party Popper - \u{1f389}/`:party_popper:` 10 | - 🤠 Face with Cowboy Hat - \u{1f920}/`cowboy_hat_face` 11 | 12 | These are in the COLR format in `NotoColorEmoji-Subset` and in the CBTF format in `NotoColorEmoji-CBTF-Subset`. 13 | This covers all ways that Emoji are commonly packaged, and both are supported by Vello. 14 | -------------------------------------------------------------------------------- /examples/assets/roboto/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linebender/vello/33f4be83cedd7de855553ca9c5465a181ce32fea/examples/assets/roboto/Roboto-Regular.ttf -------------------------------------------------------------------------------- /examples/assets/splash-flower.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linebender/vello/33f4be83cedd7de855553ca9c5465a181ce32fea/examples/assets/splash-flower.jpg -------------------------------------------------------------------------------- /examples/headless/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "headless" 3 | description = "An example showing how to use Vello to create raster images." 4 | edition.workspace = true 5 | license.workspace = true 6 | repository.workspace = true 7 | publish = false 8 | 9 | [lints] 10 | workspace = true 11 | 12 | [dependencies] 13 | vello = { workspace = true } 14 | scenes = { workspace = true } 15 | 16 | anyhow = { workspace = true } 17 | clap = { workspace = true, features = ["derive"] } 18 | 19 | pollster = { workspace = true } 20 | env_logger = "0.11.8" 21 | png = { workspace = true } 22 | futures-intrusive = { workspace = true } 23 | -------------------------------------------------------------------------------- /examples/headless/outputs/.tracked: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linebender/vello/33f4be83cedd7de855553ca9c5465a181ce32fea/examples/headless/outputs/.tracked -------------------------------------------------------------------------------- /examples/run_wasm/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "run_wasm" 3 | edition.workspace = true 4 | license.workspace = true 5 | repository.workspace = true 6 | publish = false 7 | 8 | [lints] 9 | workspace = true 10 | 11 | [dependencies] 12 | cargo-run-wasm = "0.4.0" 13 | -------------------------------------------------------------------------------- /examples/run_wasm/src/main.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2022 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | //! Wasm 5 | 6 | /// Use [cargo-run-wasm](https://github.com/rukai/cargo-run-wasm) to build an example for web 7 | /// 8 | /// Usage: 9 | /// ``` 10 | /// cargo run_wasm --package [example_name] 11 | /// ``` 12 | /// Generally: 13 | /// ``` 14 | /// cargo run_wasm -p with_winit 15 | /// ``` 16 | fn main() { 17 | cargo_run_wasm::run_wasm_cli_with_css("body { margin: 0px; }"); 18 | } 19 | -------------------------------------------------------------------------------- /examples/scenes/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "scenes" 3 | description = "Vello scenes used in the other examples." 4 | edition.workspace = true 5 | license.workspace = true 6 | repository.workspace = true 7 | publish = false 8 | 9 | [lints] 10 | workspace = true 11 | 12 | [dependencies] 13 | vello = { workspace = true } 14 | skrifa = { workspace = true } 15 | anyhow = { workspace = true } 16 | clap = { workspace = true, features = ["derive"] } 17 | image = { workspace = true, features = ["jpeg"] } 18 | rand = { workspace = true, features = ["thread_rng"] } 19 | 20 | # for pico_svg 21 | roxmltree = "0.20.0" 22 | bytemuck.workspace = true 23 | 24 | [target.'cfg(target_arch = "wasm32")'.dependencies] 25 | web-time = { workspace = true } 26 | 27 | [target.wasm32-unknown-unknown.dependencies] 28 | # We have a transitive dependency on getrandom and it does not automatically 29 | # support wasm32-unknown-unknown. We need to enable the js feature. 30 | getrandom = { version = "0.3.3", features = ["wasm_js"] } 31 | -------------------------------------------------------------------------------- /examples/scenes/src/images.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2023 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | use std::collections::HashMap; 5 | use std::path::{Path, PathBuf}; 6 | use std::sync::Arc; 7 | 8 | use vello::peniko::{Blob, Image, ImageFormat}; 9 | 10 | /// Simple hack to support loading images for examples. 11 | #[derive(Default)] 12 | pub struct ImageCache { 13 | files: HashMap, 14 | bytes: HashMap, 15 | } 16 | 17 | impl ImageCache { 18 | pub fn new() -> Self { 19 | Self::default() 20 | } 21 | 22 | pub fn from_file(&mut self, path: impl AsRef) -> anyhow::Result { 23 | let path = path.as_ref(); 24 | if let Some(image) = self.files.get(path) { 25 | Ok(image.clone()) 26 | } else { 27 | let data = std::fs::read(path)?; 28 | let image = decode_image(&data)?; 29 | self.files.insert(path.to_owned(), image.clone()); 30 | Ok(image) 31 | } 32 | } 33 | 34 | pub fn from_bytes(&mut self, key: usize, bytes: &[u8]) -> anyhow::Result { 35 | if let Some(image) = self.bytes.get(&key) { 36 | Ok(image.clone()) 37 | } else { 38 | let image = decode_image(bytes)?; 39 | self.bytes.insert(key, image.clone()); 40 | Ok(image) 41 | } 42 | } 43 | } 44 | 45 | fn decode_image(data: &[u8]) -> anyhow::Result { 46 | let image = image::ImageReader::new(std::io::Cursor::new(data)) 47 | .with_guessed_format()? 48 | .decode()?; 49 | let width = image.width(); 50 | let height = image.height(); 51 | let data = Arc::new(image.into_rgba8().into_vec()); 52 | let blob = Blob::new(data); 53 | Ok(Image::new(blob, ImageFormat::Rgba8, width, height)) 54 | } 55 | -------------------------------------------------------------------------------- /examples/simple/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "simple" 3 | edition.workspace = true 4 | license.workspace = true 5 | repository.workspace = true 6 | publish = false 7 | 8 | [lints] 9 | workspace = true 10 | 11 | # The dependencies here are independent from the workspace versions 12 | [dependencies] 13 | # When using this example outside of the original Vello workspace, 14 | # remove the path property of the following Vello dependency requirement. 15 | vello = { version = "0.5.0", path = "../../vello" } 16 | anyhow = "1.0.98" 17 | pollster = "0.4.0" 18 | winit = "0.30.10" 19 | -------------------------------------------------------------------------------- /examples/simple_sdl2/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "simple_sdl2" 3 | edition.workspace = true 4 | license.workspace = true 5 | repository.workspace = true 6 | publish = false 7 | 8 | [lints] 9 | workspace = true 10 | 11 | # The dependencies here are independent from the workspace versions 12 | [dependencies] 13 | # When using this example outside of the original Vello workspace, 14 | # remove the path property of the following Vello dependency requirement. 15 | vello = { version = "0.5.0", path = "../../vello" } 16 | pollster = "0.4.0" 17 | sdl2 = { version = "0.37.0", features = ["raw-window-handle", "bundled"] } 18 | -------------------------------------------------------------------------------- /examples/with_winit/README.md: -------------------------------------------------------------------------------- 1 | ## Usage 2 | 3 | Running the viewer without any arguments will render a built-in set of public-domain SVG images: 4 | 5 | ```bash 6 | $ cargo run -p with_winit --release 7 | ``` 8 | 9 | Optionally, you can pass in paths to SVG files that you want to render: 10 | 11 | ```bash 12 | $ cargo run -p with_winit --release -- [SVG FILES] 13 | ``` 14 | 15 | ## Controls 16 | 17 | - Mouse drag-and-drop will translate the image. 18 | - Mouse scroll wheel will zoom. 19 | - Arrow keys switch between SVG images in the current set. 20 | - Space resets the position and zoom of the image. 21 | - S toggles the frame statistics layer 22 | - C resets the min/max frame time tracked by statistics 23 | - D toggles displaying the required number of each kind of dynamically allocated element (default: off) 24 | - V toggles VSync on/off (default: on) 25 | - Escape exits the program. 26 | -------------------------------------------------------------------------------- /examples/with_winit/src/hot_reload.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2023 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | use std::time::Duration; 5 | 6 | use anyhow::Result; 7 | use notify_debouncer_full::notify::RecursiveMode; 8 | use notify_debouncer_full::{DebounceEventResult, new_debouncer}; 9 | 10 | pub fn hot_reload(mut f: impl FnMut() -> Option<()> + Send + 'static) -> Result { 11 | let mut debouncer = new_debouncer( 12 | Duration::from_millis(500), 13 | None, 14 | move |res: DebounceEventResult| match res { 15 | Ok(events) => { 16 | for event in events { 17 | // Don't hot reload if the file was only read (i.e. by us...) 18 | if !matches!( 19 | event.kind, 20 | notify_debouncer_full::notify::EventKind::Access(_) 21 | ) { 22 | f().unwrap(); 23 | break; 24 | } 25 | } 26 | } 27 | Err(e) => println!("Hot reloading file watching failed: {e:?}"), 28 | }, 29 | )?; 30 | 31 | debouncer.watch( 32 | vello_shaders::compile::shader_dir().as_path(), 33 | // We currently don't support hot reloading the imports, so don't recurse into there 34 | RecursiveMode::NonRecursive, 35 | )?; 36 | Ok(debouncer) 37 | } 38 | -------------------------------------------------------------------------------- /examples/with_winit/src/main.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2022 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | //! Winit example. 5 | 6 | use anyhow::Result; 7 | 8 | fn main() -> Result<()> { 9 | #[cfg(not(target_os = "android"))] 10 | { 11 | with_winit::main() 12 | } 13 | #[cfg(target_os = "android")] 14 | unreachable!() 15 | } 16 | -------------------------------------------------------------------------------- /image_filters/vello_filters_cpu/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "vello_filters_cpu" 3 | version.workspace = true 4 | categories = ["rendering", "graphics"] 5 | keywords = ["2d", "render", "filter", "blur"] 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | license.workspace = true 9 | repository.workspace = true 10 | # Prevent accidental publishing until the initial release 11 | publish = false 12 | 13 | [dependencies] 14 | 15 | [lints] 16 | workspace = true 17 | -------------------------------------------------------------------------------- /image_filters/vello_filters_cpu/LICENSE-MIT: -------------------------------------------------------------------------------- 1 | Copyright 2020 the Vello Authors 2 | 3 | Permission is hereby granted, free of charge, to any 4 | person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the 6 | Software without restriction, including without 7 | limitation the rights to use, copy, modify, merge, 8 | publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software 10 | is furnished to do so, subject to the following 11 | conditions: 12 | 13 | The above copyright notice and this permission notice 14 | shall be included in all copies or substantial portions 15 | of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 18 | ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 19 | TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 20 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 21 | SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 23 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 24 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /image_filters/vello_filters_cpu/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2025 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | //! A library of image filters which run on the CPU. 5 | -------------------------------------------------------------------------------- /rustfmt.toml: -------------------------------------------------------------------------------- 1 | use_field_init_shorthand = true 2 | newline_style = "Unix" 3 | # TODO: imports_granularity = "Module" - Wait for this to be stable. 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_api/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "vello_api" 3 | version.workspace = true 4 | description = "Defines the public API types for Vello, providing a stable interface for CPU and Hybrid rendering implementations." 5 | categories = ["rendering", "graphics"] 6 | keywords = ["2d", "vector-graphics"] 7 | edition.workspace = true 8 | rust-version.workspace = true 9 | license.workspace = true 10 | repository.workspace = true 11 | # Prevent accidental publishing until the initial release 12 | publish = false 13 | 14 | [dependencies] 15 | bytemuck = { workspace = true, features = [] } 16 | peniko = { workspace = true, features = ["bytemuck"] } 17 | png = { workspace = true, optional = true } 18 | 19 | [features] 20 | default = ["std", "png"] 21 | std = ["peniko/std"] 22 | libm = ["peniko/libm"] 23 | png = ["std", "dep:png"] 24 | simd = [] 25 | 26 | [lints] 27 | workspace = true 28 | -------------------------------------------------------------------------------- /sparse_strips/vello_api/LICENSE-MIT: -------------------------------------------------------------------------------- 1 | Copyright 2020 the Vello Authors 2 | 3 | Permission is hereby granted, free of charge, to any 4 | person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the 6 | Software without restriction, including without 7 | limitation the rights to use, copy, modify, merge, 8 | publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software 10 | is furnished to do so, subject to the following 11 | conditions: 12 | 13 | The above copyright notice and this permission notice 14 | shall be included in all copies or substantial portions 15 | of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 18 | ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 19 | TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 20 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 21 | SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 23 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 24 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /sparse_strips/vello_api/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2025 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | //! A stub crate. 5 | //! Planned to provide an abstraction between different renderers in the future. 6 | //! This abstraction is not yet designed. 7 | 8 | #![forbid(unsafe_code)] 9 | #![no_std] 10 | -------------------------------------------------------------------------------- /sparse_strips/vello_bench/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "vello_bench" 3 | description = "Benchmarking harness for sparse strips." 4 | categories = ["rendering", "graphics"] 5 | keywords = ["2d", "vector-graphics"] 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | license.workspace = true 9 | repository.workspace = true 10 | publish = false 11 | 12 | [dependencies] 13 | vello_common = { workspace = true } 14 | vello_cpu = { workspace = true } 15 | vello_dev_macros = { workspace = true } 16 | criterion = { workspace = true } 17 | rand = { workspace = true } 18 | smallvec = { workspace = true } 19 | usvg = { workspace = true } 20 | 21 | [[bench]] 22 | name = "main" 23 | harness = false 24 | 25 | [lints] 26 | workspace = true 27 | -------------------------------------------------------------------------------- /sparse_strips/vello_bench/README.md: -------------------------------------------------------------------------------- 1 | # Setup 2 | 3 | In order to run the integration benchmarks with custom SVGs, you need to add the SVGs you want to run into the `data` folder. For each SVG file in that folder, a corresponding integration test will be generated automatically. 4 | 5 | If you don't add any SVGs, the benchmarking harness will only use the ghostscript tiger by default. 6 | 7 | In order to run the benches, you can simply run `cargo bench`. However, in most cases you probably don't 8 | want to rerun all benchmarks, in which case you can also provide a filter for the name of the benchmarks 9 | you want to run, like `cargo bench -- fine/fill` -------------------------------------------------------------------------------- /sparse_strips/vello_bench/benches/main.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2025 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | #![allow(missing_docs, reason = "Not needed for benchmarks")] 5 | 6 | use criterion::{criterion_group, criterion_main}; 7 | use vello_bench::{fine, strip, tile}; 8 | 9 | criterion_group!(fine_solid, fine::fill); 10 | criterion_group!(fine_strip, fine::strip); 11 | criterion_group!(fine_pack, fine::pack); 12 | criterion_group!(fine_gradient, fine::gradient); 13 | criterion_group!(fine_rounded_blurred_rect, fine::rounded_blurred_rect); 14 | criterion_group!(fine_blend, fine::blend); 15 | criterion_group!(fine_image, fine::image); 16 | criterion_group!(tile, tile::tile); 17 | criterion_group!(render_strips, strip::render_strips); 18 | criterion_main!( 19 | tile, 20 | render_strips, 21 | fine_solid, 22 | fine_strip, 23 | fine_pack, 24 | fine_gradient, 25 | fine_rounded_blurred_rect, 26 | fine_blend, 27 | fine_image 28 | ); 29 | -------------------------------------------------------------------------------- /sparse_strips/vello_bench/data/.gitignore: -------------------------------------------------------------------------------- 1 | *.svg 2 | -------------------------------------------------------------------------------- /sparse_strips/vello_bench/src/fine/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2025 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | mod blend; 5 | pub(crate) mod fill; 6 | mod gradient; 7 | mod image; 8 | mod rounded_blurred_rect; 9 | mod strip; 10 | 11 | use criterion::Bencher; 12 | use vello_cpu::fine::{Fine, FineType, SCRATCH_BUF_SIZE}; 13 | use vello_dev_macros::vello_bench; 14 | 15 | pub use blend::*; 16 | pub use fill::*; 17 | pub use gradient::*; 18 | pub use image::*; 19 | pub use rounded_blurred_rect::*; 20 | pub use strip::*; 21 | use vello_common::peniko::{BlendMode, Compose, Mix}; 22 | 23 | #[vello_bench] 24 | pub fn pack(b: &mut Bencher<'_>, fine: &mut Fine) { 25 | let mut buf = vec![0; SCRATCH_BUF_SIZE]; 26 | 27 | b.iter(|| { 28 | fine.pack(&mut buf); 29 | std::hint::black_box(&buf); 30 | }); 31 | } 32 | 33 | pub(crate) fn default_blend() -> BlendMode { 34 | BlendMode::new(Mix::Normal, Compose::SrcOver) 35 | } 36 | -------------------------------------------------------------------------------- /sparse_strips/vello_bench/src/fine/rounded_blurred_rect.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2025 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | use crate::fine::{default_blend, fill_single}; 5 | use criterion::{Bencher, Criterion}; 6 | use vello_common::blurred_rounded_rect::BlurredRoundedRectangle; 7 | use vello_common::coarse::WideTile; 8 | use vello_common::color::palette::css::GREEN; 9 | use vello_common::encode::EncodeExt; 10 | use vello_common::kurbo::{Affine, Point, Rect}; 11 | use vello_common::tile::Tile; 12 | use vello_cpu::fine::{Fine, FineType}; 13 | use vello_dev_macros::vello_bench; 14 | 15 | pub fn rounded_blurred_rect(c: &mut Criterion) { 16 | with_transform(c); 17 | no_transform(c); 18 | } 19 | 20 | #[vello_bench] 21 | fn with_transform(b: &mut Bencher<'_>, fine: &mut Fine) { 22 | let center = Point::new(WideTile::WIDTH as f64 / 2.0, Tile::HEIGHT as f64 / 2.0); 23 | 24 | base(b, fine, Affine::rotate_about(1.0, center)); 25 | } 26 | 27 | #[vello_bench] 28 | fn no_transform(b: &mut Bencher<'_>, fine: &mut Fine) { 29 | base(b, fine, Affine::IDENTITY); 30 | } 31 | 32 | fn base(b: &mut Bencher<'_>, fine: &mut Fine, transform: Affine) { 33 | let mut paints = vec![]; 34 | 35 | let rect = BlurredRoundedRectangle { 36 | rect: Rect::new(0.0, 0.0, WideTile::WIDTH as f64, Tile::HEIGHT as f64), 37 | color: GREEN, 38 | radius: 30.0, 39 | std_dev: 10.0, 40 | }; 41 | 42 | let paint = rect.encode_into(&mut paints, transform); 43 | fill_single( 44 | &paint, 45 | &paints, 46 | WideTile::WIDTH as usize, 47 | b, 48 | default_blend(), 49 | fine, 50 | ); 51 | } 52 | -------------------------------------------------------------------------------- /sparse_strips/vello_bench/src/fine/strip.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2025 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | use crate::SEED; 5 | use crate::fine::default_blend; 6 | use criterion::{Bencher, Criterion}; 7 | use rand::prelude::StdRng; 8 | use rand::{Rng, SeedableRng}; 9 | use vello_common::coarse::WideTile; 10 | use vello_common::color::palette::css::ROYAL_BLUE; 11 | use vello_common::encode::EncodedPaint; 12 | use vello_common::paint::{Paint, PremulColor}; 13 | use vello_common::tile::Tile; 14 | use vello_cpu::fine::{Fine, FineType}; 15 | use vello_dev_macros::vello_bench; 16 | 17 | pub fn strip(c: &mut Criterion) { 18 | solid_short(c); 19 | solid_long(c); 20 | } 21 | 22 | #[vello_bench] 23 | pub fn solid_short(b: &mut Bencher<'_>, fine: &mut Fine) { 24 | let paint = Paint::Solid(PremulColor::from_alpha_color(ROYAL_BLUE)); 25 | let width = 8; 26 | 27 | strip_single(&paint, &[], width, b, fine); 28 | } 29 | 30 | #[vello_bench] 31 | pub fn solid_long(b: &mut Bencher<'_>, fine: &mut Fine) { 32 | let paint = Paint::Solid(PremulColor::from_alpha_color(ROYAL_BLUE)); 33 | let width = 64; 34 | 35 | strip_single(&paint, &[], width, b, fine); 36 | } 37 | 38 | fn strip_single( 39 | paint: &Paint, 40 | encoded_paints: &[EncodedPaint], 41 | width: usize, 42 | b: &mut Bencher<'_>, 43 | fine: &mut Fine, 44 | ) { 45 | let mut rng = StdRng::from_seed(SEED); 46 | let mut alphas = vec![]; 47 | 48 | for _ in 0..WideTile::WIDTH * Tile::HEIGHT { 49 | alphas.push(rng.random()); 50 | } 51 | 52 | b.iter(|| { 53 | fine.strip(0, width, &alphas, paint, default_blend(), encoded_paints); 54 | 55 | std::hint::black_box(&fine); 56 | }); 57 | } 58 | -------------------------------------------------------------------------------- /sparse_strips/vello_bench/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2025 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | #![allow(missing_docs, reason = "Not needed for benchmarks")] 5 | 6 | use std::path::PathBuf; 7 | use std::sync::LazyLock; 8 | 9 | pub mod data; 10 | pub mod fine; 11 | pub mod strip; 12 | pub mod tile; 13 | 14 | pub(crate) const SEED: [u8; 32] = [0; 32]; 15 | pub static DATA_PATH: LazyLock = 16 | LazyLock::new(|| PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("data")); 17 | -------------------------------------------------------------------------------- /sparse_strips/vello_bench/src/strip.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2025 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | use crate::data::get_data_items; 5 | use criterion::Criterion; 6 | use vello_common::peniko::Fill; 7 | use vello_common::strip; 8 | 9 | pub fn render_strips(c: &mut Criterion) { 10 | let mut g = c.benchmark_group("render_strips"); 11 | g.sample_size(50); 12 | 13 | macro_rules! strip_single { 14 | ($item:expr) => { 15 | let lines = $item.lines(); 16 | let tiles = $item.sorted_tiles(); 17 | 18 | g.bench_function($item.name.clone(), |b| { 19 | let mut strip_buf = vec![]; 20 | let mut alpha_buf = vec![]; 21 | 22 | b.iter(|| { 23 | strip_buf.clear(); 24 | alpha_buf.clear(); 25 | 26 | strip::render( 27 | &tiles, 28 | &mut strip_buf, 29 | &mut alpha_buf, 30 | Fill::NonZero, 31 | &lines, 32 | ); 33 | std::hint::black_box((&strip_buf, &alpha_buf)); 34 | }) 35 | }); 36 | }; 37 | } 38 | 39 | for item in get_data_items() { 40 | strip_single!(item); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /sparse_strips/vello_bench/src/tile.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2025 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | use crate::data::get_data_items; 5 | use criterion::Criterion; 6 | use vello_common::tile::Tiles; 7 | 8 | pub fn tile(c: &mut Criterion) { 9 | let mut g = c.benchmark_group("tile"); 10 | g.sample_size(50); 11 | 12 | macro_rules! tile_single { 13 | ($item:expr) => { 14 | let lines = $item.lines(); 15 | 16 | g.bench_function($item.name.clone(), |b| { 17 | b.iter(|| { 18 | let mut tiler = Tiles::new(); 19 | tiler.make_tiles(&lines, $item.width, $item.height); 20 | }) 21 | }); 22 | }; 23 | } 24 | 25 | for item in get_data_items() { 26 | tile_single!(item); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /sparse_strips/vello_common/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "vello_common" 3 | # When updating, also update the version in the workspace dependency in the root Cargo.toml 4 | version = "0.0.1" 5 | description = "Core data structures and utilities shared across the Vello rendering, including geometry processing and tiling logic." 6 | categories = ["rendering", "graphics"] 7 | keywords = ["2d", "vector-graphics"] 8 | edition.workspace = true 9 | rust-version.workspace = true 10 | license.workspace = true 11 | repository.workspace = true 12 | 13 | [package.metadata.docs.rs] 14 | all-features = true 15 | # There are no platform specific docs. 16 | default-target = "x86_64-unknown-linux-gnu" 17 | targets = [] 18 | 19 | [dependencies] 20 | bytemuck = { workspace = true, features = [] } 21 | peniko = { workspace = true, features = ["bytemuck"] } 22 | png = { workspace = true, optional = true } 23 | roxmltree = { version = "0.20.0", optional = true } 24 | skrifa = { workspace = true } 25 | smallvec = { workspace = true } 26 | libm = { version = "0.2.15", optional = true } 27 | 28 | [features] 29 | default = ["std", "png"] 30 | # Enable using SIMD instructions for rendering 31 | simd = [] 32 | # Get floating point functions from the standard library (likely using your target’s libc). 33 | std = ["peniko/std", "skrifa/std"] 34 | # Use floating point implementations from libm. 35 | libm = ["peniko/libm", "skrifa/libm", "dep:libm"] 36 | # Allow loading Pixmap from PNG, and drawing png glyphs. 37 | png = ["std", "dep:png"] 38 | 39 | # Development only features 40 | 41 | # Enable a simple version of SVG drawing. 42 | # This is only intended for development of Vello CPU itself, 43 | # and is likely to be removed/moved. 44 | pico_svg = ["dep:roxmltree"] 45 | 46 | [lints] 47 | workspace = true 48 | -------------------------------------------------------------------------------- /sparse_strips/vello_common/LICENSE-MIT: -------------------------------------------------------------------------------- 1 | Copyright 2020 the Vello Authors 2 | 3 | Permission is hereby granted, free of charge, to any 4 | person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the 6 | Software without restriction, including without 7 | limitation the rights to use, copy, modify, merge, 8 | publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software 10 | is furnished to do so, subject to the following 11 | conditions: 12 | 13 | The above copyright notice and this permission notice 14 | shall be included in all copies or substantial portions 15 | of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 18 | ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 19 | TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 20 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 21 | SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 23 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 24 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /sparse_strips/vello_common/src/blurred_rounded_rect.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2025 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | //! Blurred, rounded rectangles. 5 | use crate::color::{AlphaColor, Srgb}; 6 | use crate::kurbo::Rect; 7 | 8 | /// A blurred, rounded rectangle. 9 | #[derive(Debug)] 10 | pub struct BlurredRoundedRectangle { 11 | /// The base rectangle to use for the blur effect. 12 | pub rect: Rect, 13 | /// The color of the blurred rectangle. 14 | pub color: AlphaColor, 15 | /// The radius of the blur effect. 16 | pub radius: f32, 17 | /// The standard deviation of the blur effect. 18 | pub std_dev: f32, 19 | } 20 | -------------------------------------------------------------------------------- /sparse_strips/vello_common/src/execute.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2025 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | //! Different execution modes for kernels. 5 | 6 | #[derive(Copy, Clone, Debug)] 7 | /// The execution mode used for the rendering process. 8 | pub enum ExecutionMode { 9 | /// Only use scalar execution. This is recommended if you want to have 10 | /// consistent results across different platforms and want to avoid unsafe code, 11 | /// and is the only option if you disabled the `simd` feature. Performance will be 12 | /// worse, though. 13 | Scalar, 14 | /// Select the best execution mode according to what is available on the host system. 15 | /// This is the recommended option for highest performance. 16 | #[cfg(feature = "simd")] 17 | Auto, 18 | /// Force the usage of neon SIMD instructions. This will lead to panics in case 19 | /// the CPU doesn't support the target feature `neon`. 20 | #[cfg(all(target_arch = "aarch64", feature = "simd"))] 21 | Neon, 22 | /// Force the usage of AVX2 SIMD instructions. This will lead to panics in case 23 | /// the CPU doesn't support the target features `avx2` and `fma`. 24 | #[cfg(all(target_arch = "x86_64", feature = "simd"))] 25 | Avx2, 26 | } 27 | 28 | #[cfg(feature = "simd")] 29 | impl Default for ExecutionMode { 30 | fn default() -> Self { 31 | Self::Auto 32 | } 33 | } 34 | 35 | #[cfg(not(feature = "simd"))] 36 | impl Default for ExecutionMode { 37 | fn default() -> Self { 38 | Self::Scalar 39 | } 40 | } 41 | 42 | /// Scalar execution mode. 43 | #[derive(Debug)] 44 | pub struct Scalar; 45 | 46 | #[cfg(all(target_arch = "aarch64", feature = "simd"))] 47 | #[derive(Debug)] 48 | /// Execute using NEON intrinsics. 49 | pub struct Neon; 50 | 51 | #[cfg(all(target_arch = "x86_64", feature = "simd"))] 52 | #[derive(Debug)] 53 | /// Execute using AVX2 intrinsics. 54 | pub struct Avx2; 55 | -------------------------------------------------------------------------------- /sparse_strips/vello_common/src/math.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2025 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | //! Mathematical helper functions. 5 | 6 | use core::ops::Sub; 7 | #[cfg(not(feature = "std"))] 8 | use peniko::kurbo::common::FloatFuncs as _; 9 | 10 | // See https://raphlinus.github.io/audio/2018/09/05/sigmoid.html for a little 11 | // explanation of this approximation to the erf function. 12 | /// Approximate the erf function. 13 | pub fn compute_erf7(x: f32) -> f32 { 14 | let x = x * core::f32::consts::FRAC_2_SQRT_PI; 15 | let xx = x * x; 16 | let x = x + (0.24295 + (0.03395 + 0.0104 * xx) * xx) * (x * xx); 17 | x / (1.0 + x * x).sqrt() 18 | } 19 | 20 | // From 21 | const SCALAR_NEARLY_ZERO: f32 = 1.0 / (1 << 12) as f32; 22 | 23 | /// A number of useful methods for f32 numbers. 24 | pub trait FloatExt: Sized + Sub { 25 | /// Whether the number is approximately 0. 26 | fn is_nearly_zero(&self) -> bool { 27 | self.is_nearly_zero_within_tolerance(SCALAR_NEARLY_ZERO) 28 | } 29 | 30 | /// Whether the number is approximately 0, with a given tolerance. 31 | fn is_nearly_zero_within_tolerance(&self, tolerance: f32) -> bool; 32 | } 33 | 34 | impl FloatExt for f32 { 35 | fn is_nearly_zero_within_tolerance(&self, tolerance: f32) -> bool { 36 | debug_assert!(tolerance >= 0.0, "tolerance must be positive"); 37 | 38 | self.abs() <= tolerance 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /sparse_strips/vello_cpu/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "vello_cpu" 3 | # When moving past 0.0.x, also update caveats in the README 4 | version = "0.0.1" 5 | description = "A CPU-based renderer for Vello, optimized for SIMD and multithreaded execution." 6 | categories = ["rendering", "graphics"] 7 | keywords = ["2d", "vector-graphics"] 8 | edition.workspace = true 9 | rust-version.workspace = true 10 | license.workspace = true 11 | repository.workspace = true 12 | 13 | [package.metadata.docs.rs] 14 | all-features = true 15 | # There are no platform specific docs. 16 | default-target = "x86_64-unknown-linux-gnu" 17 | targets = [] 18 | 19 | [dependencies] 20 | libm = { version = "0.2.15", optional = true } 21 | vello_common = { workspace = true } 22 | 23 | [features] 24 | default = ["std", "png"] 25 | # Get floating point functions from the standard library (likely using your target’s libc). 26 | std = ["vello_common/std"] 27 | # Use floating point implementations from libm. 28 | libm = ["vello_common/libm", "dep:libm"] 29 | # Allow loading Pixmap from PNG, and drawing png glyphs. 30 | png = ["vello_common/png"] 31 | 32 | [lints] 33 | workspace = true 34 | -------------------------------------------------------------------------------- /sparse_strips/vello_cpu/LICENSE-MIT: -------------------------------------------------------------------------------- 1 | Copyright 2020 the Vello Authors 2 | 3 | Permission is hereby granted, free of charge, to any 4 | person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the 6 | Software without restriction, including without 7 | limitation the rights to use, copy, modify, merge, 8 | publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software 10 | is furnished to do so, subject to the following 11 | conditions: 12 | 13 | The above copyright notice and this permission notice 14 | shall be included in all copies or substantial portions 15 | of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 18 | ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 19 | TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 20 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 21 | SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 23 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 24 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /sparse_strips/vello_dev_macros/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "vello_dev_macros" 3 | description = "Procedural macros used for testing and benchmarking vello sparse strip implementations." 4 | categories = ["rendering", "graphics"] 5 | keywords = ["2d", "vector-graphics"] 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | license.workspace = true 9 | repository.workspace = true 10 | publish = false 11 | 12 | [lib] 13 | proc-macro = true 14 | 15 | [dependencies] 16 | syn = { workspace = true } 17 | quote = { workspace = true } 18 | proc-macro2 = { workspace = true } 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /sparse_strips/vello_dev_macros/src/bench.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2025 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | use proc_macro::TokenStream; 5 | use proc_macro2::Ident; 6 | use quote::quote; 7 | use syn::{ItemFn, parse_macro_input}; 8 | 9 | pub(crate) fn vello_bench_inner(_: TokenStream, item: TokenStream) -> TokenStream { 10 | let mut input_fn = parse_macro_input!(item as ItemFn); 11 | 12 | let input_fn_name = input_fn.sig.ident.clone(); 13 | let input_fn_name_str = input_fn.sig.ident.to_string(); 14 | let inner_fn_name = Ident::new(&format!("{}_inner", input_fn_name), input_fn_name.span()); 15 | 16 | input_fn.sig.ident = inner_fn_name.clone(); 17 | 18 | let expanded = quote! { 19 | #input_fn 20 | 21 | pub fn #input_fn_name(c: &mut criterion::Criterion) { 22 | use vello_cpu::fine::Fine; 23 | use vello_common::coarse::WideTile; 24 | use vello_common::tile::Tile; 25 | 26 | fn get_bench_name(suffix1: &str, suffix2: &str) -> String { 27 | let module_path = module_path!(); 28 | 29 | let module = module_path 30 | .split("::") 31 | .skip(1) 32 | .collect::>() 33 | .join("/"); 34 | 35 | format!("{}/{}_{}", module, suffix1, suffix2) 36 | } 37 | 38 | c.bench_function(&get_bench_name(&#input_fn_name_str, "u8_scalar"), |b| { 39 | let mut fine = Fine::::new(WideTile::WIDTH, Tile::HEIGHT); 40 | #inner_fn_name(b, &mut fine); 41 | }); 42 | 43 | c.bench_function(&get_bench_name(&#input_fn_name_str, "f32_scalar"), |b| { 44 | let mut fine = Fine::::new(WideTile::WIDTH, Tile::HEIGHT); 45 | #inner_fn_name(b, &mut fine); 46 | }); 47 | } 48 | }; 49 | 50 | expanded.into() 51 | } 52 | -------------------------------------------------------------------------------- /sparse_strips/vello_hybrid/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "vello_hybrid" 3 | version.workspace = true 4 | description = "A hybrid CPU/GPU renderer for Vello, balancing computation between CPU and GPU for efficiency." 5 | categories = ["rendering", "graphics"] 6 | keywords = ["2d", "vector-graphics"] 7 | edition.workspace = true 8 | rust-version.workspace = true 9 | license.workspace = true 10 | repository.workspace = true 11 | # Prevent accidental publishing until the initial release 12 | publish = false 13 | 14 | [lints] 15 | workspace = true 16 | 17 | [dependencies] 18 | bytemuck = { workspace = true, features = ["derive"] } 19 | thiserror = { workspace = true } 20 | vello_common = { workspace = true, features = ["std"] } 21 | wgpu = { workspace = true, optional = true } 22 | vello_sparse_shaders = { workspace = true, optional = true } 23 | log = { workspace = true } 24 | 25 | 26 | [target.'cfg(target_arch = "wasm32")'.dependencies] 27 | js-sys = { version = "0.3.77", optional = true } 28 | web-sys = { version = "0.3.77", features = [ 29 | "HtmlCanvasElement", 30 | "WebGl2RenderingContext", 31 | "WebGlProgram", 32 | "WebGlUniformLocation", 33 | "WebGlBuffer", 34 | "WebGlShader", 35 | "WebGlTexture", 36 | "WebGlFramebuffer", 37 | "WebGlVertexArrayObject", 38 | ], optional = true } 39 | 40 | [[example]] 41 | name = "render_to_file" 42 | required-features = ["wgpu"] 43 | 44 | [dev-dependencies] 45 | png = { workspace = true } 46 | pollster = { workspace = true } 47 | vello_common = { workspace = true, features = ["pico_svg"] } 48 | roxmltree = "0.20.0" 49 | 50 | [features] 51 | default = ["wgpu"] 52 | wgpu = ["dep:wgpu", "dep:vello_sparse_shaders"] 53 | webgl = ["dep:js-sys", "dep:web-sys", "dep:vello_sparse_shaders", "vello_sparse_shaders/glsl"] 54 | -------------------------------------------------------------------------------- /sparse_strips/vello_hybrid/LICENSE-MIT: -------------------------------------------------------------------------------- 1 | Copyright 2020 the Vello Authors 2 | 3 | Permission is hereby granted, free of charge, to any 4 | person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the 6 | Software without restriction, including without 7 | limitation the rights to use, copy, modify, merge, 8 | publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software 10 | is furnished to do so, subject to the following 11 | conditions: 12 | 13 | The above copyright notice and this permission notice 14 | shall be included in all copies or substantial portions 15 | of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 18 | ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 19 | TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 20 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 21 | SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 23 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 24 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /sparse_strips/vello_hybrid/examples/native_webgl/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "native_webgl" 3 | version.workspace = true 4 | description = "An example showing Vello Hybrid using the WebGL2 renderer backend." 5 | edition.workspace = true 6 | license.workspace = true 7 | repository.workspace = true 8 | publish = false 9 | 10 | [lib] 11 | crate-type = ["cdylib", "rlib"] 12 | 13 | [lints] 14 | workspace = true 15 | 16 | [dependencies] 17 | console_error_panic_hook = "0.1.7" 18 | console_log = "1.0" 19 | js-sys = "0.3.77" 20 | log = { workspace = true } 21 | vello_common = { workspace = true } 22 | vello_hybrid = { workspace = true, features = ["webgl"] } 23 | vello_hybrid_scenes = { workspace = true } 24 | wasm-bindgen = "0.2.100" 25 | wasm-bindgen-futures = "0.4.50" 26 | web-sys = { version = "0.3.77", features = [ 27 | "Window", 28 | "Document", 29 | "Element", 30 | "HtmlElement", 31 | "HtmlCanvasElement", 32 | "CssStyleDeclaration", 33 | "WebGl2RenderingContext", 34 | "MouseEvent", 35 | "WheelEvent", 36 | "KeyboardEvent", 37 | ] } 38 | 39 | [dev-dependencies] 40 | wasm-bindgen-test = "0.3.50" 41 | -------------------------------------------------------------------------------- /sparse_strips/vello_hybrid/examples/native_webgl/README.md: -------------------------------------------------------------------------------- 1 | ## WebGL Demo 2 | 3 | Uses Vello Hybrid with a native WebGL2 backend in the browser. This example does not use wgpu. 4 | 5 | ## Development 6 | 7 | Run with `cargo run_wasm -p native_webgl --release`. 8 | 9 | ## Testing 10 | 11 | In order to test this crate, you need to have [`wasm-pack`] installed. Install it using 12 | the steps found in https://rustwasm.github.io/wasm-pack/installer/. 13 | 14 | Thereafter, for interactive test sessions, run: 15 | 16 | ``` 17 | wasm-pack test --chrome 18 | # Navigate to printed URL 19 | ``` 20 | 21 | [`wasm-pack`]: https://rustwasm.github.io/wasm-pack/ -------------------------------------------------------------------------------- /sparse_strips/vello_hybrid/examples/native_webgl/src/main.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2025 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | //! Demonstrates using Vello Hybrid using a WebGL2 backend in the browser. 5 | 6 | #![allow( 7 | clippy::cast_possible_truncation, 8 | reason = "truncation has no appreciable impact in this demo" 9 | )] 10 | 11 | fn main() { 12 | #[cfg(target_arch = "wasm32")] 13 | { 14 | use native_webgl::run_interactive; 15 | 16 | console_error_panic_hook::set_once(); 17 | console_log::init_with_level(log::Level::Debug).unwrap(); 18 | 19 | let window = web_sys::window().unwrap(); 20 | let dpr = window.device_pixel_ratio(); 21 | 22 | let width = window.inner_width().unwrap().as_f64().unwrap() as u16 * dpr as u16; 23 | let height = window.inner_height().unwrap().as_f64().unwrap() as u16 * dpr as u16; 24 | 25 | wasm_bindgen_futures::spawn_local(async move { 26 | run_interactive(width, height).await; 27 | }); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /sparse_strips/vello_hybrid/examples/native_webgl/tests/webgl.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2025 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | //! Tests whether the WebGL example compiles and runs without panicking. 5 | 6 | #[cfg(target_arch = "wasm32")] 7 | mod wasm { 8 | use native_webgl::render_scene; 9 | use vello_common::peniko::{color::palette, kurbo::BezPath}; 10 | use wasm_bindgen_test::*; 11 | 12 | wasm_bindgen_test_configure!(run_in_browser); 13 | 14 | #[wasm_bindgen_test] 15 | async fn test_renders_triangle() { 16 | console_error_panic_hook::set_once(); 17 | console_log::init_with_level(log::Level::Debug).unwrap(); 18 | 19 | let mut scene = vello_hybrid::Scene::new(100, 100); 20 | 21 | // Draw a blue triangle 22 | let mut path = BezPath::new(); 23 | path.move_to((30.0, 40.0)); 24 | path.line_to((50.0, 20.0)); 25 | path.line_to((70.0, 40.0)); 26 | path.close_path(); 27 | scene.set_paint(palette::css::BLUE.into()); 28 | scene.fill_path(&path); 29 | 30 | render_scene(scene, 100, 100).await; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /sparse_strips/vello_hybrid/examples/scenes/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "vello_hybrid_scenes" 3 | description = "Vello Hybrid scenes used in examples." 4 | edition.workspace = true 5 | license.workspace = true 6 | repository.workspace = true 7 | publish = false 8 | 9 | [lints] 10 | workspace = true 11 | 12 | [dependencies] 13 | bytemuck = { workspace = true, features = [] } 14 | vello_hybrid = { workspace = true } 15 | vello_common = { workspace = true, features = ["pico_svg"] } 16 | 17 | [target.'cfg(target_arch = "wasm32")'.dependencies] 18 | parley = { version = "0.4.0", default-features = false, features = ["std"] } 19 | 20 | [target.'cfg(not(target_arch = "wasm32"))'.dependencies] 21 | parley = { version = "0.4.0", default-features = true } 22 | -------------------------------------------------------------------------------- /sparse_strips/vello_hybrid/examples/scenes/src/simple.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2025 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | //! Simple example scene with basic shapes. 5 | 6 | use vello_common::kurbo::{Affine, BezPath, Stroke}; 7 | use vello_common::peniko::color::palette; 8 | use vello_hybrid::Scene; 9 | 10 | use crate::ExampleScene; 11 | 12 | /// Simple scene state 13 | #[derive(Debug)] 14 | pub struct SimpleScene {} 15 | 16 | impl ExampleScene for SimpleScene { 17 | fn render(&mut self, ctx: &mut Scene, root_transform: Affine) { 18 | render(ctx, root_transform); 19 | } 20 | } 21 | 22 | impl SimpleScene { 23 | /// Create a new `SimpleScene` 24 | pub fn new() -> Self { 25 | Self {} 26 | } 27 | } 28 | 29 | impl Default for SimpleScene { 30 | fn default() -> Self { 31 | Self::new() 32 | } 33 | } 34 | 35 | /// Draws a simple scene with shapes 36 | pub fn render(ctx: &mut Scene, root_transform: Affine) { 37 | let mut path = BezPath::new(); 38 | path.move_to((10.0, 10.0)); 39 | path.line_to((180.0, 20.0)); 40 | path.line_to((30.0, 40.0)); 41 | path.close_path(); 42 | 43 | // Use a combined transform that includes the root transform 44 | let scene_transform = Affine::scale(5.0); 45 | ctx.set_transform(root_transform * scene_transform); 46 | 47 | ctx.set_paint(palette::css::REBECCA_PURPLE.into()); 48 | ctx.fill_path(&path); 49 | let stroke = Stroke::new(1.0); 50 | ctx.set_paint(palette::css::DARK_BLUE.into()); 51 | ctx.set_stroke(stroke); 52 | ctx.stroke_path(&path); 53 | } 54 | -------------------------------------------------------------------------------- /sparse_strips/vello_hybrid/examples/wgpu_webgl/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "wgpu_webgl" 3 | version.workspace = true 4 | description = "An example showing Vello Hybrid using WebGL2." 5 | edition.workspace = true 6 | license.workspace = true 7 | repository.workspace = true 8 | publish = false 9 | 10 | [lib] 11 | crate-type = ["cdylib", "rlib"] 12 | 13 | [lints] 14 | workspace = true 15 | 16 | [dependencies] 17 | console_error_panic_hook = "0.1.7" 18 | console_log = "1.0" 19 | js-sys = "0.3.77" 20 | log = { workspace = true } 21 | vello_common = { workspace = true } 22 | vello_hybrid = { workspace = true } 23 | vello_hybrid_scenes = { workspace = true } 24 | wasm-bindgen = "0.2.100" 25 | wasm-bindgen-futures = "0.4.50" 26 | web-sys = { version = "0.3.77", features = [ 27 | "Window", 28 | "Document", 29 | "Element", 30 | "HtmlElement", 31 | "HtmlCanvasElement", 32 | "CssStyleDeclaration", 33 | "WebGl2RenderingContext", 34 | "MouseEvent", 35 | "WheelEvent", 36 | "KeyboardEvent", 37 | ] } 38 | wgpu = { workspace = true, features = ["webgl"] } 39 | 40 | [dev-dependencies] 41 | wasm-bindgen-test = "0.3.50" 42 | -------------------------------------------------------------------------------- /sparse_strips/vello_hybrid/examples/wgpu_webgl/README.md: -------------------------------------------------------------------------------- 1 | ## WebGL Demo 2 | 3 | Uses Vello Hybrid with a `wgpu` powered WebGL2 backend in the browser. 4 | 5 | ## Development 6 | 7 | Run with `cargo run_wasm -p wgpu_webgl --release`. 8 | 9 | ## Testing 10 | 11 | In order to test this crate, you need to have [`wasm-pack`] installed. Install it using 12 | the steps found in https://rustwasm.github.io/wasm-pack/installer/. 13 | 14 | Thereafter, for interactive test sessions, run: 15 | 16 | ``` 17 | wasm-pack test --chrome 18 | # Navigate to printed URL 19 | ``` 20 | 21 | [`wasm-pack`]: https://rustwasm.github.io/wasm-pack/ -------------------------------------------------------------------------------- /sparse_strips/vello_hybrid/examples/wgpu_webgl/src/main.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2025 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | //! Demonstrates using Vello Hybrid using a WebGL2 backend in the browser. 5 | 6 | #![allow( 7 | clippy::cast_possible_truncation, 8 | reason = "truncation has no appreciable impact in this demo" 9 | )] 10 | 11 | fn main() { 12 | #[cfg(target_arch = "wasm32")] 13 | { 14 | use wgpu_webgl::run_interactive; 15 | 16 | console_error_panic_hook::set_once(); 17 | console_log::init_with_level(log::Level::Debug).unwrap(); 18 | 19 | let window = web_sys::window().unwrap(); 20 | let dpr = window.device_pixel_ratio(); 21 | 22 | let width = window.inner_width().unwrap().as_f64().unwrap() as u16 * dpr as u16; 23 | let height = window.inner_height().unwrap().as_f64().unwrap() as u16 * dpr as u16; 24 | 25 | wasm_bindgen_futures::spawn_local(async move { 26 | run_interactive(width, height).await; 27 | }); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /sparse_strips/vello_hybrid/examples/wgpu_webgl/tests/webgl.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2025 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | //! Tests whether the WebGL example compiles and runs without panicking. 5 | 6 | #[cfg(target_arch = "wasm32")] 7 | mod wasm { 8 | use vello_common::peniko::{color::palette, kurbo::BezPath}; 9 | use wasm_bindgen_test::*; 10 | use wgpu_webgl::render_scene; 11 | 12 | wasm_bindgen_test_configure!(run_in_browser); 13 | 14 | #[wasm_bindgen_test] 15 | async fn test_renders_triangle() { 16 | console_error_panic_hook::set_once(); 17 | console_log::init_with_level(log::Level::Debug).unwrap(); 18 | 19 | let mut scene = vello_hybrid::Scene::new(100, 100); 20 | 21 | // Draw a blue triangle 22 | let mut path = BezPath::new(); 23 | path.move_to((30.0, 40.0)); 24 | path.line_to((50.0, 20.0)); 25 | path.line_to((70.0, 40.0)); 26 | path.close_path(); 27 | scene.set_paint(palette::css::BLUE.into()); 28 | scene.fill_path(&path); 29 | 30 | render_scene(scene, 100, 100).await; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /sparse_strips/vello_hybrid/examples/winit/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "vello_hybrid_winit" 3 | description = "An example showing Vello Hybrid using winit." 4 | edition.workspace = true 5 | license.workspace = true 6 | repository.workspace = true 7 | publish = false 8 | 9 | [lints] 10 | workspace = true 11 | 12 | [dependencies] 13 | winit = { workspace = true } 14 | wgpu = { workspace = true } 15 | vello_common = { workspace = true } 16 | vello_hybrid = { workspace = true } 17 | vello_hybrid_scenes = { workspace = true } 18 | pollster = { workspace = true } 19 | -------------------------------------------------------------------------------- /sparse_strips/vello_hybrid/examples/winit/README.md: -------------------------------------------------------------------------------- 1 | # Vello Hybrid Winit Example 2 | 3 | Run with: 4 | 5 | ```sh 6 | cargo run -p vello_hybrid_winit --release 7 | ``` 8 | 9 | Optionally, you can pass in paths to SVG files that you want to render: 10 | 11 | ```bash 12 | cargo run -p vello_hybrid_winit --release -- [SVG FILES] 13 | ``` 14 | 15 | Alternatively, you can pass a scene index to render a specific scene from the built-in set: 16 | 17 | ```bash 18 | cargo run -p vello_hybrid_winit --release -- [SCENE INDEX] 19 | ``` 20 | 21 | ## Controls 22 | 23 | - Mouse drag-and-drop will translate the image. 24 | - Mouse scroll wheel will zoom. 25 | - Arrow keys switch between SVG images in the current set. 26 | - Space resets the position and zoom of the image. 27 | - Escape exits the program. 28 | -------------------------------------------------------------------------------- /sparse_strips/vello_hybrid/src/render/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2025 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | //! Provides renderer backends which handle GPU resource management and executes draw operations. 5 | //! 6 | //! ## Renderer Backends 7 | //! 8 | //! - `wgpu` contains the default renderer backend, leveraging `wgpu`. 9 | //! - `webgl` contains a WebGL2 backend specifically for `wasm32` if the `webgl` feature is active. 10 | 11 | mod common; 12 | #[cfg(all(target_arch = "wasm32", feature = "webgl"))] 13 | mod webgl; 14 | #[cfg(feature = "wgpu")] 15 | mod wgpu; 16 | 17 | pub use common::{Config, GpuStrip, RenderSize}; 18 | 19 | #[cfg(all(target_arch = "wasm32", feature = "webgl"))] 20 | pub use webgl::WebGlRenderer; 21 | #[cfg(feature = "wgpu")] 22 | pub use wgpu::{RenderTargetConfig, Renderer}; 23 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_shaders/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "vello_sparse_shaders" 3 | # When updating, also update the version in the workspace dependency in the root Cargo.toml 4 | version = "0.0.1" 5 | description = "Provide compilation of wgsl to glsl to support the WebGL `vello_hybrid` backend." 6 | categories = ["rendering", "graphics"] 7 | keywords = ["2d", "vector-graphics"] 8 | edition.workspace = true 9 | rust-version.workspace = true 10 | license.workspace = true 11 | repository.workspace = true 12 | 13 | [package.metadata.docs.rs] 14 | all-features = true 15 | # There are no platform specific docs. 16 | default-target = "x86_64-unknown-linux-gnu" 17 | targets = [] 18 | 19 | [dependencies] 20 | naga = { version = "24.0.0", features = ["wgsl-in", "glsl-out"], optional = true } 21 | 22 | [build-dependencies] 23 | naga = { version = "24.0.0", features = ["wgsl-in", "glsl-out"], optional = true } 24 | 25 | [features] 26 | glsl = ["dep:naga"] 27 | 28 | [lints] 29 | workspace = true 30 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_shaders/LICENSE-MIT: -------------------------------------------------------------------------------- 1 | Copyright 2020 the Vello Authors 2 | 3 | Permission is hereby granted, free of charge, to any 4 | person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the 6 | Software without restriction, including without 7 | limitation the rights to use, copy, modify, merge, 8 | publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software 10 | is furnished to do so, subject to the following 11 | conditions: 12 | 13 | The above copyright notice and this permission notice 14 | shall be included in all copies or substantial portions 15 | of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 18 | ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 19 | TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 20 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 21 | SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 23 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 24 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_shaders/shaders/clear_slots.wgsl: -------------------------------------------------------------------------------- 1 | // Copyright 2025 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | // This shader clears specific slots in slot textures to transparent pixels. 5 | 6 | // Assumes this texture consists of a single column of slots of `config.slot_height`, 7 | // numbering from 0 to `texture_height / slot_height - 1` from top to bottom. 8 | 9 | struct Config { 10 | // Width of a slot (matching `WideTile::WIDTH` and the width of a slot texture). 11 | slot_width: u32, 12 | // Height of a slot (matching `Tile::HEIGHT`) 13 | slot_height: u32, 14 | // Total height of the texture (slot_height * number_of_slots) 15 | texture_height: u32, 16 | // Padding for 16-byte alignment 17 | _padding: u32, 18 | } 19 | 20 | @group(0) @binding(0) 21 | var config: Config; 22 | 23 | @vertex 24 | fn vs_main( 25 | @builtin(vertex_index) vertex_index: u32, 26 | @location(0) index: u32, 27 | ) -> @builtin(position) vec4 { 28 | // Map vertex_index (0-3) to quad corners: 29 | // 0 → (0,0), 1 → (1,0), 2 → (0,1), 3 → (1,1) 30 | let x = f32(vertex_index & 1u); 31 | let y = f32(vertex_index >> 1u); 32 | 33 | // Calculate the y-position based on the slot index 34 | let slot_y_offset = f32(index * config.slot_height); 35 | 36 | // Scale to match slot dimensions 37 | let pix_x = x * f32(config.slot_width); 38 | let pix_y = slot_y_offset + y * f32(config.slot_height); 39 | 40 | // Convert to NDC 41 | let ndc_x = pix_x * 2.0 / f32(config.slot_width) - 1.0; 42 | let ndc_y = 1.0 - pix_y * 2.0 / f32(config.texture_height); 43 | 44 | return vec4(ndc_x, ndc_y, 0.0, 1.0); 45 | } 46 | 47 | @fragment 48 | fn fs_main(@builtin(position) position: vec4) -> @location(0) vec4 { 49 | // Clear with transparent pixels 50 | return vec4(0.0, 0.0, 0.0, 0.0); 51 | } 52 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_shaders/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2025 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | //! This is a utility library to help integrate `vello_hybrid` WebGPU wgsl shaders into glsl. 5 | 6 | #[cfg(feature = "glsl")] 7 | mod compile; 8 | #[cfg(feature = "glsl")] 9 | mod types; 10 | 11 | include!(concat!(env!("OUT_DIR"), "/compiled_shaders.rs")); 12 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/.gitignore: -------------------------------------------------------------------------------- 1 | diffs 2 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "vello_sparse_tests" 3 | description = "The test suite for vello_cpu and vello_hybrid" 4 | categories = ["rendering", "graphics"] 5 | keywords = ["2d", "vector-graphics"] 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | license.workspace = true 9 | repository.workspace = true 10 | publish = false 11 | autotests = false 12 | 13 | [[test]] 14 | name = "tests" 15 | path = "tests/mod.rs" 16 | 17 | [dependencies] 18 | vello_api = { workspace = true } 19 | vello_common = { workspace = true } 20 | vello_cpu = { workspace = true } 21 | vello_hybrid = { workspace = true } 22 | wgpu = { workspace = true } 23 | pollster = { workspace = true } 24 | vello_dev_macros = { workspace = true } 25 | bytemuck = { workspace = true } 26 | oxipng = { workspace = true, features = ["freestanding", "parallel"] } 27 | image = { workspace = true, features = ["png"] } 28 | skrifa = { workspace = true } 29 | smallvec = { workspace = true } 30 | 31 | [target.'cfg(target_arch = "wasm32")'.dependencies] 32 | wasm-bindgen-test = "0.3.50" 33 | web-sys = { version = "0.3.77", features = [ 34 | "HtmlCanvasElement", 35 | "WebGl2RenderingContext", 36 | "Document", 37 | "Window", 38 | "Element", 39 | "HtmlElement", 40 | "HtmlImageElement", 41 | "Blob", 42 | "BlobPropertyBag", 43 | "Url", 44 | ] } 45 | wasm-bindgen = "0.2.100" 46 | 47 | [features] 48 | webgl = ["vello_hybrid/webgl"] 49 | 50 | [lints] 51 | workspace = true 52 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 | # Vello Sparse Tests 4 | 5 | [![Apache 2.0 or MIT license.](https://img.shields.io/badge/license-Apache--2.0_OR_MIT-blue.svg)](#license) 6 | \ 7 | [![Linebender Zulip chat.](https://img.shields.io/badge/Linebender-%23vello-blue?logo=Zulip)](https://xi.zulipchat.com/#narrow/channel/197075-vello) 8 | [![GitHub Actions CI status.](https://img.shields.io/github/actions/workflow/status/linebender/vello/ci.yml?logo=github&label=CI)](https://github.com/linebender/vello/actions) 9 | 10 |
11 | 12 | This is a development-only crate for testing the sparse_strip renderers across a corpus of reference 13 | images: 14 | - CPU 15 | - WGPU 16 | - WASM32 WebGL 17 | 18 | The `vello_test` proc macro will create a snapshot test for each supported renderer target. See the 19 | below example usage. 20 | 21 | ```rs 22 | // Draws a filled triangle into a 125x125 scene. 23 | #[vello_test(width = 125, height = 125)] 24 | fn filled_triangle(ctx: &mut impl Renderer) { 25 | let path = { 26 | let mut path = BezPath::new(); 27 | path.move_to((5.0, 5.0)); 28 | path.line_to((95.0, 50.0)); 29 | path.line_to((5.0, 95.0)); 30 | path.close_path(); 31 | 32 | path 33 | }; 34 | 35 | ctx.set_paint(LIME); 36 | ctx.fill_path(&path); 37 | } 38 | ``` 39 | 40 | See all the attributes that can be passed to `vello_test` in `vello_dev_macros/test.rs`. 41 | 42 | ## Testing WebGL on the Browser 43 | 44 | Requirements: 45 | - on MacOS, a minimum Clang major version of 20 is required. 46 | 47 | To run the `vello_sparse_tests` suite on WebGL headless: 48 | 49 | ```sh 50 | wasm-pack test --headless --chrome --features webgl 51 | ``` 52 | 53 | To debug the output images in webgl, run the same command without `--headless`. Any tests that fail 54 | will have their diff image appended to the bottom of the page. 55 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/bevel_stroked_rect.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:b91138ddaaeea2cb5ddead2021b09c5979a643a930f5b36d26e65bca8ca4421e 3 | size 140 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/blurred_rounded_rect_large_std_dev.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:cffe311f879a12bc0a69b0835fe0132dfe103a38881cda2759647a4aff75a1c8 3 | size 2731 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/blurred_rounded_rect_medium_std_dev.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:85c24a0a05ebe5bcf992158e4c9eea308d04ce80bc4bdf41b8592a4c2bb39ea2 3 | size 2088 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/blurred_rounded_rect_none.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:645af102d301dc098f4447514bed87a9cde8a9a921f381c9068b78e8b82af614 3 | size 103 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/blurred_rounded_rect_small_std_dev.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:943f6abb5c7e6a9bf6e572498f5190ad117ca0f522455d7571498473cb296567 3 | size 1073 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/blurred_rounded_rect_with_large_radius.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:af1cd2bce091aa93dfcb5b9a7881fddbee50d4df51ad68740d3178cc07f55eb4 3 | size 2903 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/blurred_rounded_rect_with_radius.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:052ab40cdbf12631c7891c9bbdb3fe10bb367ef779e23b4059121397cfaf0d7c 3 | size 2282 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/blurred_rounded_rect_with_transform.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:d97a4cc2bdbb9e01e7c1e5a2c78f0757e0d8588faa0c9ecfe3ad65256ac74cff 3 | size 3686 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/clip_deeply_nested_circles.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:3b82eacda120728d5d27b5a65d638f7f7cf077785af12b87adc83a55cb1616f1 3 | size 5693 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/clip_rectangle_and_circle.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:bd25ec180d8d57f8a7793ce14f6e82ee900f2bd3c7fd70b869ca11b149e675cb 3 | size 722 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/clip_rectangle_with_star_evenodd.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:6aef5976250fcb517718c06c045da9cd052b8a52c2902026a9217bfdc8ae18b9 3 | size 840 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/clip_rectangle_with_star_nonzero.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:100aebc47f61d7b13c70757c111d29c414c12905a81b13643dfb496b4e19f7d3 3 | size 723 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/clip_single_wide_tile.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:0e132702668d75143d7e60789ee0bd1b909f40f367dd6869f6a6173a72c7b281 3 | size 106 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/clip_transformed_rect.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:a8aaf43c78d67053aa2c4103af4917ebf986dfafc5ba76305eb63846306074e8 3 | size 308 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/clip_triangle_with_star.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:11eadc9827bfdc3c92d162004266e0bdacb0391f0593e86e37e6be559d7b0876 3 | size 1516 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/clip_with_multiple_transforms.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:8a1ca895a065ee1bd1692126036afd3ed763e3847ed3120539f3b836da548473 3 | size 443 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/clip_with_opacity.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:7391f11d02b89498a76ad22ceceb719b5d5ff3d857c4dc3f705bcb40667b5d98 3 | size 131 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/clip_with_rotate.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:6635e2a8264933d03e800c14cd366fb48881df3d82754a2aca54ababf1bd352c 3 | size 352 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/clip_with_save_restore.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:5b6b9039dbb9135f6721baa3a0185f17cf021b7624de8e0dc857e7fb973c1788 3 | size 380 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/clip_with_scale.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:37bce430184b186b7ce1e3c002b0c3595ee3c0ad79b92b8ceb05a5347a39d1e9 3 | size 125 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/clip_with_translation.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:9dda4f0c1780b682f18c1f1c028302e735bd417478fb9e071351ed3c6dd78a8e 3 | size 125 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/compose_clear.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:56f57423e0ff37d0284ae02f3dfa6ceffad893302f86b5aa4d17dabb5ba1b25d 3 | size 82 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/compose_copy.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:921a77336d03383eeeae186907d7b322849c0a67299d8c6dc749321426ba410c 3 | size 103 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/compose_dest.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:059e2689072418af7aaffffd9321234093c437e0e3df37ae91acc95d149d118a 3 | size 102 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/compose_dest_atop.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:d2f43ba78eb5ae968b17658a3ef53046e318dfe51af88e1a5e447d8464ee51dd 3 | size 125 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/compose_dest_in.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:41116f36e630dceb4549ab929872b94193aa8f08380ec518c4b7733396a9638f 3 | size 103 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/compose_dest_out.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:91ca22bf393e8221e814107839fed2d57cf62b456e8438a7cdf43857270939a7 3 | size 106 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/compose_dest_over.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c492c6f7211581277324a1ed431f2314d3f20b7549c6e9efe3fa070eed5bb1f7 3 | size 130 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/compose_plus.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:1aa13d91a796f3dc6d90a0f6588ba1ea510ab8c91000a7994dd42be8509e9e60 3 | size 129 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/compose_src_atop.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:feb33331a1d8644178cd753657f610777c5186a84e981c323955d7424ee33ce0 3 | size 120 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/compose_src_in.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:3eaf0202a94d482dfc475a6f273644b3c00d4b1e7e703fe43fb88034b5f64689 3 | size 103 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/compose_src_out.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:4ed6a4401157e7aa1522c9b4f81d53081dec364022a55961d3675b7b41e49c27 3 | size 108 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/compose_src_over.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:370d186540ce5c7b9236acb544032a738584cdd7b352b8a8ebfc6ebd2d5934a6 3 | size 121 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/compose_xor.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:1aa13d91a796f3dc6d90a0f6588ba1ea510ab8c91000a7994dd42be8509e9e60 3 | size 129 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/eo_filling_missing_anti_aliasing.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:18fa5af2e5279deb475be420e2772cd9a82e77dc025c108bd61f8bc569938501 3 | size 213 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/fill_command_respects_clip_bounds.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:0ce47e8dfe449ec3eb487e353956e24f679f7ab6d4465f99ed58eb8ca8a5aca4 3 | size 189 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/filled_aligned_rect.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:3a2ca4e040b4ad21e0e9fa66686d3adbec1f0146c9a99b4e962e6a716a23a9cb 3 | size 94 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/filled_circle.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:b5b50c74e7d20183c81ac22bcfdbb331524f016f0ff63e43a2c0299f437a6ddf 3 | size 652 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/filled_circle_with_opacity.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:03e56bf9d2e0cedddf2eed156831fb0eb564df93a07d002e9cbd90d89b49401c 3 | size 635 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/filled_fully_overflowing_circle.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:370f6acde4d6770f06ce24137d209c71cbc8ebd4ca07c5e3e4d9f7186876af09 3 | size 91 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/filled_overflowing_circle.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:74536443369bf9bee1bad54c7b76e8b95d138b0133563b13f76a824f0f622bd9 3 | size 583 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/filled_overlapping_circles.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:fb1502f92803efc2400121a7741f35185860e23af786882f7091b7a35dcc2ebd 3 | size 1944 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/filled_transformed_rect_1.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c4ffe18872d99224fa7cb98e9d381448a42257dd7ab465421edb01a8fdb9b736 3 | size 92 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/filled_transformed_rect_2.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c4ffe18872d99224fa7cb98e9d381448a42257dd7ab465421edb01a8fdb9b736 3 | size 92 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/filled_transformed_rect_3.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:3e7d4422bda98262f9ce1038f6d7be2d2f8b059f20aaade04051d28bd9082c7f 3 | size 94 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/filled_transformed_rect_4.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:838a7575eabd073ebf6bb4f6dcfd26d1d447e650be9e65e056c9be511f99b74c 3 | size 133 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/filled_triangle.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:7ca969d2d1ef83e8290fc25de021a69e0b9fac7fe32aacc7a2c682f546d9f71b 3 | size 260 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/filled_unaligned_rect.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:4aa25a278f8fc9101f42f2b1ff44b69e64308cd4e72abb8aa9b86b032e3e2984 3 | size 108 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/filled_vertical_hairline_rect.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:07c4457a692cb26c12d94579eae5811f0db4b929035914cf356fcf40ddf82715 3 | size 77 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/filled_vertical_hairline_rect_2.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:3c77ff16411446b8894ca0477b2448a43dd6ef5da7d0f488056e1d647ea63b9a 3 | size 88 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/filling_evenodd_rule.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:2600bf4b5b2aef9495e2dfac6b1bc18b834139206694a8c585971d55495114a2 3 | size 840 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/filling_nonzero_rule.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:bdf5f6a7e865d1cafed4e9393c56c2bc596328257f3274a200c94356ebea73c9 3 | size 723 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/filling_unclosed_path_1.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:3a89a3e8cfc432077b9b03fde0d3d3a9d1791a6ef6b15f4d1a86deb8d78f1f0a 3 | size 198 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/filling_unclosed_path_2.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:ac02e9501d077fa6cd57bf7913324f87645cd8519bd1982243296b00e7b38fc6 3 | size 196 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/full_cover_1.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:be89580e1e064c90f7773de4442a2dd105c0d2200f3000160de2f07246e20f06 3 | size 74 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/glyphs_bitmap_apple.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:88b2d132ac8dfee79861b7078bef9678fcfd36b5cdb338e4b1342acfd73f78d7 3 | size 14012 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/glyphs_bitmap_noto.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:42c171625da5fcbbb9037fc45ec81c884abbda617bea8b8f41496f60456e3a78 3 | size 10033 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/glyphs_colr_noto.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:75b1fd6615aaf9ccca7e52ff93e9c715436c85469e85b2346f7ad9b211c04e15 3 | size 9921 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/glyphs_colr_test_glyphs.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:8522efbb591d00dbc9004e8ca7db3b1b58de28787a1d056597a01491a0ec02c9 3 | size 114847 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/glyphs_filled.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:d04433f79b627b11a8c0d67f3699c3fb3ef81d3485b50a07a234815be886b4bf 3 | size 2409 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/glyphs_filled_unhinted.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:0d8978f01cd3a2ddb2ebc266b2e7253c893ed6b5d587ad970c8379997ee8e6ee 3 | size 2530 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/glyphs_glyph_transform.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:417a56a235811505fd50afb0155f6d25f49b41069a42aba436d7cac6fb131cb9 3 | size 2200 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/glyphs_glyph_transform_unhinted.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:4947658a1427743f895f54999c424044506bb1c4d1e6c4a360c94761865c10c2 3 | size 2315 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/glyphs_scaled.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e534019a6743bc3624712b5f199e9ed3b561a51eaf39e92f4fffbfb55132fddc 3 | size 2384 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/glyphs_scaled_unhinted.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:4e0b175c7d284cc6f8bacd7def7f05b4b94c169844a088ed80ad79e0d3893aca 3 | size 2529 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/glyphs_skewed.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:6a21c3467032cb8676bf4f61314b8cde596b112878c36cc2f9307e853041c515 3 | size 3163 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/glyphs_skewed_long.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e9889d20e42612d8945337ce9369736bc599b9c907320a8a7f975d56e40ce845 3 | size 5791 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/glyphs_skewed_long_unhinted.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:a90efd56c92992938dbda50ff8ca40995287b45c9d8ec4f4f0daf55a8e9af1c1 3 | size 6221 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/glyphs_skewed_unhinted.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:3023eb2693edba4081811430b029c3d6410033b9d9c4819c024368f3125b2ddc 3 | size 3307 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/glyphs_skewed_unskewed.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:fbee1f50a10a7da10770a12e74eda22a06d067d1b235e77e5f91819ddfe079a7 3 | size 2468 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/glyphs_skewed_unskewed_unhinted.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:f748b6b9ad162ad47c94507f5e820d48944eb32f67b34af1edfc256c4ba3ca59 3 | size 2648 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/glyphs_small.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:09cee718b28686b4a00068e9e419cb8b5d9b0d12816312e38c0402aa707e2e2d 3 | size 647 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/glyphs_small_unhinted.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:0bb9c0256beeb0e16064d453b52418eaec4d5e27a5d4ecf364f46c6e5f77f568 3 | size 749 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/glyphs_stroked.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e8067a86b1c80a1ed369a2a50d0e01f9ff9576243d3471295a814340299a1388 3 | size 3333 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/glyphs_stroked_unhinted.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:3ad0d327244090a8be46f84937eeb13ffc25c056cc4fb6ef9960decb1cc745c3 3 | size 3427 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_linear_2_stops.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:4b732615aea40791cffb2a9cd51b7b78c38459d61c5e0b6a168b6d7fad4cffb5 3 | size 253 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_linear_2_stops_with_alpha.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:d26eec58a33df98df1a11264f9b5e212c02cebecad38970288de110b669b6fe4 3 | size 258 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_linear_4_stops.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:a399199bb90a43ce17e2c4514979b40737ee01e2dc128d650fa5fad8cd2a642d 3 | size 278 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_linear_complex_shape.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:920779fb61d458b5bf6d47dec8493d0394b98f7790a0fb854b241fb23ad9ed0c 3 | size 1739 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_linear_negative_direction.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:470193516fd3d877746b42425ece271c1a32e67f5e2ff96a0416ccc45d7b71fe 3 | size 255 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_linear_spread_method_pad.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:0879ae025f8f584b8ae76cdd44f570018102126b51754bc43bb4aa11617b7db6 3 | size 405 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_linear_spread_method_reflect.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:646735af1edbda0d26da828e9a8940ae77d5d79e9d36057c41b4f156ac9e5c73 3 | size 507 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_linear_spread_method_repeat.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:174bc7852598a97c4e4e94571d8844806d3f1a9871bca5dee342feaa3297db60 3 | size 498 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_linear_vertical.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:7b18b0de7ecdaf437720fe23e6ab0af6c0933f3e73e4777397cd0da809f5b06f 3 | size 278 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_linear_with_downward_y.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:2317947f304b0fb875a90a60ad0822e8ea73b8f4159d5974a6332525cc9fafe3 3 | size 469 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_linear_with_transform_identity.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c9d0d94a0309f741651f9387b4ed50d44a9cb4b949a01f27402c014a108177bb 3 | size 438 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_linear_with_transform_negative_scale.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:2d1bfc56f006a5051fb9f4e8e81a25e26cf657bb58a8507c9f521afd7c39d198 3 | size 444 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_linear_with_transform_rotate_1.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:57252a478833e819671bb7811cfc28d0f7ec8addf475e0639344261882d0e9d0 3 | size 1277 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_linear_with_transform_rotate_2.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:1d2f643f0bbc6f4b3db0ec98d34643e3b959d977243b22c813d23acd1f8d68b3 3 | size 980 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_linear_with_transform_scale.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c9d0d94a0309f741651f9387b4ed50d44a9cb4b949a01f27402c014a108177bb 3 | size 438 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_linear_with_transform_scale_and_translate.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c9d0d94a0309f741651f9387b4ed50d44a9cb4b949a01f27402c014a108177bb 3 | size 438 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_linear_with_transform_scaling_non_uniform.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:725b5198f3b2f2f33ce3a02b28ae63d79884b422c02daee3330cd493477b1a7a 3 | size 533 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_linear_with_transform_skew_x_1.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:aefe3d40515ddb5b57277c7e611fb35d3263f2252f86927349be658160f03073 3 | size 917 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_linear_with_transform_skew_x_2.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:772223310073d166ad0cd76b380284102971cfa33574a5e095641878dfd00a8b 3 | size 917 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_linear_with_transform_skew_y_1.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:391f6418273d009b99d9b9b01bb324f8eed57783b692e3b719efdb12a8bd11c4 3 | size 1107 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_linear_with_transform_skew_y_2.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:64f6916f7e5a9cfc26d4fb5a52deddd53c42a4df3a5d28f9c57ff8bbe12159d3 3 | size 994 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_linear_with_transform_translate.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c9d0d94a0309f741651f9387b4ed50d44a9cb4b949a01f27402c014a108177bb 3 | size 438 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_linear_with_upward_y.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:bb6b4f173c6c16ec669da55e34172575a735c3971bc8ff3b41c2a7f611cfad83 3 | size 431 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_linear_with_y_reflect.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:79079cc1f82296a390d74364b5d3e619cb063dde0f3137923e4e4e242effaee5 3 | size 584 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_linear_with_y_repeat.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:323babb80602f5d33f601a9bf152071d78e87b970ac0fe2c0ab4e322c7c99798 3 | size 563 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_on_3_wide_tiles.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:5c828cbc6d1b7ab1d78ebe53a585e513d6e5f761313828e6e9afccd96f717465 3 | size 282 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_radial_2_stops.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:90357e1358e9402a0c0af9e3cfac95dcbe0c023fcb6defd6729f88dfa85b30c0 3 | size 1588 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_radial_2_stops_with_alpha.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:6e15c28e56d7c9480efb3912a6e35eddf8deb79be8c3db569123ed0412ce2341 3 | size 2139 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_radial_4_stops.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:9cb8f6825592ecc0f2fbebe03bc3e1579e287ec98317c9598faf99f2c58246d7 3 | size 2429 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_radial_c0_bigger.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:80c7daa5e7119f64dd27b081cb4b6272befca0bd058008db40b101163a6d4c8a 3 | size 2666 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_radial_center_offset_bottom_left.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:b9a06bc877f59e12807d5a53995b11cace330296a1812800ae8405f57bb4e49c 3 | size 5167 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_radial_center_offset_bottom_right.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:7bb1e8e716e32bff948e86ab9f896626d688b7747d46143d18d4cc99ca553042 3 | size 5263 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_radial_center_offset_top_left.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:66a54d93b9ff9cb9e3d74ab4b1bea6211cd7aa9cf12e231cd6fc24b49f07f918 3 | size 5114 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_radial_center_offset_top_right.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:ae3adc3f13790bd8e99d515f4375174e74173b72056a4c0fa4e357436182a88b 3 | size 5190 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_radial_complex_shape.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:5533536e0b84875413da4ff33dac94aa218751f09d2dcbb1ea9452d5eb773ea9 3 | size 3091 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_radial_focal_on_circle.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:230ebbf5de0621277494ec3078c403d6fbbf275d9127429c9b91433c19c420c7 3 | size 1288 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_radial_natively_focal.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:50fdf6f3475ab8a3773637e2a132ca8628f56bdb9d65dedb062b017d073deccf 3 | size 2555 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_radial_non_overlapping_c0_larger.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:4320b83140ae09738c930748048ceea56c1f43c7eef9e8b5fd3521ce5a26dcc4 3 | size 1094 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_radial_non_overlapping_c0_smaller.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:33615322d2adaac25b7bda36707b59da2171746ddf84d311e169dcd4e9551ef8 3 | size 854 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_radial_non_overlapping_cone.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:2aeb482a1b6344b39146f589ec81b869b79ec5a8eb7833cccda6df54fb116aa9 3 | size 727 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_radial_non_overlapping_same_size.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:f1bd2452852fbfa9fabdad0e70cdfd812f5b991c7e3697a869187b6e97417d27 3 | size 706 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_radial_spread_method_pad.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:8cee9cb9a665faff06e92545225cf71edb9197fc1c005a077d7866d42dbd4046 3 | size 787 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_radial_spread_method_reflect.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:23d1fefa551aea3fc7b3b0c4291248a3b9ae9e73d7df99ccda98194e18fa06c1 3 | size 5608 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_radial_spread_method_repeat.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:29347579d39e1abb4571228321db6c4b3d5e050517fa73ddebcc3c4c7a51361c 3 | size 5483 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_radial_swapped.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:60db9983faa2076cf9b12baeffce763efe54bd350bdd0aeaef99deff0d9cd49f 3 | size 2521 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_radial_with_transform_identity.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:b446bcc59b9f775328e845d2742d6d7ef3fbcdfc3334346b246121e6c7d4c7b6 3 | size 2006 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_radial_with_transform_negative_scale.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:a1d80b40caf9fb118a1feb20fccd831179a8946f577e5a77457cacbc105f5db0 3 | size 1761 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_radial_with_transform_rotate_1.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:05fae5115137b04d0b0864a443be51cda2f3aa976af38faafed3f1e5972815cf 3 | size 2108 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_radial_with_transform_rotate_2.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:05fae5115137b04d0b0864a443be51cda2f3aa976af38faafed3f1e5972815cf 3 | size 2108 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_radial_with_transform_scale.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:a1d80b40caf9fb118a1feb20fccd831179a8946f577e5a77457cacbc105f5db0 3 | size 1761 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_radial_with_transform_scale_and_translate.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:a1d80b40caf9fb118a1feb20fccd831179a8946f577e5a77457cacbc105f5db0 3 | size 1761 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_radial_with_transform_scale_non_uniform.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e46483edf8c75d3706c003765d55f678e0660985158da1fe54f2c3897a92e02d 3 | size 1718 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_radial_with_transform_skew_x_1.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:01d34bd311025882427538014ee1ba2b4c9f38fc8554122a120ab6e2f559b03a 3 | size 1963 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_radial_with_transform_skew_x_2.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:06709267f0cc68a8cf925f59218c38c37d028d811788a0dbe680ede28b40d1a3 3 | size 1952 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_radial_with_transform_skew_y_1.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:b46cb34c304e22c7c2643531219d52cdf4d5fd77e770983c07f808801e7cd6a8 3 | size 3266 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_radial_with_transform_skew_y_2.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:67972a0b92865f7192e6df4000b874fc7b56c5e339d9a987d99cbd5c3ddb8b31 3 | size 3308 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_radial_with_transform_translate.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:b446bcc59b9f775328e845d2742d6d7ef3fbcdfc3334346b246121e6c7d4c7b6 3 | size 2006 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_sweep_2_stops.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:a2ea92e380f3082c220fe8a5d4b61f9228c6d7384c8aacab5eb5ba3cb95f5ef7 3 | size 1765 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_sweep_2_stops_with_alpha.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:2af1a5afc9ce3f62707d2925cf5381b6b3154ef847ae773e866c645c3ebc984a 3 | size 2972 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_sweep_4_stops.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:5b1c3b731083b6d72dc2c374fd768ebdac2cbe32a9f72996d9a21159cd4e35e8 3 | size 3077 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_sweep_complex_shape.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:a9141ebeba7681e5dde8d3a336c3805decd8a38c0daf99e58539f41fd19325f5 3 | size 3169 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_sweep_not_in_center.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:fe4dac1717e700674229a9f5c0d758cfad73bf4dbf727aab0e22fa7c1be34e1f 3 | size 1853 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_sweep_spread_method_pad.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:2478cb0ab6d2269914e8ec7bab8536a8584877f2af155b36bd4153572fa84eb3 3 | size 1307 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_sweep_spread_method_reflect.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:331bee1d37405b79b4df94067a9cab57ca0c18b4c14d92021bfc1dec4e795584 3 | size 5840 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_sweep_spread_method_repeat.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e0daef9ceeacdc0db84d356784450952ebd800a20f4755bd7fd7eb4ef28afdd2 3 | size 6297 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_sweep_with_transform_identity.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:af619b9db9fe7c96bbc07142c177add28111e8d5390b05c9de9e5207631e0d3a 3 | size 872 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_sweep_with_transform_negative_scale.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:2d36ef6a96decb18389ec90b9d618633268e855e0c63040f9954bb7cc9f29109 3 | size 840 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_sweep_with_transform_rotate_1.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:29b56c78edf877b6bb424b1ad3946b11e2331e8c937684bb1cc2afb8d904bc60 3 | size 1842 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_sweep_with_transform_rotate_2.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:12a07084d4865628fc827403a9709f5cae13adef7361cb64137b3a760b08889a 3 | size 1851 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_sweep_with_transform_scale.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:af619b9db9fe7c96bbc07142c177add28111e8d5390b05c9de9e5207631e0d3a 3 | size 872 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_sweep_with_transform_scale_and_translate.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:af619b9db9fe7c96bbc07142c177add28111e8d5390b05c9de9e5207631e0d3a 3 | size 872 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_sweep_with_transform_scale_non_uniform.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:60866c5d4ca573397e90bcfe06f9e9937eb49fe92910242f4ccfb8a385324d12 3 | size 1208 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_sweep_with_transform_skew_x_1.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:6bf871f134e7a3c9249d185213ea088bb9006b205e192f070e73709c017da84e 3 | size 1154 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_sweep_with_transform_skew_x_2.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:abcda7d132372ea29c8c6ed94398abd7ec24366d9d6afa20611c6dc00c7f1cc1 3 | size 1101 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_sweep_with_transform_skew_y_1.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:bf47108286953cf9c402bbf49d95b5189755d43c47fb9a62b5beccf512d6dd4f 3 | size 1194 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_sweep_with_transform_skew_y_2.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:745627a01321faafa36851961dc8b548ee707bd0b377650888b186cae5b8d99b 3 | size 1226 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_sweep_with_transform_translate.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:af619b9db9fe7c96bbc07142c177add28111e8d5390b05c9de9e5207631e0d3a 3 | size 872 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_with_color_spaces_1.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:7e6ee3d064228de36d147ca2351284cf37ce1c727f46d0c019cad36f38c9758c 3 | size 271 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_with_color_spaces_2.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:ee3bfd9de54b32388395a8ae8d764a0e6291912a83f221cb042464f49cf48d8b 3 | size 621 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_with_color_spaces_3.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:7bee0b53132084a0c0ef2df2dbc1c0ed51b5926f75821307dde7236a8a5726ef 3 | size 702 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/gradient_with_global_alpha.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:bdf7659803a44a9dcfbab985bbaa01d95916f907cd22a684a607f2f184a84a8c 3 | size 279 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_bicubic_10x_scale.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:120e923898552c1135db0bf56ca572669977e0f4f32979561a659bf6c2d2c7bb 3 | size 1896 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_bicubic_10x_scale_2.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:431358c15d2870aeae87edc2e467c72253a592a05595364283f31b7637074760 3 | size 2604 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_bicubic_2x_scale.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:cc8fe6cd1596679ed0a26012936ec2c4153988ea8b6f9d74240246aac9f353b1 3 | size 236 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_bicubic_5x_scale.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:052b7577732da50b010491a7865135789a15b27a76786d60d1088ce92d3c6ab7 3 | size 584 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_bicubic_identity.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c138195844e69298a60ee41f81c624db4f529d5e201d9254b9e554c3658de9e0 3 | size 151 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_bicubic_with_rotation.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:1fa5377b73650912f2653208cd49340705bc9a1b522915e7f0c4c44533052d06 3 | size 12716 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_bicubic_with_translation.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:52e9abf295f3a8e083c685dc8a41f4f39623f6b8b69b9a1c5f6ba3ed9287032c 3 | size 644 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_bilinear_10x_scale.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:0633d3f7c56e695d09b66852f038be683a627fd31ee626b8256a8585eb52cb0c 3 | size 834 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_bilinear_10x_scale_2.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c8bcbd506717e24ae98fb5dce94a2e8c4b40807da6e209b0c8080650f9ea7c76 3 | size 1378 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_bilinear_2x_scale.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:ad50015f270247b7a68b57dbfbf8464165c65920fe6910093e38c9b79b5668cf 3 | size 236 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_bilinear_5x_scale.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:9d29295e2fcd3d508aec6cf11a81353c25d1ba8a3e830e15a64f4c7c4d8068c2 3 | size 365 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_bilinear_identity.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:0766ff15fdf0f6bfe8660d98c06b969a28834dd5b859e7c738da2830bcd3e74e 3 | size 151 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_bilinear_with_rotation.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:fcc8281282e8f6f89bb1cb4e6879cbb7d4812cbbd9813c23b703d079ce22722e 3 | size 6956 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_bilinear_with_translation.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e91518858dc4a1f8fe34bbd9e7eab0246a18d797b935aef468ba049358ad589e 3 | size 365 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_complex_shape.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:60a710540050d9492787a3393575c5bc2c903f9c99f0e6cf803a5d647b655ad0 3 | size 1199 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_global_alpha.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:80361dd8b6b60829419f5d6b413536b38cb707b5a59c752f50b7b1dd76ac53a9 3 | size 152 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_luma_image.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:39de8f5a43bc96f0309e363293fbb35f37d19a1a199044fc55306292fd174dd8 3 | size 152 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_lumaa_image.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e0bdb672b8d45eb81d023039f34fb54c3e594c094e9b8463b9d2618ba9d9bb18 3 | size 154 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_pad_x_pad_y.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:385122f028251918f717348450dd3369b4cd8f5c695523c3335dfc5cbad3d50d 3 | size 141 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_pad_x_repeat_y.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:aeec94e34aa0ab79eeab6a81fb85943dc74b1f7aad2dc1062567b4a6750245c6 3 | size 148 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_reflect_x_pad_y.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:d580452ab65aaf697145866a3f332eb0a6cfe9d9aec379a06ae098d351da1957 3 | size 149 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_reflect_x_reflect_y.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:83892656c4dd506dd4304d2e981f05f8209716dbda1b8c26b3245a53946745e8 3 | size 157 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_repeat_x_repeat_y.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:8128b25335d8d0fe38c01430ac8d3faf15688734658418915e552ee8904de7ce 3 | size 152 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_rgb_image.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:8742a1ddbbbfadb84df8d7520989fec1472328d0cc6e9c300d421a17277a442d 3 | size 152 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_rgba_image.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:1b95b70ff1685b84e98b8b43eca5750b71497757fcc8f007a97d2a979ac5d23e 3 | size 154 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_with_transform_identity.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:002bba3c3816a1613590e6ad7cd08229638afa26a1242d027b9a99f5e3ce68b6 3 | size 150 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_with_transform_negative_scale.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:12d2185bd73c9d35385c5d42df5f8c07257bb19a62ece20d9443777fff2c95a5 3 | size 152 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_with_transform_rotate_1.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:9b26c87471adacba00494788000ef33dedfd22ff694bfe12cabab73366904dca 3 | size 606 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_with_transform_rotate_2.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:2887c89a2e19f9f7e38be1067ceaccf7141d3ef6a87c7ed5c03f9b36c429649a 3 | size 593 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_with_transform_scale.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:62e5cf71ed60d187b09b3366e196f4f3e12e5212f09edcb0b79985bd744ee90a 3 | size 152 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_with_transform_scale_and_translate.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:0ba1603b224725f26f27529b5f644c6ee3f96efab44ca42d08f63e17fec6d07c 3 | size 156 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_with_transform_scaling_non_uniform.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:ea18454ae71ef2addf89ea0ddc7278db9036d9fe92cb40a04b174eea57e9946d 3 | size 149 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_with_transform_skew_x_1.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c8254c076f4696a530fb15126ec7d2f4f742db8669a98d606441eed269a1122a 3 | size 167 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_with_transform_skew_x_2.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:3621a2ec080f47882f1c43436b72ecf80bc493fa56195926cda2850826d4b8e8 3 | size 173 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_with_transform_skew_y_1.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:4e4845f4b959226b1a0c43e7b91f6f2d145aa3215fb726ddbed712686fff7ce7 3 | size 394 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_with_transform_skew_y_2.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:fd39139982043996e84c1d220ddc58c7c6a58cb818ae46543d4b045bc1a4abf5 3 | size 383 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/image_with_transform_translate.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:b7743573b5b5b45057ac060d2dafa46b89f280948f93de60232e155dbb14c4a1 3 | size 149 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/incorrect_filling_1.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:4213f969a73ad625a16ddd1a91988da482cdbcad760288b8526d594afa464dd0 3 | size 103 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/incorrect_filling_2.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:33425230e99ebb2401c017bc1a8ff9c2ae8df30ce6268333afcffaf0ea50b60c 3 | size 96 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/incorrect_filling_3.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:5d14df7a3bbb91d23a7d25ea58895616418310f3474e92cd87caa13f66d25562 3 | size 111 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/incorrect_filling_4.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:40cb96fd76c9da7939f49485b8b702b6ee10aa27dd653b69adf172c15507fde5 3 | size 93 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/incorrect_filling_5.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:1f8d5d6a6618636c8fb64fb4f630559817c6d8a45137e705e81f031b17b2b478 3 | size 91 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/incorrect_filling_6.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:1f8d5d6a6618636c8fb64fb4f630559817c6d8a45137e705e81f031b17b2b478 3 | size 91 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/incorrect_filling_7.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:32b9440eb7b2f11776896ed7651f4101f03cb9d5c743392b305ca7a844610fba 3 | size 90 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/incorrect_filling_8.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:1f8d5d6a6618636c8fb64fb4f630559817c6d8a45137e705e81f031b17b2b478 3 | size 91 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/layer_multiple_properties_1.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:1e6df2ca569e9c33205a7e988bac698bc83fb8619374eb8b7ecc363904dec391 3 | size 1118 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/mask_alpha.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:bfab88ab1ab1180fd4e9f5577f4ff134add9b35bb90a2451e0f904d47dd7a1e1 3 | size 238 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/mask_luminance.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:4a4a0aa2a080280cad56eb084fbeb15adc2b41c56c442c0aa2de066a700c78a1 3 | size 256 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/mix_color.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:87680e4a6b519e35e6262520118b1418f0c5277c834aec64f9a67e255b12e672 3 | size 4591 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/mix_color_burn.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:b2b070bd548e8dc7eaa2fcf3b9343f03df72793b05afd1257ec10f374f5a92aa 3 | size 4023 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/mix_color_dodge.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:11f6248301424e82779f5a4fdbb71711c9e908cdfda58b814f63ce5ae9067dbc 3 | size 3989 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/mix_color_with_solid.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:5c6bccf8858565393aa0d8443ae46549ab75c3aa06c7a6a9fc3dbb3819f57b3d 3 | size 104 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/mix_darken.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:512675974ead6eb5a4d70bee0af6f6c6574900c64b49276535327a3b5219ebbf 3 | size 3977 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/mix_difference.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:bb95005381a73d90976ec273d74ce639bcd99bdf8de5aa34af9ee77c332e69b3 3 | size 4540 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/mix_exclusion.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:8b6d612ef6f50bd98f8b6fadec193886a199f45ee1a15f7d3dfe248899f9cd7a 3 | size 4369 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/mix_hard_light.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:b0bf4b72029eb2f4713431f1a8f9821ad23760a527e1b0ff8a0d41b1ee43af0f 3 | size 3674 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/mix_hue.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:3f254aff9c059f0fc8d5da3829b3b41b43f42caf788b568a0867f8f858aecf10 3 | size 4714 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/mix_lighten.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:d3c45781134783702856981698070b09c41d4cb3873309cc671a36e80a3ca8fa 3 | size 3921 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/mix_luminosity.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:ae9bb488041f3c60503aef307256d1d7d040c77c7572684096d577f7c1468bbf 3 | size 4087 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/mix_multiply.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:fae46dcdad3d037c50623adbb00032b0b05b1e028685151179a800f29243c958 3 | size 4184 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/mix_normal.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:eec268befc810629b6b0138182f84dd1becdac7dd6688dbfc59aba51114d019c 3 | size 3064 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/mix_overlay.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:7dd3662e4cb4fb16eed70f4b653e6a0093716c5662966dc7f040648e834d5c98 3 | size 4206 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/mix_saturation.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:ecd216b6dac089e4ec82660a85e1dd8389fc8f4de2a2e69e0690fc2d0b74d3e1 3 | size 3482 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/mix_saturation_with_solid.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:1810ae799f5f25cc975688d27062858b5d58f65f3332fd111b08179243b3ae6f 3 | size 104 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/mix_screen.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:af3fb74a4853be46dd838df1b77fb3ade89f469138219b2551a8e1ee282bd267 3 | size 3999 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/mix_soft_light.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e4b4f17728d9d6331ce874c11873a5a7e3d1d4d3c8273bc6076e4a9283959b96 3 | size 4488 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/mix_with_transparent_bg.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:ed6d22cc3b8c35f56c76948762fd1bc85cbc792b9515fb448a3d9417999c4e19 3 | size 117 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/nested_clip_path_panic_2.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:91df01ad3fae2cb2034fadc75d9f32af6bdbcb7b4631577408191b8913ce0af0 3 | size 95 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/opacity_nested_on_layer.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:64fc2ddea367996f4e2e6fdd9c70db522895bf08258e5340c73d3bc4f30cf709 3 | size 136 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/opacity_on_layer.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e697b26d3309221de5f7c1f20c8e75ddd5eafcb32b635885fc8d52426e972a2b 3 | size 1326 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/overflowing_stroked_rect.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c4ffe18872d99224fa7cb98e9d381448a42257dd7ab465421edb01a8fdb9b736 3 | size 92 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/oversized_star.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:5cb3e3ec6a1f047c2e9c805a2cc7ead68660ad3ebb4dc141010746d2a485550a 3 | size 1770 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/rectangle_above_viewport.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:1e4addaf416903e6e8c460459f2d41666eeaf7d7ccb2750ee927bf90f9e90182 3 | size 83 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/rectangle_left_of_viewport.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:ee9905a1766aa6f91d840f8a711bdbe8583c6b740ecab26e591d032b648db762 3 | size 80 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/round_stroked_rect.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:df1d34cd3229747da2b22886d5c745c0ca51e5f32eda725ae4dffc1e1413d11b 3 | size 134 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/strip_inscribed_rect.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:6daccaec096ae9f6c2926d31a545eaf29059a423262e7d9ec641987c0c126bf4 3 | size 106 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/stroked_aligned_rect.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:65e55dd01cfbb06d05562adf34dbd1e95fda6898ab797da96f8ed7fef6c93551 3 | size 101 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/stroked_circle.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:6432987537aec2f12b534522f1f51a0a402eb8a08f550e928462ec536d78aabf 3 | size 1009 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/stroked_transformed_rect_1.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:da038944af04e03a2d262cacfcd415c0e9e33d36bd89ce554c7ea5938039ee2c 3 | size 98 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/stroked_transformed_rect_2.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:d1e22b5d65f52e43711eecb527df6f5218fe5b2d06e55b6cd24e3c507d2356a3 3 | size 98 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/stroked_transformed_rect_3.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:7d08142b6aaba4222fb87ff5fbc415005cb7992acd76390a76f1dd3303cfb0ef 3 | size 101 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/stroked_transformed_rect_4.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:d7dcd7611901c4e545bc26aea43938df63477290655c6908ba41cd3cb5a79d39 3 | size 173 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/stroked_triangle.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:17a84ac769d18e19602f2c3fcd9e78757ef24b43b405a5397ec8e70429171c7a 3 | size 364 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/stroked_unaligned_rect.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c77f220f48b8766f19979f1b438da6c472e90de00cd35e131eabc70b1e99d6b9 3 | size 117 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/stroked_unaligned_rect_as_path.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c77f220f48b8766f19979f1b438da6c472e90de00cd35e131eabc70b1e99d6b9 3 | size 117 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/transparent_paint.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:5df0da52aaba923344202c1e30e377e11cce5ceef303d4dc1c460078637e908c 3 | size 98 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/triangle_above_and_wider_than_viewport.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:32d911028639ca2fdc697fd6ec269cf0668a438923070293c750a7a9e991f3dd 3 | size 86 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/triangle_exceeding_viewport_1.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:02678cc80f64c9e592577aefa960f82f024f1c1d0e10fd69ca075f1bb3a3b690 3 | size 174 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/snapshots/triangle_exceeding_viewport_2.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:3e22054877f82070e573546b3549eea8a3a9bf22e5ad5f08ca4b3d8929683792 3 | size 168 4 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/tests/assets/cowboy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linebender/vello/33f4be83cedd7de855553ca9c5465a181ce32fea/sparse_strips/vello_sparse_tests/tests/assets/cowboy.png -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/tests/assets/luma_image_10x10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linebender/vello/33f4be83cedd7de855553ca9c5465a181ce32fea/sparse_strips/vello_sparse_tests/tests/assets/luma_image_10x10.png -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/tests/assets/lumaa_image_10x10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linebender/vello/33f4be83cedd7de855553ca9c5465a181ce32fea/sparse_strips/vello_sparse_tests/tests/assets/lumaa_image_10x10.png -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/tests/assets/rgb_image_10x10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linebender/vello/33f4be83cedd7de855553ca9c5465a181ce32fea/sparse_strips/vello_sparse_tests/tests/assets/rgb_image_10x10.png -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/tests/assets/rgb_image_2x2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linebender/vello/33f4be83cedd7de855553ca9c5465a181ce32fea/sparse_strips/vello_sparse_tests/tests/assets/rgb_image_2x2.png -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/tests/assets/rgb_image_2x3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linebender/vello/33f4be83cedd7de855553ca9c5465a181ce32fea/sparse_strips/vello_sparse_tests/tests/assets/rgb_image_2x3.png -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/tests/assets/rgba_image_10x10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linebender/vello/33f4be83cedd7de855553ca9c5465a181ce32fea/sparse_strips/vello_sparse_tests/tests/assets/rgba_image_10x10.png -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/tests/blurred_rounded_rect.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2025 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | use crate::renderer::Renderer; 5 | use vello_common::color::palette::css::REBECCA_PURPLE; 6 | use vello_common::kurbo::{Affine, Point, Rect}; 7 | use vello_dev_macros::vello_test; 8 | 9 | fn rect_with(ctx: &mut impl Renderer, radius: f32, std_dev: f32, affine: Affine) { 10 | let rect = Rect::new(20.0, 20.0, 80.0, 80.0); 11 | ctx.set_paint(REBECCA_PURPLE); 12 | ctx.set_transform(affine); 13 | ctx.fill_blurred_rounded_rect(&rect, radius, std_dev); 14 | } 15 | 16 | #[vello_test] 17 | fn blurred_rounded_rect_none(ctx: &mut impl Renderer) { 18 | rect_with(ctx, 0.0, 0.1, Affine::IDENTITY); 19 | } 20 | 21 | #[vello_test] 22 | fn blurred_rounded_rect_small_std_dev(ctx: &mut impl Renderer) { 23 | rect_with(ctx, 0.0, 5.0, Affine::IDENTITY); 24 | } 25 | 26 | #[vello_test] 27 | fn blurred_rounded_rect_medium_std_dev(ctx: &mut impl Renderer) { 28 | rect_with(ctx, 0.0, 10.0, Affine::IDENTITY); 29 | } 30 | 31 | #[vello_test] 32 | fn blurred_rounded_rect_large_std_dev(ctx: &mut impl Renderer) { 33 | rect_with(ctx, 0.0, 20.0, Affine::IDENTITY); 34 | } 35 | 36 | #[vello_test] 37 | fn blurred_rounded_rect_with_radius(ctx: &mut impl Renderer) { 38 | rect_with(ctx, 10.0, 10.0, Affine::IDENTITY); 39 | } 40 | 41 | #[vello_test] 42 | fn blurred_rounded_rect_with_large_radius(ctx: &mut impl Renderer) { 43 | rect_with(ctx, 30.0, 10.0, Affine::IDENTITY); 44 | } 45 | 46 | #[vello_test] 47 | fn blurred_rounded_rect_with_transform(ctx: &mut impl Renderer) { 48 | rect_with( 49 | ctx, 50 | 10.0, 51 | 10.0, 52 | Affine::rotate_about(45.0_f64.to_radians(), Point::new(50.0, 50.0)), 53 | ); 54 | } 55 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/tests/layer.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2025 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | use crate::mask::example_mask; 5 | use crate::renderer::Renderer; 6 | use crate::util::crossed_line_star; 7 | use vello_common::color::palette::css::{BLUE, RED}; 8 | use vello_common::kurbo::Rect; 9 | use vello_common::peniko::{BlendMode, Compose, Mix}; 10 | use vello_dev_macros::vello_test; 11 | 12 | #[vello_test(cpu_u8_tolerance = 1)] 13 | fn layer_multiple_properties_1(ctx: &mut impl Renderer) { 14 | let mask = example_mask(true); 15 | let star = crossed_line_star(); 16 | 17 | ctx.set_paint(BLUE); 18 | ctx.fill_rect(&Rect::new(10.0, 10.0, 90.0, 90.0)); 19 | ctx.push_layer( 20 | Some(&star), 21 | Some(BlendMode::new(Mix::Lighten, Compose::SrcOver)), 22 | Some(0.78), 23 | Some(mask), 24 | ); 25 | ctx.set_paint(RED); 26 | ctx.fill_rect(&Rect::new(10.0, 10.0, 90.0, 90.0)); 27 | ctx.pop_layer(); 28 | } 29 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/tests/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2025 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | //! This crate contains the test harness for `vello_cpu`. 5 | //! - The `util` module contains shared utility functions that are needed by different 6 | //! test methods. 7 | //! - We do not use the default Rust test harness, but instead use this `mod.rs` file as the 8 | //! entry point to run all other tests. The reason we chose this design is that it makes it 9 | //! easier to define shared utility functions needed by different tests. 10 | //! - If you want to add new tests, try to follow these guidelines: 11 | //! - If your test can be classified to a clear "topic" (e.g. clipping, blending, etc.), put 12 | //! it into the corresponding module, or create a new one in case it doesn't exist yet. 13 | //! - If it cannot be classified cleanly, for now you can just put it into `basic.rs` which 14 | //! currently holds a bunch of different kinds of tests. 15 | //! - Tests for bugs should go into `issues.rs`. 16 | //! - For test naming, try to put the "topic" of the test at the start of the name instead of 17 | //! the end. For example, if your test case is about blend modes, `blend_mode_hard_light` is 18 | //! better than `hard_light_blend_mode`. This makes it easier to inspect the reference 19 | //! snapshots by topic. 20 | 21 | #![allow(missing_docs, reason = "we don't need docs for testing")] 22 | #![allow(clippy::cast_possible_truncation, reason = "not critical for testing")] 23 | 24 | #[cfg(target_arch = "wasm32")] 25 | wasm_bindgen_test::wasm_bindgen_test_configure!(run_in_browser); 26 | 27 | mod basic; 28 | mod blurred_rounded_rect; 29 | mod clip; 30 | mod compose; 31 | mod glyph; 32 | mod gradient; 33 | mod image; 34 | mod issues; 35 | mod layer; 36 | mod mask; 37 | mod mix; 38 | mod opacity; 39 | mod renderer; 40 | mod util; 41 | -------------------------------------------------------------------------------- /sparse_strips/vello_sparse_tests/tests/opacity.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2025 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | use crate::renderer::Renderer; 5 | use vello_common::color::palette::css::{BLUE, GREEN, REBECCA_PURPLE, RED, YELLOW}; 6 | use vello_common::kurbo::{Circle, Rect, Shape}; 7 | use vello_dev_macros::vello_test; 8 | 9 | #[vello_test] 10 | fn opacity_on_layer(ctx: &mut impl Renderer) { 11 | ctx.push_opacity_layer(0.27); 12 | 13 | for e in [(35.0, 35.0, RED), (65.0, 35.0, GREEN), (50.0, 65.0, BLUE)] { 14 | let circle = Circle::new((e.0, e.1), 30.0); 15 | ctx.set_paint(e.2); 16 | ctx.fill_path(&circle.to_path(0.1)); 17 | } 18 | 19 | ctx.pop_layer(); 20 | } 21 | 22 | #[vello_test] 23 | fn opacity_nested_on_layer(ctx: &mut impl Renderer) { 24 | ctx.set_paint(REBECCA_PURPLE); 25 | ctx.fill_rect(&Rect::new(10.0, 10.0, 90.0, 90.0)); 26 | ctx.push_opacity_layer(0.5); 27 | ctx.set_paint(YELLOW); 28 | ctx.fill_rect(&Rect::new(25.0, 25.0, 75.0, 75.0)); 29 | ctx.push_opacity_layer(0.5); 30 | ctx.set_paint(GREEN); 31 | ctx.fill_rect(&Rect::new(40.0, 40.0, 60.0, 60.0)); 32 | ctx.pop_layer(); 33 | ctx.pop_layer(); 34 | } 35 | -------------------------------------------------------------------------------- /sparse_strips/vello_toy/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "vello_toy" 3 | description = "A collection of different binary crates for interacting with the sparse rendering stack." 4 | categories = ["rendering", "graphics"] 5 | keywords = ["2d", "vector-graphics"] 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | license.workspace = true 9 | repository.workspace = true 10 | publish = false 11 | 12 | [dependencies] 13 | svg = { workspace = true } 14 | clap = { workspace = true, features = ["derive"] } 15 | # TODO: Should vello_toy be `no_std`? 16 | vello_common = { workspace = true, features = ["std"] } 17 | 18 | [[bin]] 19 | name = "debug" 20 | path = "src/debug.rs" 21 | 22 | [lints] 23 | workspace = true 24 | -------------------------------------------------------------------------------- /vello/LICENSE-MIT: -------------------------------------------------------------------------------- 1 | Copyright 2020 the Vello Authors 2 | 3 | Permission is hereby granted, free of charge, to any 4 | person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the 6 | Software without restriction, including without 7 | limitation the rights to use, copy, modify, merge, 8 | publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software 10 | is furnished to do so, subject to the following 11 | conditions: 12 | 13 | The above copyright notice and this permission notice 14 | shall be included in all copies or substantial portions 15 | of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 18 | ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 19 | TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 20 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 21 | SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 23 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 24 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /vello_encoding/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "vello_encoding" 3 | version.workspace = true # We mimic Vello's version 4 | description = "Vello types that represent the data that needs to be rendered." 5 | categories = ["rendering", "graphics"] 6 | keywords = ["2d", "vector-graphics"] 7 | edition.workspace = true 8 | rust-version.workspace = true 9 | license.workspace = true 10 | repository.workspace = true 11 | 12 | [package.metadata.docs.rs] 13 | all-features = true 14 | # There are no platform specific docs. 15 | default-target = "x86_64-unknown-linux-gnu" 16 | targets = [] 17 | 18 | [features] 19 | # Enables an optional GPU memory usage estimation utility. This can be used to 20 | # perform additional computations in order to estimate the minimum required allocations 21 | # for buffers backing bump-allocated GPU memory. 22 | bump_estimate = [] 23 | 24 | [lints] 25 | workspace = true 26 | 27 | [dependencies] 28 | bytemuck = { workspace = true } 29 | skrifa = { workspace = true, features = ["std"] } 30 | peniko = { workspace = true, default-features = true } 31 | guillotiere = { version = "0.6.2" } 32 | smallvec = { workspace = true } 33 | -------------------------------------------------------------------------------- /vello_encoding/LICENSE-MIT: -------------------------------------------------------------------------------- 1 | Copyright 2020 the Vello Authors 2 | 3 | Permission is hereby granted, free of charge, to any 4 | person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the 6 | Software without restriction, including without 7 | limitation the rights to use, copy, modify, merge, 8 | publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software 10 | is furnished to do so, subject to the following 11 | conditions: 12 | 13 | The above copyright notice and this permission notice 14 | shall be included in all copies or substantial portions 15 | of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 18 | ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 19 | TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 20 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 21 | SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 23 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 24 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /vello_encoding/src/binning.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2023 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | use bytemuck::{Pod, Zeroable}; 5 | 6 | /// Binning header. 7 | #[derive(Copy, Clone, Pod, Zeroable, Debug, Default)] 8 | #[repr(C)] 9 | pub struct BinHeader { 10 | pub element_count: u32, 11 | pub chunk_offset: u32, 12 | } 13 | -------------------------------------------------------------------------------- /vello_encoding/src/glyph.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2023 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | use std::ops::Range; 5 | 6 | use peniko::{Font, Style}; 7 | 8 | use super::{StreamOffsets, Transform}; 9 | 10 | /// Positioned glyph. 11 | #[derive(Copy, Clone, Default, Debug)] 12 | pub struct Glyph { 13 | /// Glyph identifier. 14 | pub id: u32, 15 | /// X-offset in run, relative to transform. 16 | pub x: f32, 17 | /// Y-offset in run, relative to transform. 18 | pub y: f32, 19 | } 20 | 21 | /// Properties for a sequence of glyphs in an encoding. 22 | #[derive(Clone)] 23 | pub struct GlyphRun { 24 | /// Font for all glyphs in the run. 25 | pub font: Font, 26 | /// Global run transform. 27 | pub transform: Transform, 28 | /// Per-glyph transform. 29 | pub glyph_transform: Option, 30 | /// Size of the font in pixels per em. 31 | pub font_size: f32, 32 | /// True if hinting is enabled. 33 | pub hint: bool, 34 | /// Range of normalized coordinates in the parent encoding. 35 | pub normalized_coords: Range, 36 | /// Fill or stroke style. 37 | pub style: Style, 38 | /// Range of glyphs in the parent encoding. 39 | pub glyphs: Range, 40 | /// Stream offsets where this glyph run should be inserted. 41 | pub stream_offsets: StreamOffsets, 42 | } 43 | -------------------------------------------------------------------------------- /vello_encoding/src/monoid.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2022 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | /// Interface for a monoid. The default value must be the identity of 5 | /// the monoid. 6 | pub trait Monoid: Default { 7 | /// The source value for constructing the monoid. 8 | type SourceValue; 9 | 10 | /// Creates a monoid from a given value. 11 | fn new(value: Self::SourceValue) -> Self; 12 | 13 | /// Combines two monoids. This operation must be associative. 14 | #[must_use] 15 | fn combine(&self, other: &Self) -> Self; 16 | } 17 | -------------------------------------------------------------------------------- /vello_shaders/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "vello_shaders" 3 | version.workspace = true # We mimic Vello's version 4 | description = "Vello infrastructure to preprocess and cross-compile shaders at compile time." 5 | categories = ["rendering", "graphics"] 6 | keywords = ["2d", "vector-graphics"] 7 | edition.workspace = true 8 | rust-version.workspace = true 9 | license.workspace = true 10 | repository.workspace = true 11 | 12 | [package.metadata.docs.rs] 13 | all-features = true 14 | # There are no platform specific docs. 15 | default-target = "x86_64-unknown-linux-gnu" 16 | targets = [] 17 | 18 | [features] 19 | default = ["wgsl", "cpu"] 20 | compile = ["dep:naga", "dep:thiserror", "dep:log"] 21 | 22 | # Target shading language variants of the vello shaders to link into the library. 23 | wgsl = [] 24 | msl = ["naga?/msl-out"] 25 | 26 | # Enable the CPU versions of the shaders 27 | cpu = ["dep:bytemuck", "dep:vello_encoding"] 28 | 29 | [lints] 30 | workspace = true 31 | 32 | [dependencies] 33 | bytemuck = { workspace = true, optional = true } 34 | naga = { version = "24.0.0", features = ["wgsl-in"], optional = true } 35 | thiserror = { workspace = true, optional = true } 36 | vello_encoding = { workspace = true, optional = true } 37 | log = { workspace = true, optional = true } 38 | 39 | [build-dependencies] 40 | naga = { version = "24.0.0", features = ["wgsl-in"] } 41 | thiserror = { workspace = true } 42 | log = { workspace = true } 43 | -------------------------------------------------------------------------------- /vello_shaders/LICENSE-MIT: -------------------------------------------------------------------------------- 1 | Copyright 2020 the Vello Authors 2 | 3 | Permission is hereby granted, free of charge, to any 4 | person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the 6 | Software without restriction, including without 7 | limitation the rights to use, copy, modify, merge, 8 | publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software 10 | is furnished to do so, subject to the following 11 | conditions: 12 | 13 | The above copyright notice and this permission notice 14 | shall be included in all copies or substantial portions 15 | of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 18 | ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 19 | TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 20 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 21 | SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 23 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 24 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /vello_shaders/shader/UNLICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /vello_shaders/shader/backdrop.wgsl: -------------------------------------------------------------------------------- 1 | // Copyright 2022 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense 3 | 4 | // Note: this is the non-atomic version 5 | struct Tile { 6 | backdrop: i32, 7 | segments: u32, 8 | } 9 | 10 | #import config 11 | 12 | @group(0) @binding(0) 13 | var config: Config; 14 | 15 | @group(0) @binding(1) 16 | var tiles: array; 17 | 18 | const WG_SIZE = 64u; 19 | 20 | var sh_backdrop: array; 21 | 22 | // Each workgroup computes the inclusive prefix sum of the backdrops 23 | // in one row of tiles. 24 | @compute @workgroup_size(64) 25 | fn main( 26 | @builtin(local_invocation_id) local_id: vec3, 27 | @builtin(workgroup_id) wg_id: vec3, 28 | ) { 29 | let width_in_tiles = config.width_in_tiles; 30 | let ix = wg_id.x * width_in_tiles + local_id.x; 31 | var backdrop = 0; 32 | if local_id.x < width_in_tiles { 33 | backdrop = tiles[ix].backdrop; 34 | } 35 | sh_backdrop[local_id.x] = backdrop; 36 | // iterate log2(WG_SIZE) times 37 | for (var i = 0u; i < firstTrailingBit(WG_SIZE); i += 1u) { 38 | workgroupBarrier(); 39 | if local_id.x >= (1u << i) { 40 | backdrop += sh_backdrop[local_id.x - (1u << i)]; 41 | } 42 | workgroupBarrier(); 43 | sh_backdrop[local_id.x] = backdrop; 44 | } 45 | if local_id.x < width_in_tiles { 46 | tiles[ix].backdrop = backdrop; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /vello_shaders/shader/bbox_clear.wgsl: -------------------------------------------------------------------------------- 1 | // Copyright 2022 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense 3 | 4 | #import config 5 | #import bbox 6 | 7 | @group(0) @binding(0) 8 | var config: Config; 9 | 10 | @group(0) @binding(1) 11 | var path_bboxes: array; 12 | 13 | @compute @workgroup_size(256) 14 | fn main( 15 | @builtin(global_invocation_id) global_id: vec3, 16 | ) { 17 | let ix = global_id.x; 18 | if ix < config.n_path { 19 | path_bboxes[ix].x0 = 0x7fffffff; 20 | path_bboxes[ix].y0 = 0x7fffffff; 21 | path_bboxes[ix].x1 = -0x80000000; 22 | path_bboxes[ix].y1 = -0x80000000; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /vello_shaders/shader/path_count_setup.wgsl: -------------------------------------------------------------------------------- 1 | // Copyright 2023 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense 3 | 4 | // Set up dispatch size for path count stage. 5 | 6 | #import bump 7 | 8 | @group(0) @binding(0) 9 | var bump: BumpAllocators; 10 | 11 | @group(0) @binding(1) 12 | var indirect: IndirectCount; 13 | 14 | // Partition size for path count stage 15 | const WG_SIZE = 256u; 16 | 17 | @compute @workgroup_size(1) 18 | fn main() { 19 | if atomicLoad(&bump.failed) != 0u { 20 | indirect.count_x = 0u; 21 | } else { 22 | let lines = atomicLoad(&bump.lines); 23 | indirect.count_x = (lines + (WG_SIZE - 1u)) / WG_SIZE; 24 | } 25 | indirect.count_y = 1u; 26 | indirect.count_z = 1u; 27 | } 28 | -------------------------------------------------------------------------------- /vello_shaders/shader/path_tiling_setup.wgsl: -------------------------------------------------------------------------------- 1 | // Copyright 2023 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense 3 | 4 | // Set up dispatch size for path tiling stage. 5 | 6 | #import bump 7 | 8 | @group(0) @binding(0) 9 | var bump: BumpAllocators; 10 | 11 | @group(0) @binding(1) 12 | var indirect: IndirectCount; 13 | 14 | @group(0) @binding(2) 15 | var ptcl: array; 16 | 17 | // Partition size for path tiling stage 18 | const WG_SIZE = 256u; 19 | 20 | @compute @workgroup_size(1) 21 | fn main() { 22 | if atomicLoad(&bump.failed) != 0u { 23 | indirect.count_x = 0u; 24 | // signal fine rasterizer that failure happened (it doesn't bind bump) 25 | ptcl[0] = ~0u; 26 | } else { 27 | let segments = atomicLoad(&bump.seg_counts); 28 | indirect.count_x = (segments + (WG_SIZE - 1u)) / WG_SIZE; 29 | } 30 | indirect.count_y = 1u; 31 | indirect.count_z = 1u; 32 | } 33 | -------------------------------------------------------------------------------- /vello_shaders/shader/pathtag_reduce.wgsl: -------------------------------------------------------------------------------- 1 | // Copyright 2022 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense 3 | 4 | #import config 5 | #import pathtag 6 | 7 | @group(0) @binding(0) 8 | var config: Config; 9 | 10 | @group(0) @binding(1) 11 | var scene: array; 12 | 13 | @group(0) @binding(2) 14 | var reduced: array; 15 | 16 | const LG_WG_SIZE = 8u; 17 | const WG_SIZE = 256u; 18 | 19 | var sh_scratch: array; 20 | 21 | @compute @workgroup_size(256) 22 | fn main( 23 | @builtin(global_invocation_id) global_id: vec3, 24 | @builtin(local_invocation_id) local_id: vec3, 25 | ) { 26 | let ix = global_id.x; 27 | let tag_word = scene[config.pathtag_base + ix]; 28 | var agg = reduce_tag(tag_word); 29 | sh_scratch[local_id.x] = agg; 30 | for (var i = 0u; i < firstTrailingBit(WG_SIZE); i += 1u) { 31 | workgroupBarrier(); 32 | if local_id.x + (1u << i) < WG_SIZE { 33 | let other = sh_scratch[local_id.x + (1u << i)]; 34 | agg = combine_tag_monoid(agg, other); 35 | } 36 | workgroupBarrier(); 37 | sh_scratch[local_id.x] = agg; 38 | } 39 | if local_id.x == 0u { 40 | reduced[ix >> LG_WG_SIZE] = agg; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /vello_shaders/shader/pathtag_reduce2.wgsl: -------------------------------------------------------------------------------- 1 | // Copyright 2023 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense 3 | 4 | // This shader is the second stage of reduction for the pathtag 5 | // monoid scan, needed when the number of tags is large. 6 | 7 | #import config 8 | #import pathtag 9 | 10 | @group(0) @binding(0) 11 | var reduced_in: array; 12 | 13 | @group(0) @binding(1) 14 | var reduced: array; 15 | 16 | const LG_WG_SIZE = 8u; 17 | const WG_SIZE = 256u; 18 | 19 | var sh_scratch: array; 20 | 21 | @compute @workgroup_size(256) 22 | fn main( 23 | @builtin(global_invocation_id) global_id: vec3, 24 | @builtin(local_invocation_id) local_id: vec3, 25 | ) { 26 | let ix = global_id.x; 27 | var agg = reduced_in[ix]; 28 | sh_scratch[local_id.x] = agg; 29 | for (var i = 0u; i < firstTrailingBit(WG_SIZE); i += 1u) { 30 | workgroupBarrier(); 31 | if local_id.x + (1u << i) < WG_SIZE { 32 | let other = sh_scratch[local_id.x + (1u << i)]; 33 | agg = combine_tag_monoid(agg, other); 34 | } 35 | workgroupBarrier(); 36 | sh_scratch[local_id.x] = agg; 37 | } 38 | if local_id.x == 0u { 39 | reduced[ix >> LG_WG_SIZE] = agg; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /vello_shaders/shader/permutations: -------------------------------------------------------------------------------- 1 | pathtag_scan 2 | + pathtag_scan_large 3 | + pathtag_scan_small: small 4 | fine 5 | + fine_area 6 | + fine_msaa8: msaa msaa8 7 | + fine_msaa16: msaa msaa16 8 | -------------------------------------------------------------------------------- /vello_shaders/shader/shared/bbox.wgsl: -------------------------------------------------------------------------------- 1 | // Copyright 2022 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense 3 | 4 | // The annotated bounding box for a path. It has been transformed, 5 | // but contains a link to the active transform, mostly for gradients. 6 | // Coordinates are integer pixels (for the convenience of atomic update) 7 | // but will probably become fixed-point fractions for rectangles. 8 | // 9 | // TODO: This also carries a `draw_flags` field that contains information that gets propagated to 10 | // the draw info stream. This is currently only used for the fill rule. If the other bits remain 11 | // unused we could possibly pack this into some other field, such as the MSB of `trans_ix`. 12 | struct PathBbox { 13 | x0: i32, 14 | y0: i32, 15 | x1: i32, 16 | y1: i32, 17 | draw_flags: u32, 18 | trans_ix: u32, 19 | } 20 | 21 | fn bbox_intersect(a: vec4, b: vec4) -> vec4 { 22 | return vec4(max(a.xy, b.xy), min(a.zw, b.zw)); 23 | } 24 | -------------------------------------------------------------------------------- /vello_shaders/shader/shared/bump.wgsl: -------------------------------------------------------------------------------- 1 | // Copyright 2022 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense 3 | 4 | // Bitflags for each stage that can fail allocation. 5 | const STAGE_BINNING: u32 = 0x1u; 6 | const STAGE_TILE_ALLOC: u32 = 0x2u; 7 | const STAGE_FLATTEN: u32 = 0x4u; 8 | const STAGE_PATH_COUNT: u32 = 0x8u; 9 | const STAGE_COARSE: u32 = 0x10u; 10 | 11 | // This must be kept in sync with the struct in config.rs in the encoding crate. 12 | struct BumpAllocators { 13 | // Bitmask of stages that have failed allocation. 14 | failed: atomic, 15 | binning: atomic, 16 | ptcl: atomic, 17 | tile: atomic, 18 | seg_counts: atomic, 19 | segments: atomic, 20 | blend: atomic, 21 | lines: atomic, 22 | } 23 | 24 | struct IndirectCount { 25 | count_x: u32, 26 | count_y: u32, 27 | count_z: u32, 28 | } 29 | -------------------------------------------------------------------------------- /vello_shaders/shader/shared/clip.wgsl: -------------------------------------------------------------------------------- 1 | // Copyright 2022 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense 3 | 4 | struct Bic { 5 | a: u32, 6 | b: u32, 7 | } 8 | 9 | fn bic_combine(x: Bic, y: Bic) -> Bic { 10 | let m = min(x.b, y.a); 11 | return Bic(x.a + y.a - m, x.b + y.b - m); 12 | } 13 | 14 | struct ClipInp { 15 | // Index of the draw object. 16 | ix: u32, 17 | // This is a packed encoding of an enum with the sign bit as the tag. If positive, 18 | // this entry is a BeginClip and contains the associated path index. If negative, 19 | // it is an EndClip and contains the bitwise-not of the EndClip draw object index. 20 | path_ix: i32, 21 | } 22 | 23 | struct ClipEl { 24 | parent_ix: u32, 25 | bbox: vec4, 26 | } 27 | -------------------------------------------------------------------------------- /vello_shaders/shader/shared/cubic.wgsl: -------------------------------------------------------------------------------- 1 | // Copyright 2022 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense 3 | 4 | struct Cubic { 5 | p0: vec2, 6 | p1: vec2, 7 | p2: vec2, 8 | p3: vec2, 9 | stroke: vec2, 10 | path_ix: u32, 11 | flags: u32, 12 | } 13 | 14 | const CUBIC_IS_STROKE = 1u; 15 | -------------------------------------------------------------------------------- /vello_shaders/shader/shared/segment.wgsl: -------------------------------------------------------------------------------- 1 | // Copyright 2022 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense 3 | 4 | // Segments laid out for contiguous storage 5 | struct Segment { 6 | // Points are relative to tile origin 7 | point0: vec2, 8 | point1: vec2, 9 | y_edge: f32, 10 | } 11 | 12 | // A line segment produced by flattening and ready for rasterization. 13 | // 14 | // The name is perhaps too playful, but reflects the fact that these 15 | // lines are completely unordered. They will flow through coarse path 16 | // rasterization, then the per-tile segments will be scatter-written into 17 | // segment storage so that each (tile, path) tuple gets a contiguous 18 | // slice of segments. 19 | struct LineSoup { 20 | path_ix: u32, 21 | // Note: this creates an alignment gap. Don't worry about 22 | // this now, but maybe move to scalars. 23 | p0: vec2, 24 | p1: vec2, 25 | } 26 | 27 | // An intermediate data structure for sorting tile segments. 28 | struct SegmentCount { 29 | // Reference to element of LineSoup array 30 | line_ix: u32, 31 | // Two count values packed into a single u32 32 | // Lower 16 bits: index of segment within line 33 | // Upper 16 bits: index of segment within segment slice 34 | counts: u32, 35 | } 36 | -------------------------------------------------------------------------------- /vello_shaders/shader/shared/tile.wgsl: -------------------------------------------------------------------------------- 1 | // Copyright 2022 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense 3 | 4 | // Common datatypes for path and tile intermediate info. 5 | 6 | struct Path { 7 | // bounding box in tiles 8 | bbox: vec4, 9 | // offset (in u32's) to tile rectangle 10 | tiles: u32, 11 | } 12 | 13 | struct Tile { 14 | backdrop: i32, 15 | // This is used for the count of the number of segments in the 16 | // tile up to coarse rasterization, and the index afterwards. 17 | // In the latter variant, the bits are inverted so that tiling 18 | // can detect whether the tile was allocated; it's best to 19 | // consider this an enum packed into a u32. 20 | segment_count_or_ix: u32, 21 | } 22 | -------------------------------------------------------------------------------- /vello_shaders/shader/shared/transform.wgsl: -------------------------------------------------------------------------------- 1 | // Copyright 2023 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense 3 | 4 | // Helpers for working with transforms. 5 | 6 | struct Transform { 7 | matrx: vec4, 8 | translate: vec2, 9 | } 10 | 11 | fn transform_apply(transform: Transform, p: vec2) -> vec2 { 12 | return transform.matrx.xy * p.x + transform.matrx.zw * p.y + transform.translate; 13 | } 14 | 15 | fn transform_inverse(transform: Transform) -> Transform { 16 | let inv_det = 1.0 / (transform.matrx.x * transform.matrx.w - transform.matrx.y * transform.matrx.z); 17 | let inv_mat = inv_det * vec4(transform.matrx.w, -transform.matrx.y, -transform.matrx.z, transform.matrx.x); 18 | let inv_tr = mat2x2(inv_mat.xy, inv_mat.zw) * -transform.translate; 19 | return Transform(inv_mat, inv_tr); 20 | } 21 | 22 | fn transform_mul(a: Transform, b: Transform) -> Transform { 23 | return Transform( 24 | a.matrx.xyxy * b.matrx.xxzz + a.matrx.zwzw * b.matrx.yyww, 25 | a.matrx.xy * b.translate.x + a.matrx.zw * b.translate.y + a.translate 26 | ); 27 | } 28 | -------------------------------------------------------------------------------- /vello_shaders/shader/shared/util.wgsl: -------------------------------------------------------------------------------- 1 | // Copyright 2023 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense 3 | 4 | // This file defines utility functions that interact with host-shareable buffer objects. It should 5 | // be imported once following the resource binding declarations in the shader module that access 6 | // them. 7 | 8 | // Reads a draw tag from the scene buffer, defaulting to DRAWTAG_NOP if the given `ix` is beyond the 9 | // range of valid draw objects (e.g this can happen if `ix` is derived from an invocation ID in a 10 | // workgroup that partially spans valid range). 11 | // 12 | // This function depends on the following global declarations: 13 | // * `scene`: array 14 | // * `config`: Config (see config.wgsl) 15 | fn read_draw_tag_from_scene(ix: u32) -> u32 { 16 | var tag_word: u32; 17 | if ix < config.n_drawobj { 18 | let tag_ix = config.drawtag_base + ix; 19 | tag_word = scene[tag_ix]; 20 | } else { 21 | tag_word = DRAWTAG_NOP; 22 | } 23 | return tag_word; 24 | } 25 | -------------------------------------------------------------------------------- /vello_shaders/src/compile/permutations.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2023 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | use std::collections::HashMap; 5 | 6 | #[derive(Debug)] 7 | pub struct Permutation { 8 | /// The new name for the permutation 9 | pub name: String, 10 | /// Set of defines to apply for the permutation 11 | pub defines: Vec, 12 | } 13 | 14 | pub fn parse(source: &str) -> HashMap> { 15 | let mut map: HashMap> = HashMap::default(); 16 | let mut current_source: Option = None; 17 | for line in source.lines() { 18 | let line = line.trim(); 19 | if line.is_empty() || line.starts_with('#') { 20 | continue; 21 | } 22 | if let Some(line) = line.strip_prefix('+') { 23 | if let Some(current_source) = ¤t_source { 24 | let mut parts = line.split(':').map(|s| s.trim()); 25 | let Some(name) = parts.next() else { 26 | continue; 27 | }; 28 | let mut defines = vec![]; 29 | if let Some(define_list) = parts.next() { 30 | defines.extend(define_list.split(' ').map(|s| s.trim().to_string())); 31 | } 32 | map.entry(current_source.to_string()) 33 | .or_default() 34 | .push(Permutation { 35 | name: name.to_string(), 36 | defines, 37 | }); 38 | } 39 | } else { 40 | current_source = Some(line.to_string()); 41 | } 42 | } 43 | map 44 | } 45 | -------------------------------------------------------------------------------- /vello_shaders/src/cpu/backdrop.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2023 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense 3 | 4 | use vello_encoding::{BumpAllocators, ConfigUniform, Path, Tile}; 5 | 6 | use super::CpuBinding; 7 | 8 | fn backdrop_main(config: &ConfigUniform, _: &BumpAllocators, paths: &[Path], tiles: &mut [Tile]) { 9 | for drawobj_ix in 0..config.layout.n_draw_objects { 10 | let path = paths[drawobj_ix as usize]; 11 | let width = path.bbox[2] - path.bbox[0]; 12 | let height = path.bbox[3] - path.bbox[1]; 13 | let base = path.tiles; 14 | for y in 0..height { 15 | let mut sum = 0; 16 | for x in 0..width { 17 | let tile = &mut tiles[(base + y * width + x) as usize]; 18 | sum += tile.backdrop; 19 | tile.backdrop = sum; 20 | } 21 | } 22 | } 23 | } 24 | 25 | pub fn backdrop(_n_wg: u32, resources: &[CpuBinding<'_>]) { 26 | let config = resources[0].as_typed(); 27 | let bump = resources[1].as_typed(); 28 | let paths = resources[2].as_slice(); 29 | let mut tiles = resources[3].as_slice_mut(); 30 | backdrop_main(&config, &bump, &paths, &mut tiles); 31 | } 32 | -------------------------------------------------------------------------------- /vello_shaders/src/cpu/bbox_clear.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2023 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense 3 | 4 | use vello_encoding::{ConfigUniform, PathBbox}; 5 | 6 | use super::CpuBinding; 7 | 8 | fn bbox_clear_main(config: &ConfigUniform, path_bboxes: &mut [PathBbox]) { 9 | for i in 0..(config.layout.n_paths as usize) { 10 | path_bboxes[i].x0 = 0x7fff_ffff; 11 | path_bboxes[i].y0 = 0x7fff_ffff; 12 | path_bboxes[i].x1 = -0x8000_0000; 13 | path_bboxes[i].y1 = -0x8000_0000; 14 | } 15 | } 16 | 17 | pub fn bbox_clear(_n_wg: u32, resources: &[CpuBinding<'_>]) { 18 | let config = resources[0].as_typed(); 19 | let mut path_bboxes = resources[1].as_slice_mut(); 20 | bbox_clear_main(&config, &mut path_bboxes); 21 | } 22 | -------------------------------------------------------------------------------- /vello_shaders/src/cpu/draw_reduce.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2023 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense 3 | 4 | use vello_encoding::{ConfigUniform, DrawMonoid, DrawTag, Monoid}; 5 | 6 | use super::{CpuBinding, util::read_draw_tag_from_scene}; 7 | 8 | const WG_SIZE: usize = 256; 9 | 10 | fn draw_reduce_main(n_wg: u32, config: &ConfigUniform, scene: &[u32], reduced: &mut [DrawMonoid]) { 11 | let num_blocks_total = (config.layout.n_draw_objects as usize).div_ceil(WG_SIZE); 12 | let n_blocks_base = num_blocks_total / WG_SIZE; 13 | let remainder = num_blocks_total % WG_SIZE; 14 | for i in 0..n_wg as usize { 15 | let first_block = n_blocks_base * i + i.min(remainder); 16 | let n_blocks = n_blocks_base + (i < remainder) as usize; 17 | let mut m = DrawMonoid::default(); 18 | for j in 0..WG_SIZE * n_blocks { 19 | let ix = (first_block * WG_SIZE) as u32 + j as u32; 20 | let tag = read_draw_tag_from_scene(config, scene, ix); 21 | m = m.combine(&DrawMonoid::new(DrawTag(tag))); 22 | } 23 | reduced[i] = m; 24 | } 25 | } 26 | 27 | pub fn draw_reduce(n_wg: u32, resources: &[CpuBinding<'_>]) { 28 | let config = resources[0].as_typed(); 29 | let scene = resources[1].as_slice(); 30 | let mut reduced = resources[2].as_slice_mut(); 31 | draw_reduce_main(n_wg, &config, &scene, &mut reduced); 32 | } 33 | -------------------------------------------------------------------------------- /vello_shaders/src/cpu/path_count_setup.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2023 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense 3 | 4 | use vello_encoding::{BumpAllocators, IndirectCount}; 5 | 6 | use super::CpuBinding; 7 | 8 | const WG_SIZE: usize = 256; 9 | 10 | fn path_count_setup_main(bump: &BumpAllocators, indirect: &mut IndirectCount) { 11 | let lines = bump.lines; 12 | indirect.count_x = lines.div_ceil(WG_SIZE as u32); 13 | indirect.count_y = 1; 14 | indirect.count_z = 1; 15 | } 16 | 17 | pub fn path_count_setup(_n_wg: u32, resources: &[CpuBinding<'_>]) { 18 | let bump = resources[0].as_typed(); 19 | let mut indirect = resources[1].as_typed_mut(); 20 | path_count_setup_main(&bump, &mut indirect); 21 | } 22 | -------------------------------------------------------------------------------- /vello_shaders/src/cpu/path_tiling_setup.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2023 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense 3 | 4 | use vello_encoding::{BumpAllocators, IndirectCount}; 5 | 6 | use super::CpuBinding; 7 | 8 | const WG_SIZE: usize = 256; 9 | 10 | fn path_tiling_setup_main(bump: &BumpAllocators, indirect: &mut IndirectCount) { 11 | let segments = bump.seg_counts; 12 | indirect.count_x = segments.div_ceil(WG_SIZE as u32); 13 | indirect.count_y = 1; 14 | indirect.count_z = 1; 15 | } 16 | 17 | pub fn path_tiling_setup(_n_wg: u32, resources: &[CpuBinding<'_>]) { 18 | let bump = resources[0].as_typed(); 19 | let mut indirect = resources[1].as_typed_mut(); 20 | // binding 2 is ptcl, which we would need if we propagate failure 21 | path_tiling_setup_main(&bump, &mut indirect); 22 | } 23 | -------------------------------------------------------------------------------- /vello_shaders/src/cpu/pathtag_reduce.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2023 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense 3 | 4 | use vello_encoding::{ConfigUniform, Monoid, PathMonoid}; 5 | 6 | use super::CpuBinding; 7 | 8 | const WG_SIZE: usize = 256; 9 | 10 | fn pathtag_reduce_main( 11 | n_wg: u32, 12 | config: &ConfigUniform, 13 | scene: &[u32], 14 | reduced: &mut [PathMonoid], 15 | ) { 16 | let pathtag_base = config.layout.path_tag_base; 17 | for i in 0..n_wg { 18 | let mut m = PathMonoid::default(); 19 | for j in 0..WG_SIZE { 20 | let tag = scene[(pathtag_base + i * WG_SIZE as u32) as usize + j]; 21 | m = m.combine(&PathMonoid::new(tag)); 22 | } 23 | reduced[i as usize] = m; 24 | } 25 | } 26 | 27 | pub fn pathtag_reduce(n_wg: u32, resources: &[CpuBinding<'_>]) { 28 | let config = resources[0].as_typed(); 29 | let scene = resources[1].as_slice(); 30 | let mut reduced = resources[2].as_slice_mut(); 31 | pathtag_reduce_main(n_wg, &config, &scene, &mut reduced); 32 | } 33 | -------------------------------------------------------------------------------- /vello_shaders/src/cpu/pathtag_scan.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2023 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense 3 | 4 | use vello_encoding::{ConfigUniform, Monoid, PathMonoid}; 5 | 6 | use super::CpuBinding; 7 | 8 | const WG_SIZE: usize = 256; 9 | 10 | fn pathtag_scan_main( 11 | n_wg: u32, 12 | config: &ConfigUniform, 13 | scene: &[u32], 14 | reduced: &[PathMonoid], 15 | tag_monoids: &mut [PathMonoid], 16 | ) { 17 | let pathtag_base = config.layout.path_tag_base; 18 | let mut prefix = PathMonoid::default(); 19 | for i in 0..n_wg { 20 | let mut m = prefix; 21 | for j in 0..WG_SIZE { 22 | let ix = (i * WG_SIZE as u32) as usize + j; 23 | tag_monoids[ix] = m; 24 | let tag = scene[pathtag_base as usize + ix]; 25 | m = m.combine(&PathMonoid::new(tag)); 26 | } 27 | prefix = prefix.combine(&reduced[i as usize]); 28 | } 29 | } 30 | 31 | pub fn pathtag_scan(n_wg: u32, resources: &[CpuBinding<'_>]) { 32 | let config = resources[0].as_typed(); 33 | let scene = resources[1].as_slice(); 34 | let reduced = resources[2].as_slice(); 35 | let mut tag_monoids = resources[3].as_slice_mut(); 36 | pathtag_scan_main(n_wg, &config, &scene, &reduced, &mut tag_monoids); 37 | } 38 | -------------------------------------------------------------------------------- /vello_shaders/src/types.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2023 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | //! Types that are shared between the main crate and build. 5 | 6 | /// The type of resource that will be bound to a slot in a shader. 7 | #[derive(Copy, Clone, PartialEq, Eq, Debug)] 8 | pub enum BindType { 9 | /// A storage buffer with read/write access. 10 | Buffer, 11 | /// A storage buffer with read only access. 12 | BufReadOnly, 13 | /// A small storage buffer to be used as uniforms. 14 | Uniform, 15 | /// A storage image. 16 | Image, 17 | /// A storage image with read only access. 18 | ImageRead, 19 | // TODO: Sampler, maybe others 20 | } 21 | 22 | impl BindType { 23 | pub fn is_mutable(self) -> bool { 24 | matches!(self, Self::Buffer | Self::Image) 25 | } 26 | } 27 | 28 | #[derive(Clone, Debug)] 29 | pub struct BindingInfo { 30 | pub name: Option, 31 | pub location: (u32, u32), 32 | pub ty: BindType, 33 | } 34 | 35 | #[derive(Clone, Debug)] 36 | pub struct WorkgroupBufferInfo { 37 | pub size_in_bytes: u32, 38 | /// The order in which the workgroup variable is declared in the shader module. 39 | pub index: u32, 40 | } 41 | 42 | #[cfg(feature = "msl")] 43 | pub mod msl { 44 | use std::fmt; 45 | 46 | #[derive(Clone)] 47 | pub enum BindingIndex { 48 | Buffer(u8), 49 | Texture(u8), 50 | } 51 | 52 | impl fmt::Debug for BindingIndex { 53 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { 54 | match *self { 55 | Self::Buffer(i) => write!(f, "msl::BindingIndex::Buffer({})", i), 56 | Self::Texture(i) => write!(f, "msl::BindingIndex::Texture({})", i), 57 | } 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /vello_tests/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "vello_tests" 3 | description = "Integration tests for Vello." 4 | categories = ["rendering", "graphics"] 5 | keywords = ["2d", "vector-graphics"] 6 | edition.workspace = true 7 | license.workspace = true 8 | repository.workspace = true 9 | publish = false 10 | 11 | [lints] 12 | workspace = true 13 | 14 | [dependencies] 15 | vello = { workspace = true } 16 | anyhow = { workspace = true } 17 | 18 | pollster = { workspace = true } 19 | png = { workspace = true } 20 | futures-intrusive = { workspace = true } 21 | nv-flip = "0.1.2" 22 | image = { workspace = true, features = ["png"] } 23 | 24 | scenes = { workspace = true } 25 | -------------------------------------------------------------------------------- /vello_tests/README.md: -------------------------------------------------------------------------------- 1 | # Vello Tests 2 | 3 | This folder contains the infrastructure used for testing Vello. 4 | The kinds of test currently used are: 5 | 6 | - Property tests 7 | - These tests are run on both the GPU and CPU. 8 | - These create scenes with 9 | - Snapshot tests 10 | - These tests use the GPU shaders as a source of truth, but the CPU shaders are also ran for these tests. 11 | - These have a non-exact comparison metric, because of small differences between rendering on different platforms. 12 | This includes differences from "fast math" on Apple platforms. 13 | - Comparison tests 14 | - These tests compare the results from running a scene through the CPU and GPU pathways. 15 | - This ensures that the GPU renderer matches the reference CPU renderer. 16 | - We hope to largely phase these out in favour of additional snapshot tests. 17 | 18 | ## LFS 19 | 20 | We have two groups of snapshot tests. 21 | The first of these groups are the smoke snapshot tests. 22 | This is a small set of tests for which the reference files are included within this repository. 23 | These reference files can be found in `smoke_snapshots`. 24 | These are always required to pass. 25 | 26 | We use git Large File Storage for the rest of the snapshot tests. 27 | This is an experiment to determine how suitable git LFS is for our needs. 28 | These tests will detect whether the LFS files failed to download properly, and will pass on CI in that case. 29 | LFS downloads could fail if the Linebender organisation has run out of LFS bandwidth or storage. 30 | If this occurs, we will re-evaluate our LFS based snapshot testing solution. 31 | 32 | To run these tests locally, install [git lfs](https://git-lfs.com/), then run `git lfs pull`. 33 | -------------------------------------------------------------------------------- /vello_tests/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2024 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | //! Build step. 5 | 6 | use std::env; 7 | 8 | fn main() { 9 | println!("cargo:rerun-if-env-changed=VELLO_CI_GPU_SUPPORT"); 10 | println!("cargo:rustc-check-cfg=cfg(skip_gpu_tests)"); 11 | if let Ok(mut value) = env::var("VELLO_CI_GPU_SUPPORT") { 12 | value.make_ascii_lowercase(); 13 | match &*value { 14 | "yes" | "y" => {} 15 | "no" | "n" => { 16 | println!("cargo:rustc-cfg=skip_gpu_tests"); 17 | } 18 | _ => { 19 | println!("cargo:cargo:warning=VELLO_CI_GPU_SUPPORT should be set to yes/y or no/n"); 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /vello_tests/comparisons/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /vello_tests/current/.gitignore: -------------------------------------------------------------------------------- 1 | *.png 2 | -------------------------------------------------------------------------------- /vello_tests/debug_outputs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /vello_tests/snapshots/.gitignore: -------------------------------------------------------------------------------- 1 | *.oversized.png 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /vello_tests/snapshots/big_bitmap.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:9238935e69c61a6b89b997504c6ed1cdfb8ee3e5ebc42b8886b225c4761198e8 3 | size 14571 4 | -------------------------------------------------------------------------------- /vello_tests/snapshots/big_bitmap_apple.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:4c2987515234f8489fee15db53b34dbe97f96d8a7a184b315493e9fab56b770a 3 | size 18361 4 | -------------------------------------------------------------------------------- /vello_tests/snapshots/big_colr.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:89162f768ee75f6c84317ae312578e425633895c03c92822b86cd37c970c926e 3 | size 16015 4 | -------------------------------------------------------------------------------- /vello_tests/snapshots/bitmap_undef.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:f88a18a4b17eb2f3e4e8057a7ebc47930f2d4a94e8fc0bb397264bac93b29725 3 | size 289 4 | -------------------------------------------------------------------------------- /vello_tests/snapshots/blurred_rounded_rect.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:700b4e27b371c609d7cc47c7dad623248d57cb2eac9eb3f90548adec59fc6f66 3 | size 121632 4 | -------------------------------------------------------------------------------- /vello_tests/snapshots/colr_undef.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:f88a18a4b17eb2f3e4e8057a7ebc47930f2d4a94e8fc0bb397264bac93b29725 3 | size 289 4 | -------------------------------------------------------------------------------- /vello_tests/snapshots/deep_blend.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:69f822f9fbe2de48420f5dee7ab0a502e022e65e08f99f2f16823927e8b63f95 3 | size 7000 4 | -------------------------------------------------------------------------------- /vello_tests/snapshots/fill_types.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:9e8e4396ee504ce60fb2b45a57a58eeff45008b3f78b612df858091752c4e06c 3 | size 82101 4 | -------------------------------------------------------------------------------- /vello_tests/snapshots/funky_paths.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:1eab962256121827ea6632be866c7ea654d6a6be45f8020fa9f5d06a67870988 3 | size 17989 4 | -------------------------------------------------------------------------------- /vello_tests/snapshots/gradient_extend.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:b6a055128e09745f2ceedd753431f32602c2c5618bd8a563123ae7670a2f5932 3 | size 55394 4 | -------------------------------------------------------------------------------- /vello_tests/snapshots/image_extend_modes_bilinear.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:2fa162de8710554b55fcd5ce3b867e861b931d597873a987a9a02a66994dc1b2 3 | size 121276 4 | -------------------------------------------------------------------------------- /vello_tests/snapshots/image_extend_modes_nearest_neighbor.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:be63213590040afe28bfc5f26add4e26ed65eb65c61db6efdba75c03cebbaf5f 3 | size 20018 4 | -------------------------------------------------------------------------------- /vello_tests/snapshots/image_sampling.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:b87eceba0c5ff30ad2b8e05dec72e25518b7fbd2d83d00d0750fcc7a059e6411 3 | size 83624 4 | -------------------------------------------------------------------------------- /vello_tests/snapshots/integer_translation.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:1ec4cbe4341b0a2f947aa027dd381f75b4d34e0af70c696fed50b729d61dab67 3 | size 3178 4 | -------------------------------------------------------------------------------- /vello_tests/snapshots/little_bitmap.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:37b4a114f3684281b04926671447ca3f6b0f0988d1f09434a06b8a20a28077c5 3 | size 1464 4 | -------------------------------------------------------------------------------- /vello_tests/snapshots/little_colr.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:05d069dcd6a872d86f1d988b65458503938f6cb8f30258994bd88a7e1fc4f3ba 3 | size 1950 4 | -------------------------------------------------------------------------------- /vello_tests/snapshots/longpathdash_butt.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:a1a23c2e7ab9018ff3517cbc96f64befe6fcf7836cca12c17ba6b9e612fda71f 3 | size 42426 4 | -------------------------------------------------------------------------------- /vello_tests/snapshots/many_clips.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:08ae2b90cea2d9f055d0b45cef370e980225f996ca81dceba171e0992dcb5596 3 | size 25513 4 | -------------------------------------------------------------------------------- /vello_tests/snapshots/non_integer_translation.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:51cb7033d35c9c8c2dfb23720faa7536334172a8d5fd2297dcc29d204a95d392 3 | size 3178 4 | -------------------------------------------------------------------------------- /vello_tests/snapshots/rounded_rectangle_watertight.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:6c8d031525fa9a146c43eb0b51bedf5aa7ed69af6dcb6acdef3e28e020b41c23 3 | size 821 4 | -------------------------------------------------------------------------------- /vello_tests/snapshots/scaled_hinted.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:8f933817a45ecc911b93d37de215369332fab79b515c87c431b952a29a45c9b8 3 | size 5723 4 | -------------------------------------------------------------------------------- /vello_tests/snapshots/simple_hinted.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:8a81f17cf473d5d2d4ed5b0c88e352abbb739bb2d8a49f8a5b76904f74e63b25 3 | size 3123 4 | -------------------------------------------------------------------------------- /vello_tests/snapshots/smoke/data_image_roundtrip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linebender/vello/33f4be83cedd7de855553ca9c5465a181ce32fea/vello_tests/snapshots/smoke/data_image_roundtrip.png -------------------------------------------------------------------------------- /vello_tests/snapshots/smoke/filled_circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linebender/vello/33f4be83cedd7de855553ca9c5465a181ce32fea/vello_tests/snapshots/smoke/filled_circle.png -------------------------------------------------------------------------------- /vello_tests/snapshots/smoke/filled_square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linebender/vello/33f4be83cedd7de855553ca9c5465a181ce32fea/vello_tests/snapshots/smoke/filled_square.png -------------------------------------------------------------------------------- /vello_tests/snapshots/smoke/two_emoji.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linebender/vello/33f4be83cedd7de855553ca9c5465a181ce32fea/vello_tests/snapshots/smoke/two_emoji.png -------------------------------------------------------------------------------- /vello_tests/snapshots/splash.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:a9146b72893d869c3894dbee87e640904d6d5645b1ca236f3f096aaefb34bcc8 3 | size 99856 4 | -------------------------------------------------------------------------------- /vello_tests/snapshots/stroke_styles.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:144176c89e644116dcc211e0e4341ed99bc72ff21732a9af40cb9f7a0b32e7b5 3 | size 96014 4 | -------------------------------------------------------------------------------- /vello_tests/snapshots/stroke_styles_non_uniform.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:17d592ab5fed53f2916e85f5d62d7ec7ff8b12ad8c4184b8ed7f09c6dc813068 3 | size 89907 4 | -------------------------------------------------------------------------------- /vello_tests/snapshots/stroke_styles_skew.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:ebf82e0c7414f4f455eaa7e623b84beb05ba4abd377283b303461326c549af4a 3 | size 100039 4 | -------------------------------------------------------------------------------- /vello_tests/snapshots/tricky_strokes.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:8d22d397f9a45be14784abe692e0b4fae16e555834876021d74e35d44f872043 3 | size 34733 4 | -------------------------------------------------------------------------------- /vello_tests/tests/regression.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2024 the Vello Authors 2 | // SPDX-License-Identifier: Apache-2.0 OR MIT 3 | 4 | //! Tests to ensure that certain issues which don't deserve a test scene don't regress 5 | 6 | use scenes::ImageCache; 7 | use vello::{ 8 | AaConfig, Scene, 9 | kurbo::{Affine, RoundedRect, Stroke}, 10 | peniko::{Extend, ImageQuality, color::palette}, 11 | }; 12 | use vello_tests::{TestParams, smoke_snapshot_test_sync, snapshot_test_sync}; 13 | 14 | /// Test created from 15 | #[test] 16 | #[cfg_attr(skip_gpu_tests, ignore)] 17 | fn rounded_rectangle_watertight() { 18 | let mut scene = Scene::new(); 19 | let rect = RoundedRect::new(60.0, 10.0, 80.0, 30.0, 10.0); 20 | let stroke = Stroke::new(2.0); 21 | scene.stroke(&stroke, Affine::IDENTITY, palette::css::WHITE, None, &rect); 22 | let mut params = TestParams::new("rounded_rectangle_watertight", 70, 30); 23 | params.anti_aliasing = AaConfig::Msaa16; 24 | snapshot_test_sync(scene, ¶ms) 25 | .unwrap() 26 | .assert_mean_less_than(0.001); 27 | } 28 | 29 | const DATA_IMAGE_PNG: &[u8] = include_bytes!("../snapshots/smoke/data_image_roundtrip.png"); 30 | 31 | /// Test for 32 | #[test] 33 | fn test_data_image_roundtrip_extend_pad() { 34 | let mut scene = Scene::new(); 35 | let mut images = ImageCache::new(); 36 | let image = images 37 | .from_bytes(0, DATA_IMAGE_PNG) 38 | .unwrap() 39 | .with_quality(ImageQuality::Low) 40 | .with_extend(Extend::Pad); 41 | scene.draw_image(&image, Affine::IDENTITY); 42 | let mut params = TestParams::new("data_image_roundtrip", image.width, image.height); 43 | params.anti_aliasing = AaConfig::Area; 44 | smoke_snapshot_test_sync(scene, ¶ms) 45 | .unwrap() 46 | .assert_mean_less_than(0.001); 47 | } 48 | --------------------------------------------------------------------------------