Repository navigation
feat(canvas): draw canvases at a resolution scale below the display's density - #2511
Merged
Merged
Conversation
… density Closes #2261 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
oneo-me
force-pushed
the
agiox/canvas-resolution-scale
branch
from
November 26, 2026 11:56
09102c0 to
9a7bf1d
Compare
oneo-me
marked this pull request as ready for review
November 26, 2026 11:56
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.
Closes #2261
Adds
Canvas.ResolutionScale/ResolutionScaleFuncandCanvas.Sampling/SamplingFunc, to draw a canvas below the display's pixel density and stretch it to its box.driver.Drawing.Resolution,Upscale); a change resends the same ops without rerunningDraw. Values outside (0, 1) keep today's behaviour.contentsScale+ magnification filter), Android (backing bitmap + paint filtering), Windows (own Direct2D bitmap, linear/nearest), Linux (lower Cairo surface, one GSK scaled texture), the web (<canvas>backing size +image-rendering), watchOS (CGLayer) and mini programs (offscreen canvas size).OnPressandSizestay in points.nsgotest:View.ResolutionScale,View.CanvasSamplingandApp.CanvasScale(selector).canvastest.Resolutionsample, checked with smooth and nearest sampling on Apple, Windows (run on a Windows 11 device), Linux (run on a Linux device), the web and Android (emulator capture test, added to the emulator job); mini program and nsgotest unit tests.gpu.Viewoption.🤖 Claude Opus 5.5
🤖 Generated with Claude Code