Repository navigation
fix(mac): disable unstable Skia Graphite renderer to stop stale-tile corruption after idle - #10643
Merged
Merged
Conversation
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughUpdated 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 2026
Co-authored-by: OrcaWin <[email protected]>
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.
Supersedes #10457 (rebased onto current
main, plus measured perf/security evidence).Description
On macOS, Chromium 150 defaults to Skia Graphite (the new Metal-backed GPU backend). Graphite can strand corrupt/stale compositor tiles after the app sits idle or the user switches away and back — the window comes back with garbled or frozen regions until something forces a full repaint.
This adds a single macOS-only Chromium switch that selects the previous, long-stable Ganesh backend:
VS Code hit the identical bug and shipped the identical workaround (microsoft/vscode#284162 → PR microsoft/vscode#288141, merged Jan 2026, on a contemporaneous Chromium vintage).
This is a backend selection, not a downgrade. Hardware acceleration, GPU compositing, WebGL, canvas, rasterization, and video decode all stay enabled.
ELI5
macOS gives apps two different "paint engines" for drawing the window. Chrome recently switched everyone to the new one (Graphite). The new one has a bug where, after you leave Orca alone for a while, some of what it already painted gets stuck on screen — smeared or frozen tiles.
This change tells Orca "use the older paint engine (Ganesh) on Macs." The older engine is still fully GPU-accelerated — it was the default for years and is what Orca used until very recently. Nothing gets slower or less safe; we just stop using the engine with the visual bug.
Proof of fix
The switch is real and does exactly what it claims — verified empirically on this Mac (Apple M4 Max, macOS 26.3.1, Electron 43.1.0 / Chromium 150.0.7871.47) by querying Chromium's own GPU state:
skiaBackendTypeskia_graphitefeatureGraphiteDawnMetalenabled_onGaneshGLdisabled_offSo the fix flips the exact backend the corruption originates in. Supporting evidence:
disable-skia-graphiteandenable-skia-graphiteexist as exact strings in the shipped Electron 43.1.0 framework binary — not a typo'd no-op.IsSkiaGraphiteEnabled()checkskDisableSkiaGraphitefirst, with veto power over Finch/field-trial state.gpu_process_host.cc'skSwitchNamesallowlist includes the switch, so it propagates from the browser process to the GPU process — which is whyappendSwitchpre-whenReadyis the correct (and required) window.Proof of no perf degradation
Measured on this machine, A/B, alternating runs (not back-to-back blocks, to control for thermal drift):
Canvas/raster throughput (unthrottled, gradients + paths + text, 5s):
Within run-to-run noise; the two backends interleave across runs.
WebGL — the path terminals actually use (xterm.js WebGL renderer, 5s,
gl.finish()-fenced):Effectively identical — expected, because xterm.js WebGL goes through ANGLE/command-buffer, which is independent of the Skia backend.
Startup + memory:
Ganesh is marginally lighter (~10 MB less across 4 processes) and loads no slower.
Honest caveat: Graphite's design goal is higher throughput via multithreaded recording, so on paper there is some upside being forfeited. I could not measure it on any Orca-relevant workload, and I found no public benchmark quantifying it for Electron-style app chrome (as opposed to heavy canvas/CSS-effects pages). Frame-pacing tests pinned both backends at vsync (60.1 fps, p99 17.6 ms, identical). Treat the give-back as real but bounded and below measurement noise here.
Proof of no security degradation
This is purely a rasterization backend selection inside the existing GPU sandbox. It is categorically different from
--no-sandbox/--disable-gpu-sandbox, which remove process-isolation boundaries.gpu_compositing,webgl,webgl2,rasterization,2d_canvas, andvideo_decodeall remainenabled.Trade-offs / user-facing regressions
Scope note
kSkiaGraphiteisFEATURE_ENABLED_BY_DEFAULTonly underBUILDFLAG(IS_APPLE); Windows and Linux default to disabled at the code level, so gating todarwinis correct today. VS Code applies the switch unconditionally on all platforms as insurance against a future Finch flip enabling Graphite elsewhere. I kept the narrower darwin gate because it precisely matches current upstream defaults and keeps non-Mac behavior provably untouched.Adversarial review
Two independent sub-agent review loops (a frontier-model reviewer researching Chromium/Skia source + upstream precedent, and a codebase-consistency reviewer), briefed to be adversarial and to verify every claim against real source rather than infer.
Result: clean — both returned "ready to ship, no blockers."
Both independently investigated and dismissed the one design concern I raised (does a macOS user who hit the GPU-crash fallback miss this fix?). Answer: no —
gpuFallbackActiveThisLaunchcan only ever betrueon win32, enforced in three places (index.ts:1377platform guard,index.ts:1367-1373null environment off-win32, andgpu-fallback-marker.tshard-typingplatform: 'win32'at parse/validate). macOS therefore always reachesenableMainProcessGpuFeatures(). That invariant is already pinned by an existing test ("clears an active marker outside Windows" ingpu-fallback-marker.test.ts).Testing
pnpm exec vitest run --config config/vitest.config.ts src/main/startup/configure-process.test.ts— 27/27 passpnpm exec oxlint src/main/startup/configure-process.{ts,test.ts}— cleanpnpm run typecheck:node— cleandisableHardwareAccelerationis never called. Verified no cross-test pollution (per-iterationmockClear,afterEachplatform restore).Note on the previous CI failure
#10457's
verifyfailure was pre-existing and unrelated — a release-workflow contract assertion (package-electron-runtime-contract.test.mjs, aboutgenerate-skill-bundle-manifestin the release-cut script). I confirmed it fails identically on pristineorigin/main, with no involvement from this PR's files. This branch is rebased onto currentmain(the original was 50 commits behind).Made with Orca 🐋