Repository navigation
Conversation
…er desktop test hosts in backend
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Completes the remaining slices of #565 on top of #1871 (macOS windowless
nsgotesthelpers):core,internal/driver):Scope.RenderDrawing(d *Drawing, size Size, scale float64, done func(image.Image, error))andEnv.CanRenderDrawings() boolbacked bydriver.ItemRenderDrawinganddriver.RenderDrawingRequest.driver.RenderPixelSize), resolves scale variants, copies pixel frames, enforces the owner'sAccessrules on image URIs inside the drawing, and enables canvas (and shader) linking on demand so minimal apps never pull in canvas players.apple.RenderDrawingAsync), Windows (Direct2D/DirectWrite), Linux (Cairo/Pango), Web (HTML Canvas2D), and headlessnsgotest(withApp.RenderDrawingoverride hook); Android, HarmonyOS, and mini-program backends answerdriver.NoDrawingRenderer(CodeUnavailable).nsgotestsupport:PlatformTextEngine(),RegisterFont([]byte) error, andRenderDrawing(*driver.Drawing, driver.Size, float64)ininternal/platform/windows/render.go(DirectWrite/Direct2D offscreen bitmap with private per-call image and nested-offscreen caches) andinternal/platform/linux/render.go(Cairo/Pango/Fontconfig without GTK or a display, via splitopenCanvasLibs()).nsgotest.PlatformTextEngine(),nsgotest.RegisterFont, andnsgotest.Renderon Windows and Linux alongside macOS.internal/driver/render_test.go,core/render_test.go,nsgotest/render_test.go, andnsgotest/render_macos_test.go(broadened to macOS/Windows/Linux).skills/nsgo/references/testing.md, and addedchangelog.d/render-drawing-offscreen.md.Verification
gofmt -lon all changed Go files: cleango tool nsgo test ./core ./internal/driver ./nsgotest ./internal/platform/apple ./internal/platform/macos ./internal/moduletest: passedNSGO_PLATFORM_DUPLICATES_BASE=origin/main go tool nsgo test -run '^TestPlatformFunctionDuplicates$' ./internal/moduletest: passedgo tool nsgo test -run TestRepositoryFragments ./tools/changelog: passedgo tool nsgo check -target macos,ios,windows_x64,linux_x64,android_arm64,web,harmonyos,watchos,tui -jobs 2: passedFixes #565.
🤖 Gemini 4 Neon