Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Blade on MacOS via "macos-blade" feature #7669

Merged
merged 9 commits into from
Feb 16, 2024

Conversation

kvark
Copy link
Contributor

@kvark kvark commented Feb 11, 2024

Depends on zed-industries/font-kit#2 and kvark/blade#77

This change enables Blade to be also used on MacOS. It will also make it easier to use it on Windows.

What works: most of the things. Zed loads as fast and appears equally responsive to the current renderer.
Screenshot 2024-02-11 at 12 09 15 AM

Things missing:

  • video streaming. Requires a bit of plumbing on both Blade and Zed sides, but all fairly straightforward.
    • verified with a local setup
  • resize. Not sure where exactly to hook up the reaction on the window size change. Once we know where, the fix is one line.
  • fine-tune CA Layer
    • this isn't a blocker for merging the PR, but it would be a blocker if we wanted to switch to the new path by default
  • rebase on latest, get the dependency merged (need review/merge of update metal-0.25, core-graphics-0.23, and core-text-20.1 font-kit#2!)

Update: I implemented resize support as well as "surface" rendering on the Blade path (which will be useful on Linux/Windows later on). I haven't tested the latter though - not sure how to get something streaming. Would appreciate some help! I don't think this should be a blocker to this PR, anyway.

The only little piece that's missing for the Blade on MacOS path to be full-featured is fine-tuning the CALayer configuration. Zed does a lot of careful logic in configuring the layer, such as switching the "present with transaction" on/off intermittently, which Blade path doesn't have yet.

Release Notes:

  • N/A

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Feb 11, 2024
@kvark kvark force-pushed the blade branch 4 times, most recently from 86ee063 to 50a078e Compare February 12, 2024 08:06
@mikayla-maki
Copy link
Contributor

mikayla-maki commented Feb 12, 2024

To test the livestreaming, we have scripts for running multiple Zed instances, but you need to have your enviroment setup a little bit. See the instructions here for more details :D.

As for switching the transaction on and off, we added that so resizing works properly. See the details on our blog, particularly the addendum :)

@mikayla-maki mikayla-maki self-assigned this Feb 12, 2024
@kvark
Copy link
Contributor Author

kvark commented Feb 13, 2024

Was able to set up the local server and test the screen sharing with "macos-blade" - all looks good:
Screenshot 2024-02-12 at 11 33 15 PM

Gotta admit, it's very appealing as a tool for collaboration!

@kvark kvark force-pushed the blade branch 4 times, most recently from cdf09ed to f351a06 Compare February 15, 2024 04:07
@kvark kvark marked this pull request as ready for review February 15, 2024 04:07
@kvark
Copy link
Contributor Author

kvark commented Feb 15, 2024

Dependencies are updated, code is rebased. Please take another look @mikayla-maki !

@mikayla-maki mikayla-maki merged commit 9ad1862 into zed-industries:main Feb 16, 2024
6 checks passed
@mikayla-maki mikayla-maki mentioned this pull request Feb 16, 2024
12 tasks
@kvark kvark deleted the blade branch February 17, 2024 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants