Skip to content

Tags: gogpu/gg

Tags

v0.50.7

Toggle v0.50.7's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: variable font outlines ignore gvar under transforms (#405) (#435)

All 7 outline extraction paths now use ExtractOutlineHintedVar with
face.Variations(), matching the Skia/skrifa/FreeType invariant: gvar
deltas are glyph geometry, applied unconditionally regardless of
downstream transform or rendering path.

Cache keys (OutlineCacheKey, GlyphMaskKey, msdf.GlyphKey) include
VariationHash to prevent cross-variation cache poisoning.

ADR-054. 17 enterprise tests. wgpu v0.30.21 -> v0.30.22.

v0.50.6

Toggle v0.50.6's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
release: v0.50.6 — software backend GPU texture compositing (#433)

* feat: backend-agnostic draw queue + software GPU texture compositing (ADR-051)

Unified draw queue: all draw commands (shapes, paths, images, GPU textures,
text, glyph masks) flow through single pendingDraws slice with per-draw clip
snapshots (ADR-052). Dispatch at flush time routes to GPU render pass or CPU
SoftwareRenderer based on adapter strategy. Matches Skia Graphite DrawList
and Flutter DisplayList patterns.

Software backend (rasterAtlas strategy):
- Mixed CPU/GPU dispatch: shapes CPU-rasterized, textures GPU-composited
- ensurePipelineWithStencil for blit-only readback path
- uploadPixmapToView guard prevents overwriting offscreen texture content
- Three-tier clip: rect bounds + ClipMask snapshot + path (ADR-052)
- SurfacePixelWriter zero-copy present path
- DrawRecording + Snap() for future parallelism (ADR-053 Phase 0)

Requires wgpu v0.30.21 (CopyTextureToBuffer row stride, blend state,
BGRA readTexel fixes).

* test: enterprise test suite for draw queue, dispatch, clip, and profiling

80+ new tests across 5 files: canvas.Render mock tests (all 3 present paths),
draw queue dispatch verification, scissor group splitting, clip mask lifetime
safety, stroke dispatch pixel verification (TDD, diff=0). 30 profiling
benchmarks. Test files split by domain.

* feat: compositing + software overlay examples

compositing: boundary texture test with offscreen textures, DrawGPUTexture,
DrawImage, text, animated shapes. Catches invisible boundary bugs on all backends.

software_overlay: minimal DrawGPUTexture test — bright red+green offscreen
overlay on blue background. Regression test for software backend compositing.

* docs: CHANGELOG v0.50.5, ARCHITECTURE software backend, deps wgpu v0.30.21

CHANGELOG: unified draw queue (ADR-051), three-tier clip (ADR-052), software
backend 5-bug fix, SurfacePixelWriter zero-copy, enterprise test suite,
performance optimizations (P0-P3).

ARCHITECTURE: new Software Backend Strategy section documenting rasterAtlas
flow, key invariants, BGRA swizzle chain.

Dependencies: wgpu v0.30.20 → v0.30.21 (CopyTextureToBuffer row stride,
blend state, BGRA readTexel fixes). Example go.mod/go.sum updates.

* fix: resolve nestif lint in readback pipeline guard

v0.50.5

Toggle v0.50.5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: software backend — deviceReady split, MSAA probe, zero-copy pres…

…ent (#430)

* fix: split deviceReady from gpuReady for software offscreen textures

Separate device availability (texture/buffer ops) from shape pipeline
readiness (SDF/stencil/convex). On rasterAtlas strategy, deviceReady=true
but gpuReady=false — device is alive for offscreen compositing while
shape pipelines are skipped (SPIR-V hang). Matches Skia Graphite where
TextureProxy::Make() works regardless of PathRendererStrategy.

- CreateOffscreenTexture checks deviceReady instead of gpuReady
- ensurePipelines() skips SDF/stencil/convex on rasterAtlas
- IsDeviceReady() accessor for texture-level readiness
- Close() resets both flags
- 8 new tests for the split

* fix: replace hardcoded MSAA sampleCount=4 with probe in all GPU tests

48 test sites assumed hardware GPU with 4x MSAA. On software backends
(llvmpipe, SwiftShader) this fails — SampleCount=4 rejected. Added
testSampleCount(t, device) helper that delegates to production
resolveSampleCount (Skia Graphite probe pattern). Tests now pass on
both hardware (4x) and software (1x) backends.

* chore: update wgpu v0.30.12 + gogpu v0.44.2 (TextureView.Texture accessor)

* feat: software offscreen upload via Queue.WriteTexture (Skia rasterAtlas)

On rasterAtlas strategy, Flush() with offscreen target.View uploads
CPU-rasterized pixmap to GPU texture via Queue.WriteTexture — no render
pass needed. RGBA→BGRA swizzle for format match. Added CopyDst usage
to offscreen texture for WriteTexture compatibility.

Requires wgpu v0.30.12 TextureView.Texture() accessor.

* test: uploadPixmapToView + Flush rasterAtlas integration tests

7 tests covering software offscreen upload path:
- uploadPixmapToView with real noop device + offscreen texture
- Nil queue, empty data, nil view edge cases
- Flush rasterAtlas triggers upload (pending==0 + offscreen view)
- Flush full strategy skips upload (goes to flushVello)
- RGBA swizzle path coverage

* feat: SurfacePixelWriter zero-copy path in ggcanvas.Render

On software backend, bypass texture creation + render pass + SPIR-V.
SurfacePixelWriter duck-typed interface: if RenderTarget implements
WriteSurfacePixels, write pixmap directly to surface framebuffer
(single memcpy+swizzle). Falls through to universal path if unavailable.

Requires gogpu RenderTarget to implement SurfacePixelWriter by
delegating to wgpu.Surface.WritePixels (wgpu v0.30.14+).

* chore: update wgpu v0.30.17 + gogpu v0.44.4 + deps cascade

Dependencies: wgpu v0.30.12 → v0.30.17 (PresentPixels, TextureView.Texture,
Tier 1 blit, goffi v0.6.0), gogpu v0.44.2 → v0.44.4 (WriteSurfacePixels),
gpucontext v0.21.0 → v0.21.1, x/sys v0.46.0 → v0.47.0.

SurfacePixelWriter damage rect fix: forward rects BEFORE PresentPixels
(it reads ws.damageRects internally).

v0.50.4

Toggle v0.50.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
chore: v0.50.4 — deps update + public docs sync (#428)

Dependencies: x/image v0.43.0 → v0.44.0, x/text v0.39.0 → v0.40.0.
Updated ROADMAP.md, ARCHITECTURE.md, CHANGELOG.md to v0.50.4.

v0.50.3

Toggle v0.50.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
chore: v0.50.3 — wgpu v0.30.10, gogpu v0.44.1, x/text v0.39.0 (#419)

v0.50.2

Toggle v0.50.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
chore: v0.50.2 — wgpu v0.30.9, gogpu v0.43.4, composite tests (#417)

* fix(examples): add WithContinuousRender(true) for gogpu v0.43.3

gogpu v0.43.3 changed default to event-driven rendering.
Examples using animation/continuous updates need explicit opt-in.

* chore: v0.50.2 — wgpu v0.30.9 (goffi fix), gogpu v0.43.4, composite tests

- wgpu v0.30.8 → v0.30.9 (goffi v0.5.6 callback stack-move fix)
- gogpu v0.43.3 → v0.43.4 (cascade)
- Examples: WithContinuousRender(true) for event-driven default
- Composite glyph tests + doc fixes
- CHANGELOG finalized for v0.50.2

v0.50.1

Toggle v0.50.1's commit message
chore: finalize CHANGELOG for v0.50.1

v0.50.0

Toggle v0.50.0's commit message
chore: finalize CHANGELOG for v0.50.0

v0.49.6

Toggle v0.49.6's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat(text): enterprise auto-hinter — skrifa golden test parity (#405) (

…#406)

Enterprise-grade auto-hinter ported from Google skrifa (fontations),
matching Chrome/Android font rendering algorithms. 17/19 golden tests
pass with diff=0 against skrifa reference output.

Auto-hinter pipeline (skrifa parity):
- Script-aware detection: Hebrew, CJK, Cyrillic, Greek, Arabic
- Hebrew LONG blue zones (vertical serif avoidance)
- CJK full pipeline: segment linking, edge detection, edge hinting,
  stem width quantization (114/114 coordinates diff=0 on NotoSerifTC)
- Blue zones: int32 arithmetic, skrifa flag bitfield, position/overshoot
  separated, per-script character lists
- 26.6/16.16 fixed-point throughout (FreeType/skrifa integer parity)

Hinted advance widths (ADR-049):
- EdgeMetrics advance adjustment (skrifa instance.rs parity)
- GlyphAdvance HintingNone→HintingFull (pixel-rounded advances)
- Eliminates 1.22px spacing drift over 26 characters

Key fixes:
- adjustSegmentHeights: int>>1 (was float /2)
- isCornerFlat: skrifa JIT triangle inequality (was cross/dot)
- CJK alignEdgePoints: delta mode (was snap for all scripts)
- fixedMul/fixedDiv: sign-aware rounding (skrifa Fixed::Mul parity)
- Scale computation: truncation (was math.Round)
- Blue edge direction: V-dim uses dirLeft (was dirUp)

Golden tests: 17 PASS (Hebrew coords, CJK coords, Ahem, segments,
edges, hinting, metrics, widths, blues, advances, multi-size).
2 SKIP: C2SC (needs shaper), Cantarell (CFF parser).

New files: autohint_scripts.go, autohint_iup_debug_test.go
New fonts: ahem.ttf, notoseriftc_autohint_metrics.ttf,
autohint_cmap.ttf, cubic_glyf.ttf (from skrifa test data)

+10,830 LOC. skrifa = sole reference (ADR documented).

v0.49.5

Toggle v0.49.5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix(text): grid-fit aliased variable font outlines (Skia FT_LOAD_TARG…

…ET pattern) (#404)

Apply gridFitOutline to go-text extracted outlines for aliased mode only.
AA rendering uses unhinted outlines (smooth anti-aliasing compensates).
Follows Skia/FreeType pattern: FT_LOAD_TARGET_MONO for kAlias,
FT_LOAD_TARGET_NORMAL (lighter hinting) for kAntiAlias.

Enterprise auto-hinter upgrade tracked in separate issue.