backend-drm: Handle solid-colour buffers in state propose
When we're checking to see if a view is suitable to go on a plane, check for (and reject) solid-colour buffers. Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
@@ -447,7 +447,11 @@ drm_output_find_plane_for_view(struct drm_output_state *state,
|
|||||||
}
|
}
|
||||||
|
|
||||||
buffer = ev->surface->buffer_ref.buffer;
|
buffer = ev->surface->buffer_ref.buffer;
|
||||||
if (buffer->type == WESTON_BUFFER_SHM) {
|
if (buffer->type == WESTON_BUFFER_SOLID) {
|
||||||
|
pnode->try_view_on_plane_failure_reasons |=
|
||||||
|
FAILURE_REASONS_FB_FORMAT_INCOMPATIBLE;
|
||||||
|
return NULL;
|
||||||
|
} else if (buffer->type == WESTON_BUFFER_SHM) {
|
||||||
if (!output->cursor_plane || b->cursors_are_broken) {
|
if (!output->cursor_plane || b->cursors_are_broken) {
|
||||||
pnode->try_view_on_plane_failure_reasons |=
|
pnode->try_view_on_plane_failure_reasons |=
|
||||||
FAILURE_REASONS_FB_FORMAT_INCOMPATIBLE;
|
FAILURE_REASONS_FB_FORMAT_INCOMPATIBLE;
|
||||||
@@ -773,6 +777,17 @@ drm_output_propose_state(struct weston_output *output_base,
|
|||||||
force_renderer = true;
|
force_renderer = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* We can support this with the 'CRTC background colour' property,
|
||||||
|
* if it is fullscreen (i.e. we disable the primary plane), and
|
||||||
|
* opaque (as it is only shown in the absence of any covering
|
||||||
|
* plane, not as a replacement for the primary plane per se). */
|
||||||
|
if (ev->surface->buffer_ref.buffer &&
|
||||||
|
ev->surface->buffer_ref.buffer->type == WESTON_BUFFER_SOLID) {
|
||||||
|
drm_debug(b, "\t\t\t\t[view] not assigning view %p to plane "
|
||||||
|
"(solid-colour surface)\n", ev);
|
||||||
|
force_renderer = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (pnode->surf_xform.transform != NULL ||
|
if (pnode->surf_xform.transform != NULL ||
|
||||||
!pnode->surf_xform.identity_pipeline) {
|
!pnode->surf_xform.identity_pipeline) {
|
||||||
drm_debug(b, "\t\t\t\t[view] not assigning view %p to plane "
|
drm_debug(b, "\t\t\t\t[view] not assigning view %p to plane "
|
||||||
|
|||||||
Reference in New Issue
Block a user