[GUI] Replace GDI/FreeType per-glyph SKPath extraction and multi-pass LCD FBO text emulation with native Skia GPU glyph atlas
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- csharp
- Domain
- desktop, performance
Research direction
Start with sources/Cairo/wrapper/RecordedGuiDrawing.cs and RecordedGpuBlur.cs, then trace the production GPU text rendering path and its Skia Ganesh canvas usage. Check the font and recorder parity tests in Optimum.Tests, including the 65 Linux failures cited in the issue. Done means GPU text uses native SKFont or SKTextBlob drawing and the custom GDI/FreeType extraction and dual-surface LCD compositing paths are removed.
Written by the indexing model from the issue text.
Description
Problem
To emulate Cairo/Pixman subpixel text output pixel-for-pixel, the current GUI text pipeline bypasses Skia Ganesh's native GPU glyph atlas:
WindowsGdiTextCoverageandSkiaHintedFontOutlinesinvokegdi32.dllon Windows andlibfreetypeon Linux to extract hinted glyph outlines and convert individual glyphs intoSKPathobjects (sources/Cairo/wrapper/RecordedGuiDrawing.cs:280-530).RecordedGpuBlur.DrawLcdText(sources/Cairo/wrapper/RecordedGpuBlur.cs:180-310) renders text twice into separatelcdBlackandlcdWhiteoffscreen GPU surfaces and composites them with a customSKRuntimeEffectshader.
Converting text into per-glyph SKPath geometry or dual-FBO offscreen passes defeats Skia's internal GPU glyph cache/atlas, adds thousands of lines of platform P/Invoke code, and leaves 65 font/recorder parity tests failing in Optimum.Tests on Linux.
Proposed Fix
- Render GUI text on the GPU path using native
SKFont/SKTextBlobdrawing directly onto the targetSKCanvasso Skia Ganesh caches glyphs in its GPU atlas and batches text in a single pass. - Remove the custom GDI/FreeType outline extraction and dual-surface LCD compositing paths from the production GPU renderer.
- Dominant language
- C#
- Stars
- 22
- Forks
- 4
- Avg merge
- 1h 11m
- Merged PRs (30d)
- 40
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from StratumServer/Optimum
-
complexity: hard enhancement performance rendering
Difficulty 5/5 Over a week Newbie friendliness 25/100
StratumServer/Optimum#230 ·
Maintainers usually reply within 1 day
-
complexity: easy performance rendering
Difficulty 4/5 3-5 days Newbie friendliness 52/100
StratumServer/Optimum#228 ·
Maintainers usually reply within 1 day
-
complexity: medium performance rendering
Difficulty 5/5 Over a week Newbie friendliness 32/100
StratumServer/Optimum#227 ·
Maintainers usually reply within 1 day
-
complexity: medium enhancement rendering
Difficulty 5/5 Over a week Newbie friendliness 24/100
StratumServer/Optimum#226 ·
Maintainers usually reply within 1 day
-
[GUI] Avoid per-command clip array cloning and redundant SKPath allocations in SurfaceRecorderPossibly taken @Zaldaryon claimed this today. Opencomplexity: medium performance rendering
Difficulty 4/5 3-5 days Newbie friendliness 35/100
StratumServer/Optimum#224 ·
Maintainers usually reply within 1 day
All issues in StratumServer/Optimum
Similar issues
-
Incorrect loop bound in SizeOptIListSelectIterator.ToListPossibly taken @equmagg claimed this today. Openarea-System.Collections untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
dotnet/runtime#137126 · 1 comment ·
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 1/5 1-3 hours Newbie friendliness 76/100
Azure/azure-sdk-for-net#64658 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
dotnet/aspnetcore#70370 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
NethermindEth/nethermind#15684 ·
Maintainers usually reply within 1 day
-
area/ai-assistant squad/flyt
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Altinn/altinn-studio#21798 ·
Maintainers usually reply within 1 day