feat: Allow reusing same shared IpcSharedMem for transfers#356
Merged
sagudev merged 2 commits intoservo:mainfrom Nov 10, 2024
Merged
feat: Allow reusing same shared IpcSharedMem for transfers#356sagudev merged 2 commits intoservo:mainfrom
sagudev merged 2 commits intoservo:mainfrom
Conversation
48764c0 to
d20de40
Compare
Member
Author
|
3ace188 to
656ba2b
Compare
Member
Author
jschwe
reviewed
Sep 9, 2024
jschwe
reviewed
Sep 9, 2024
Signed-off-by: sagudev <[email protected]>
Signed-off-by: sagudev <[email protected]>
656ba2b to
0b3bb83
Compare
4 tasks
jdm
approved these changes
Oct 31, 2024
Member
jdm
left a comment
There was a problem hiding this comment.
This seems reasonable as a fully-unsafe API. It would be nice if we could detect invalid usage at runtime similar to Arc::get_mut, but I don't have ideas for how to do that soundly.
Member
Author
The main problem is we would need to do cross-process locking which is costly, but we might want to implement this in the future to also fulfill other usecases. |
github-merge-queue bot
pushed a commit
to servo/servo
that referenced
this pull request
Apr 23, 2025
Each canvas context returns snapshot instead of just raw bytes. This allows as to hold off conversions (BGRA <-> RGBA, (un)premultiply) to when/if they are actually needed. For example when loading snapshot into webgl we can load both RGBA and BGRA so no conversion is really needed. Currently whole thing is designed to be able to be extend on servo/ipc-channel#356, to make less copies. Hence some commented out code. Fixes #35759 There are tests for these changes in WPT --------- Signed-off-by: sagudev <[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.
Simple "solution" to #126, it's not exactly zero-copy, but it allows to modify inner buffer of IpcSharedMem and then send it back. This is all
unsafebut we can uphold all safety variants forGPUBuffer(request-response msgs).Example
before:
after: