-
Notifications
You must be signed in to change notification settings - Fork 50
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
Android platform #44
Comments
The most likely way to implement this would be via https://github.com/MarijnS95/ndk/compare/window-lock We can merge this into the |
Using |
@ids1024 There is a way to change the format, see how the example has a (commented out) way to do this: Unfortunately there's no support for https://docs.rs/ndk/latest/ndk/hardware_buffer_format/enum.HardwareBufferFormat.html |
Right. Hopefully we can at least expect In comparison Wayland's It seems we can't expect to use the same pixel format everywhere while also getting performant no-copy presentation. |
First draft pushed at https://github.com/MarijnS95/softbuffer/compare/android, untested but at least letting you folks know that this is being worked on :) |
Updated the branch, it is fully working now (but will need some cleanup before it is ready for a PR, though let me know if I should open it as draft already)! A couple important notes:
|
Currently, I think #98 is the most important missing feature/API in softbuffer. It's awkward if some platforms only support RGBX/RGBA but others only support BGRA/BGRX. We'll want an API that helps with conversion, but for maximum performance an application would have to support both...
I generally think it's good to have a draft PR. That makes it a bit more visible that some work has been done, and easy to comment on. Relative to just linking a branch on the issue. Exposing a |
Depends on whether you want to go for performance, convenient/consistent/simple API across all platforms, or both. In the NDK API I've added a helper function that returns an iterator yielding one mutable scanline/slice at a time without padding: https://github.com/MarijnS95/ndk/blob/b520751834fc7d5a6c9759fa9c9ea8ce3d0f3213/ndk/src/native_window.rs#L214-L230 Maybe this could help users? Or x/y getters/setters? The possibilities are (unfortunately) endless. |
EDIT: A bit of discussion on this happened in rust-windowing/swbuf#8 (comment)
The text was updated successfully, but these errors were encountered: