This repository was archived by the owner on Nov 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 341
output: take a wlr_buffer in set_cursor #2507
Merged
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
72088e9
to
2adb373
Compare
10 tasks
085aefa
to
b6c8d9b
Compare
Closed
fe4edd6
to
90e1aa7
Compare
This is now working fine on multi-GPU setups. |
c126d03
to
1508f60
Compare
8349edd
to
352e7c1
Compare
7662d25
to
1d561c9
Compare
45d2c6c
to
661ed4a
Compare
3951e96
to
10132c1
Compare
77dc8e9
to
352b062
Compare
352b062
to
1ad028c
Compare
1ad028c
to
29c56f7
Compare
29c56f7
to
93e21b0
Compare
eef1157
to
e87f3d8
Compare
This PR has now been updated to work with the Pixman renderer. |
This was always set to ARGB8888.
This is a new helper function to pick a render format suitable for a plane. The next commit will use it to initialize the cursor multi-GPU surface.
Instead of passing a wlr_texture to the backend, directly pass a wlr_buffer. Use get_cursor_size and get_cursor_formats to create a wlr_buffer that can be used as a cursor. We don't want to pass a wlr_texture because we want to remove as many rendering bits from the backend as possible.
Doesn't make a lot of sense to split the cursor fields between wlr_drm_plane and wlr_drm_connector. Let's just move everything to wlr_drm_connector.
e87f3d8
to
c48a1c7
Compare
kennylevinsen
approved these changes
Jun 1, 2021
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.
LGTM
@@ -329,7 +331,7 @@ static bool drm_connector_attach_render(struct wlr_output *output, | |||
static void drm_plane_set_committed(struct wlr_drm_plane *plane) { | |||
drm_fb_move(&plane->queued_fb, &plane->pending_fb); | |||
|
|||
if (plane->queued_fb) { | |||
if (plane->queued_fb && plane->surf.swapchain) { |
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.
Random bugfix?
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.
Previously all planes had a swapchain. Now that the cursor plane swapchain has been moved in common code in wlr_output.c
, the cursor plane no longer has a swapchain.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
We want to remove the rendering bits from the backends. To do so, we need to stop feeding them
wlr_texture
for cursors.Switch to
wlr_buffer
. The commonwlr_output
code is responsible for allocating and rendering cursor textures.This will also help with explicit synchronization.
TODO:
Depends on #2498Depends on #2556Depends on #2613Depends on #2901Depends on #2947Breaking change for backends:
wlr_output_impl.set_cursor
now takes awlr_buffer
. Backends should no longer allocate a swapchain for the cursor. Backends can optionally specify cursor buffer format and size restrictions withget_cursor_formats
andget_cursor_size
.