Skip to content

Add reference tests for drawing

Jeremy Soller requested to merge alexheretic:reference-test into master

Created by: alexheretic

At some point we'll optimise or otherwise improve the draw code. This pr add reference comparison tests to help avoid future regressions as well as equivalent benchmarks to track draw performance.

  • Add test render_to_reference_big_biohazard for 600px U+2623

    reference_big_biohazard

  • Add test render_to_reference_w for 16px 'w'

    reference_w

  • Add equivalent benchmarks

    test draw_big_biohazard ... bench:     913,826 ns/iter (+/- 19,329)
    test draw_w             ... bench:      10,220 ns/iter (+/- 289)

I suspect rasterize can be optimised a lot.

The reference tests & benchmarks should be added to as, for example, we add support for more font types.

Merge request reports