mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-04 02:28:05 +02:00
drm: Store paint node instead of view in plane state
The paint_node life cycle should match the output's, so we should be able to store it in the state instead of a view. This gets us closer to having the backends stop caring about views. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
5f9bf78eea
commit
c1f3d9a04a
2 changed files with 5 additions and 6 deletions
|
|
@ -399,7 +399,7 @@ struct drm_plane_state {
|
|||
struct weston_buffer_release_reference release;
|
||||
} fb_ref;
|
||||
|
||||
struct weston_view *ev; /**< maintained for drm_assign_planes only */
|
||||
struct weston_paint_node *paint_node; /**< maintained for drm_assign_planes only */
|
||||
|
||||
int32_t src_x, src_y;
|
||||
uint32_t src_w, src_h;
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ drm_output_try_paint_node_on_plane(struct drm_plane_handle *handle,
|
|||
* calling drm_fb_get_from_paint_node() in
|
||||
* drm_output_prepare_plane_view(), so, we take another reference
|
||||
* here to live within the state. */
|
||||
state->ev = ev;
|
||||
state->paint_node = pnode;
|
||||
state->fb = drm_fb_ref(fb);
|
||||
state->in_fence_fd = ev->surface->acquire_fence_fd;
|
||||
|
||||
|
|
@ -223,7 +223,6 @@ drm_output_prepare_cursor_paint_node(struct drm_output_state *output_state,
|
|||
struct drm_backend *b = device->backend;
|
||||
struct drm_plane_handle *handle = output->cursor_handle;
|
||||
struct drm_plane *plane;
|
||||
struct weston_view *ev = pnode->view;
|
||||
struct drm_plane_state *plane_state;
|
||||
const char *p_name;
|
||||
|
||||
|
|
@ -261,7 +260,7 @@ drm_output_prepare_cursor_paint_node(struct drm_output_state *output_state,
|
|||
goto err;
|
||||
}
|
||||
|
||||
plane_state->ev = ev;
|
||||
plane_state->paint_node = pnode;
|
||||
/* We always test with cursor fb 0. There are two potential fbs, and
|
||||
* they are identically allocated for cursor use specifically, so if
|
||||
* one works the other almost certainly should as well.
|
||||
|
|
@ -1376,8 +1375,8 @@ drm_assign_planes(struct weston_output *output_base)
|
|||
* views, because otherwise we won't reset views which were
|
||||
* previously on planes to being on the primary plane. */
|
||||
wl_list_for_each(plane_state, &state->plane_list, link) {
|
||||
if (plane_state->ev == ev) {
|
||||
plane_state->ev = NULL;
|
||||
if (plane_state->paint_node == pnode) {
|
||||
plane_state->paint_node = NULL;
|
||||
target_handle = plane_state->handle;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue