Skip to content

feat: Golden image tests for 2D rendering #432

Description

@kolkov

Part of gogpu/gogpu#373 — Headless Golden Image Testing (ADR-053), Phase 3.

Summary

Golden image tests for 2D rendering — automated regression detection for rasterizer algorithms, text rendering, clip masks, and transforms. Uses gogpu golden test harness (Phase 2) with headless software backend.

Part of the ecosystem-wide golden image testing initiative (gogpu ADR-053).

Test Coverage

Core Shapes

  • Circle, rectangle, rounded rect, ellipse, polygon
  • Stroke and fill variants
  • Anti-aliasing quality verification

Paths

  • Bezier curves, complex paths (>64 elements triggers CoverageFiller)
  • Path boolean operations
  • Self-intersecting paths

Text

  • Basic text rendering
  • ClearType LCD subpixel
  • Styled spans (bold, italic, color ranges)
  • RTL and bidirectional text

Transforms

  • Rotation, scale, translate, skew
  • Affine transforms
  • Nested transform stacks

Clip Masks (ADR-052)

  • Rectangular clip
  • Rounded rect clip
  • Three-tier clip architecture (bounds skip, pre-rasterized mask)

Rasterizer Algorithms

  • Force each algorithm and verify equivalent output:
    • AnalyticFiller (scanline AA)
    • SparseStrips (4×4 tiles)
    • TileCompute (16×16 tiles)
    • SDFAccelerator (GPU SDF shapes)

Regression Targets

  • RAST-009: unbounded float32 drift in acc across canvas width
  • GG-AA-020: FDot16 quantization artifacts
  • ClipMask wiring correctness
  • SparseStrips strip-gap reset

Blocked By

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions