Skip to content

Vision 3: Native image and drawing backends - #58

Draft
ShaharMS wants to merge 101 commits into
devfrom
refactor/vision-native
Draft

ShaharMS wants to merge 101 commits into
devfrom
refactor/vision-native

Conversation

@ShaharMS

@ShaharMS ShaharMS commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Vision 3 backend and Screen API

Vision keeps its Haxe image API and uses platform backends where available. Screen draws to a browser canvas, a Windows window, or a portable in-memory surface. Bounds are writable and frame waits use the same API across targets. Browser WebGL attachments can perform whole-image inversion, simple grayscale, and black-and-white thresholding on the device. The portable Haxe implementation covers the other image operations.

  • Export ScreenBackend and ImageBackend from vision.native and keep platform implementations in their respective packages.
  • Keep the HashLink Windows extern beside its C bridge.
  • Register Screen and WebGPU coverage in the existing utest runner.
  • Remove the root scripts, documentation examples, and Cursor setup. CI builds the bridge and can package a release.
  • Implement standalone Screen windows on Linux and macOS.

Windows Screen supports hxcpp and HashLink bytecode. Cross-target CI

Image algorithms and text

  • E-means color clustering and posterization
  • Harris corner detection as the public entry point, with raw scores available through Harris
  • Overlapping-pattern synthesis and ConvChain texture sampling
  • Planar panorama stitching for ordered, overlapping photos
  • Scale2x pixel-art enlargement
  • Browser text drawing with bidirectional shaping, OpenType font loading, and ligatures
  • Portable Haxe text drawing for TrueType, CFF1 OpenType, and WOFF 1
  • Portable WOFF2 decoding and reconstruction
  • Font and Glyph API with individual format readers and HaxeDoc
  • Portable CFF2 and full complex-script shaping

Portable image codecs

  • Sequential and progressive JPEG decoding and sequential JPEG encoding.
  • Still lossless WebP decoding and encoding, including alpha.
  • Lossless animated WebP with frame composition, timing, and loop count.
  • CMYK and YCCK JPEG decoding and Adobe CMYK encoding.
  • OpenType horizontal pair kerning for portable text.
  • Lossy WebP decoding and encoding, including lossy animation frames.
  • AV1 and HEVC bitstream framing and entropy decoding.
  • AV1 lossless block transforms and HEVC intra prediction and 4x4 transforms.
  • HEIC and AVIF complete pixel decoding and encoding.

Plan: .cursor/plans/vision-3-backends-overview.md
Plan: .cursor/plans/vision-3-backends-1-image-storage.md
Plan: .cursor/plans/vision-3-backends-2-browser-drawing.md
Plan: .cursor/plans/vision-3-backends-3-framework-drawing.md
Plan: .cursor/plans/vision-3-backends-4-bulk-operations.md
Plan: .cursor/plans/vision-3-backends-5-standalone-native.md
Plan: .cursor/realized/vision-3-backends-6-target-qualification.md
Plan: .cursor/plans/vision-3-integration-1-library-layout.md
Plan: .cursor/plans/vision-3-integration-2-image-backing.md
Plan: .cursor/plans/vision-3-integration-3-operation-dispatch.md
Plan: .cursor/plans/vision-3-integration-4-native-drawing.md
Plan: .cursor/realized/vision-3-integration-5-examples-and-tests.md
Plan: .cursor/realized/image-api-guide-1-examples.md
Plan: .cursor/plans/screen-1-public-api.md
Plan: .cursor/plans/screen-2-desktop.md
Plan: .cursor/plans/screen-3-examples.md
Plan: .cursor/plans/screen-2-desktop.md
Plan: .cursor/realized/screen-2-desktop.md
Plan: .cursor/realized/screen-lifecycle-1-api.md
Plan: .cursor/realized/screen-frame-requests-1-scheduling.md
Plan: .cursor/realized/screen-poll-1-waits.md
Plan: .cursor/realized/backend-cleanup-1-bindings.md
Plan: .cursor/realized/backend-cleanup-1-bindings.md
Plan: .cursor/realized/hashlink-screen-1-windows.md
Plan: hevc-coefficient-reconstruction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant