Use Rust implementation for clipboard #2079
Merged
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.
Fixes #958.
This PR removes the Python clipboard implementation and replaces it with calls into the Rust implementation powered by aboard. As is tradition with Rust, this makes copying images about 2 to 3 times faster on my windows machine. This will hopefully resolve our platform issues. We definitely need to test the new clipboard on our supported platforms before releasing it.
About the new Clipboard API itself: it's pretty simple. It only supports writing text and images, which is enough for us.
Clipboard.create_instance()
will throw an error if the current platform isn't supported. So we can potentially make a feature for this node if it turns out that aboard don't support some platform.This is still a draft because I haven't released a new version of
chainner_ext
with the clipboard API yet.