mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-09 03:38:03 +02:00
compositor: Add cursor layer status to paint nodes
Store this in the paint node so we don't have to look it up in the view in the backends. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
838d6d92be
commit
6f09ba42bd
3 changed files with 7 additions and 3 deletions
|
|
@ -614,8 +614,6 @@ drm_output_find_plane_for_view(struct drm_output_state *state,
|
|||
struct drm_backend *b = device->backend;
|
||||
struct drm_plane_state *ps = NULL;
|
||||
struct drm_plane_handle *handle;
|
||||
|
||||
struct weston_view *ev = pnode->view;
|
||||
struct weston_buffer *buffer;
|
||||
struct drm_fb *fb = NULL;
|
||||
uint64_t current_lowest_zpos = need_underlay ?
|
||||
|
|
@ -635,7 +633,7 @@ drm_output_find_plane_for_view(struct drm_output_state *state,
|
|||
|
||||
/* filter out non-cursor views in renderer-and-cursor mode */
|
||||
if (mode == DRM_OUTPUT_PROPOSE_STATE_RENDERER_AND_CURSOR &&
|
||||
ev->layer_link.layer != &b->compositor->cursor_layer) {
|
||||
!pnode->on_cursor_layer) {
|
||||
pnode->try_view_on_plane_failure_reasons |=
|
||||
FAILURE_REASONS_FORCE_RENDERER;
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -208,6 +208,7 @@ paint_node_update_early(struct weston_paint_node *pnode)
|
|||
struct weston_matrix *mat = &pnode->buffer_to_output_matrix;
|
||||
struct weston_output *output = pnode->output;
|
||||
struct weston_surface *surface = pnode->surface;
|
||||
struct weston_compositor *compositor = surface->compositor;
|
||||
bool view_dirty = pnode->status & WESTON_PAINT_NODE_VIEW_DIRTY;
|
||||
bool output_dirty = pnode->status & WESTON_PAINT_NODE_OUTPUT_DIRTY;
|
||||
bool buffer_dirty = pnode->status & WESTON_PAINT_NODE_BUFFER_DIRTY;
|
||||
|
|
@ -274,6 +275,10 @@ paint_node_update_early(struct weston_paint_node *pnode)
|
|||
if (buffer_dirty)
|
||||
surface->compositor->renderer->attach(pnode);
|
||||
|
||||
if (view_dirty)
|
||||
pnode->on_cursor_layer =
|
||||
pnode->view->layer_link.layer == &compositor->cursor_layer;
|
||||
|
||||
pnode->output->paint_node_changes |= pnode->status;
|
||||
pnode->status &= ~(WESTON_PAINT_NODE_VIEW_DIRTY | \
|
||||
WESTON_PAINT_NODE_OUTPUT_DIRTY |
|
||||
|
|
|
|||
|
|
@ -720,6 +720,7 @@ struct weston_paint_node {
|
|||
uint32_t try_view_on_plane_failure_reasons;
|
||||
bool is_fully_opaque;
|
||||
bool is_fully_blended;
|
||||
bool on_cursor_layer;
|
||||
|
||||
/* This node's contents are solid, either from a solid buffer or a
|
||||
* placeholder.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue