Repository navigation
Conversation
Contributor
Author
|
The Android check failed before it checked out the code: Docker Hub refused to pull the |
`create_metal_view` ignored `high_dpi`. `MTKView` sizes its drawable for the window's backing scale, and `update_dimensions` derived `dpi_scale` from that same scale, so `high_dpi: false` still rendered at 2x on a Retina display, with a `dpi_scale` of 2. Without high DPI, the view no longer resizes its drawable itself, and `update_dimensions` keeps `dpi_scale` at 1 and sizes the drawable in points, which the window scales up, as the OpenGL path does with `setWantsBestResolutionOpenGLSurface: NO`. It compares against the drawable's current size rather than relying on `dim_changed`, since the first call, right after the view joins the window, usually finds the size `Conf` asked for already recorded. Verified on a Retina display: a 300x200 window with `high_dpi: false` now reports a 300x200 screen at a `dpi_scale` of 1 instead of 600x400 at 2, and renders and reads back at that size. `high_dpi: true` is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
benface
force-pushed
the
macos-metal-high-dpi
branch
from
October 18, 2026 17:57
90d97be to
73041bd
Compare
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.
Why
create_metal_viewignoreshigh_dpi.MTKViewsizes its drawable for the window's backing scale, andupdate_dimensionsderivesdpi_scalefrom that same scale, so on a Retina displayhigh_dpi: falsestill renders at 2x, with adpi_scaleof 2. The OpenGL path honours it, throughsetWantsBestResolutionOpenGLSurface: NO.This is the macOS side of #654, which does the same for iOS and tvOS. The two are independent.
Change
setAutoResizeDrawable:).update_dimensionskeepsdpi_scaleat 1 and sizes the drawable in points, which the window scales up, as on the OpenGL path.dim_changed, since the first call, right after the view joins the window, usually finds the sizeConfasked for already recorded.high_dpi: trueis unchanged.Verification
high_dpi: falsenow reports a 300x200 screen at adpi_scaleof 1, instead of 600x400 at 2, and renders and reads back at that size.high_dpi: trueis unchanged.high_dpi: false, and gets frames the size of its 900x700 window.cargo checkpasses foraarch64-apple-darwin,aarch64-apple-iosandaarch64-apple-tvos.🤖 Generated with Claude Code