Use async presentation on macOS where possible.#11326
Merged
vorporeal merged 1 commit intoMay 19, 2026
Merged
Conversation
Contributor
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
Contributor
There was a problem hiding this comment.
Overview
This PR changes macOS Metal rendering so ordinary frames use asynchronous presentation while live resize temporarily restores transaction-backed presentation.
Concerns
- For this user-facing rendering/live-resize behavior change, please include screenshots or a short screen recording demonstrating normal rendering and live resize behavior end to end. The PR description currently includes textual manual testing, but no visual evidence.
Verdict
Found: 0 critical, 1 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
alokedesai
approved these changes
May 19, 2026
JMrtzsn
pushed a commit
to JMrtzsn/warpdrive
that referenced
this pull request
May 20, 2026
## Description This changes macOS Metal rendering to avoid transaction-backed presentation during normal frames, where it can force unnecessary CPU stalls while waiting on the command buffer. The `CAMetalLayer` now defaults to async presentation, and Warp only re-enables `presentsWithTransaction` during live window resize. The renderer reads the layer's current transaction mode and uses the matching presentation path, preserving smoother live-resize behavior without paying the synchronization cost for ordinary rendering. ## Linked Issue None. ## Testing - [x] I have manually tested my changes locally with `./script/run`. - Manually validated live resize behavior: with transactions disabled, I noticed jitter while resizing; with this patch, which re-enables transactions only during live resize, I did not notice that jitter. - Ran `cargo fmt --package warpui`. - Ran `./script/run-clang-format.py -i --extensions h,m crates/warpui/src/platform/mac/objc/host_view.h crates/warpui/src/platform/mac/objc/host_view.m crates/warpui/src/platform/mac/objc/window.m`. - Ran `cargo check -p warpui`. ## Agent Mode - [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode CHANGELOG-NONE Co-Authored-By: Oz <oz-agent@warp.dev>
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.
Description
This changes macOS Metal rendering to avoid transaction-backed presentation during normal frames, where it can force unnecessary CPU stalls while waiting on the command buffer.
The
CAMetalLayernow defaults to async presentation, and Warp only re-enablespresentsWithTransactionduring live window resize. The renderer reads the layer's current transaction mode and uses the matching presentation path, preserving smoother live-resize behavior without paying the synchronization cost for ordinary rendering.Linked Issue
None.
Testing
./script/run.cargo fmt --package warpui../script/run-clang-format.py -i --extensions h,m crates/warpui/src/platform/mac/objc/host_view.h crates/warpui/src/platform/mac/objc/host_view.m crates/warpui/src/platform/mac/objc/window.m.cargo check -p warpui.Agent Mode
CHANGELOG-NONE
Co-Authored-By: Oz oz-agent@warp.dev