8000 Tags · gogpu/gg · GitHub
[go: up one dir, main page]

Skip to content

Tags

Tags

v0.52.5

Toggle v0.52.5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
release: v0.52.5 — raster backend device scale + anchored text offset (…

…#525)

* fix(recording): preserve device scale across draw operations (Skia fInitialCTM)

FillRect, setPath, SetClip, and SetTransform called ctx.Identity()
which reset the device Scale(2,2) set in Begin(). Result: at 2x scale,
content rendered in top-left quadrant only (25% coverage).

Fix: applyDeviceScale() replaces Identity() — resets CTM to device
scale instead of identity. SetTransform composes device scale with
recorded transform (Skia fInitialCTM * r.matrix pattern).

4 new tests: FillRect, FillPath, Clip, SetTransform — all at 2x scale.

* fix(recording): compute DrawStringAnchored offset at record time

Recorder.DrawStringAnchored and StrokeStringAnchored ignored ax/ay
anchor parameters entirely — text was drawn at raw (x,y) without
offset. Right-aligned text (ax=1.0) extended past the intended
position instead of ending at it.

Fix: compute anchor offset at record time using text.Measure + face
metrics, matching Context.DrawStringAnchored exactly. Final baseline
position stored in command (Skia SkTextBlob pre-positioned pattern).

Pixel-perfect match verified: direct X=[226,348] = recording X=[226,348].

* release: v0.52.5 — raster backend device scale + anchored text offset

v0.52.4

Toggle v0.52.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
release: v0.52.4 — recording DrawText, HiDPI scale, font ID fix, dead…

… code removal (#523)

* docs: add star history chart (starhistory.io)

* fix(lint): range over string instead of []rune(string) in benchmark

staticcheck SA6003: ranging over []rune(string) allocates; range over
string yields runes directly without allocation.

* fix(recording): implement DrawText + HiDPI scale in raster backend

DrawText was a no-op — font face not stored in commands, passed as nil
at playback. Now DrawTextCommand carries text.Face (GC ref-count,
matching Skia sk_sp<SkTextBlob> / Cairo cairo_scaled_font_reference).
Font size scaled by CTM at record time for world-space playback.

NewBackendWithScale(scale) creates enlarged pixel buffer with uniform
scale transform (Skia fInitialCTM / Cairo replay_with_transform pattern).

5 new tests: text rendering, nil face safety, scaled font size,
2x backend dimensions, 2x backend text.

* release: v0.52.4 — recording DrawText, HiDPI scale, font ID fix, dead code removal

v0.52.3

Toggle v0.52.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
release: v0.52.3 — NoAA stroke fix, platform font smoothing, deps upd…

…ate (#511)

v0.52.2

Toggle v0.52.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
release: v0.52.2 — 7 community bug fixes (@besmpl) + clip transform p…

…arity fix (#507)

- fix: concurrent global text cache race (#494)
- fix: path bounds across Reset/Append/Clone (#497)
- fix: premultiplied alpha double-mult in scene renderer (#500)
- fix: HiDPI layer/mask dimensions (#502)
- fix: transformed rectangular clips (#503)
- fix: recording stroke rectangles under transforms (#498)
- fix: recording clips were no-ops (#499)
- fix: recording ClipRoundRect transform parity (#499+#503 interaction)

v0.52.1

Toggle v0.52.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
< 8000 /dialog-helper>
fix: remove orphaned gogpu/ui dep + docs ARCHITECTURE.md (ADR-067)

* chore: update examples to gg v0.52.0, gogpu v0.52.0, gpucontext v0.27.0

* docs: update ARCHITECTURE.md for ADR-065/066/067 (compositor delegation, damage pipeline)

* fix: remove orphaned gogpu/ui dependency from go.mod

tmp/third_party_baseline and tmp/waviness_demo had no own go.mod,
causing go mod tidy to pull gogpu and ui into gg's module scope.
gg is a pure drawing library — must not depend on gogpu or ui.

* docs: add CHANGELOG entry for v0.52.1

v0.52.0

Toggle v0.52.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
refactor: compositor architecture migration (ADR-067)

Move compositor ownership from gg to gogpu:
- Remove preserveContent from GPURenderSession (compositor decides LoadOp)
- Delegate MSAA overlay compositing via SurfaceCompositor interface
- Per-frame compositor via GPURenderTarget.Compositor field
- selectBaseLayer uses target.PreserveContent (not frameRendered)
- shouldPreserveSurface checks compositor.ShouldPreserveContent()
- Legacy fallback preserved for standalone gg without gogpu
- Tests updated for new compositor signal path

Enterprise pattern: drawing library receives compositor context per-frame,
same as Chromium PlaybackToCanvas, Flutter ScopedFrame, GTK4 GSK render.

v0.51.0

Toggle v0.51.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
release: v0.51.0 — damage overlay + TT advance cache (#491)

* feat: migrate ggcanvas to DamageReporter API (ADR-065 + ADR-066)

- DamageRectSetter → DamageReporter via RegisterDamageSource('gg')
- damage_debug.go → implements DamageOverlayRenderer with text labels
- Per-source colors, anti-aliased borders, reason detail in labels
- 67 ggcanvas tests passing

Part of: #437

* docs: GOGPU_DEBUG_DAMAGE=1 → =overlay (pre-v1.0 clean cut)

* perf(text): TT advance cache + deps bump + examples update (#490)

- Per-(ppem, glyphID) advance cache in ttHintCacheEntry avoids
  re-running TT bytecode interpreter for advance-only queries.
  60fps→15fps regression from v0.50.13 advanceResolver fixed.
- deps: gpucontext v0.26.0, wgpu v0.31.0, gogpu v0.51.0
- examples: migrate LoadFontFace to text.NewFontSourceFromFile API
- multi_damage_demo: single-path spinner, FPS counter, proper overlay

* fix(lint): remove unused const, fix staticcheck SA4023 in overlay test

v0.50.16

Toggle v0.50.16's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix(text): variable font advance + shear aliased rendering (#405) (#489)

* fix(text): variable font advance + shear aliased rendering (#405)

Two fixes for variable font regression reported by @tsl0922:

1. drawGlyphsVariable used TT-hinted phantom advances (integer-rounded)
   for positioning while Face.Advance/MeasureString used HVAR (fractional).
   Now uses HVAR via varOrRawAdvance(), matching FreeType ttgload.c:964-977.
   Also fixed faceGlyphAdvance to use advanceResolver for MultiFace/FilteredFace.

2. Aliased text with shear/rotation produced garbled output because
   NoAAFiller cannot handle non-axis-aligned paths. Now forces AA for
   non-axis-aligned outlines in both drawStringCPUAliased and drawStringCPU,
   matching Skia computeAxisAlignmentForHText pattern.

8 new tests covering advance consistency and shear rendering quality.

* fix(test): skip ink-width assertion when font lacks test glyphs

Cantarell VF trimmed has no Latin glyphs — rightmostInk=-1 on CI.
Skip subtest instead of failing with impossible -50px width.

v0.50.15

Toggle v0.50.15's commit message
Merge branch 'main' of https://github.com/gogpu/gg

v0.50.14

Toggle v0.50.14's commit message
Merge branch 'main' of https://github.com/gogpu/gg

0