-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
wayland: add support for single-pixel-buffer-v1 protocol #17298
wayland: add support for single-pixel-buffer-v1 protocol #17298
Conversation
I think single pixel buffers are only really useful in special cases. It could be used instead of the splash screen to display black at the window scale. RetroArch/gfx/common/wayland_common.c Line 643 in 8864062
However this would still need a fallback for compositors that don't support single pixel buffers and I'm not sure would have much of a benefit. |
Do you have any suggestions? |
In the Also to test it you need two monitors attached or make this line always true: RetroArch/gfx/common/wayland_common.c Line 847 in 8864062
|
@ColinKinloch latest commit works as you suggests |
This line from #17309 should allow the single pixel buffer to be scaled at a sensible size. RetroArch/gfx/common/wayland_common.c Lines 638 to 639 in f276757
Also if you change these to DEFAULT_WINDOWED_WIDTH and DEFAULT_WINDOWED_HEIGHT etc. the window will not be arbitrarily the size of the splash screen image:RetroArch/gfx/common/wayland_common.c Lines 682 to 683 in f276757
edit: It won't produce a single pixel window. The viewport is correctly sized by a previous configure event.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from the nitpick. This seems fine to merge as is.
I'll update #17309 after.
Thank you! |
Hopefully I merged these two PRs in the right order. |
Description
Add support for
single-pixel-buffer-v1
protocol for optimizing the use of thewl_shm
1x1 pixel case. I'm not sure I implemented the creation of a single-pixel buffer correctly in its current form, so a review is required. Also note that support for this protocol is currently available in GNOME and wlroots.See https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/single-pixel-buffer/single-pixel-buffer-v1.xml
Related Issues
No
Related Pull Requests
No
Reviewers
@ColinKinloch