-
Notifications
You must be signed in to change notification settings - Fork 7
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
Redo layer creation to create a sub layer if needed #19
Merged
Conversation
This file contains 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
madsmtm
added
bug
Something isn't working
documentation
Improvements or additions to documentation
enhancement
New feature or request
labels
Sep 4, 2024
I think I intend to release v1.0 fairly shortly after this, as I feel like the API surface is now quite small, and I've spent a long time ensuring that the behaviour is as expected. |
madsmtm
force-pushed
the
proper-layer-init
branch
2 times, most recently
from
September 4, 2024 10:49
5a1caeb
to
56a1aa3
Compare
madsmtm
force-pushed
the
proper-layer-init
branch
from
September 4, 2024 11:04
56a1aa3
to
831e133
Compare
This was referenced Sep 4, 2024
Merged
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
documentation
Improvements or additions to documentation
enhancement
New feature or request
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.
Redo layer creation to match what's outlined in gfx-rs/wgpu#6107.
A deviation from that PR is that we track the bounds and scale factor from the super layer using observers. This fixes the issue in gfx-rs/wgpu#6107 (comment), and is also what I intend to do in Wgpu, but it's just a huge hazzle to do correctly without
objc2
, which Wgpu doesn't yet use.The new API is:
Layer::from_layer
Layer::from_ns_view
(replacesappkit::metal_layer_from_ns_view
andappkit::metal_layer_from_handle
)Layer::from_ui_view
(replacesuikit::metal_layer_from_ui_view
anduikit::metal_layer_from_handle
)Fixes #11 by removing dependency on
raw-window-handle
(since it's one line for the user to get a layer from the handle).I have tested this with a fork of
ash
, ofvulkano
and ofwgpu
, seems to work fine there.