mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2025-12-20 14:00:10 +01:00
drm-backend/gl-renderer: move fully transparent check into paint node
Video underlay "holes" are fully transparent but must be rendered fully opaque. However, they appear to be fully transparent to the current gl-renderer test which is missing a need_hole check. Add a paint node attribute for this so it can be more easily checked in assign_planes and renderers. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
99ab4ceaca
commit
25a281a0a8
4 changed files with 15 additions and 4 deletions
|
|
@ -876,8 +876,7 @@ drm_output_propose_state(struct weston_output *output_base,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pnode->view->alpha == 0.0f ||
|
if (pnode->is_fully_transparent) {
|
||||||
(pnode->draw_solid && pnode->solid.a == 0.0f)) {
|
|
||||||
drm_debug(b, "\t\t\t\t[view] ignoring view %p " \
|
drm_debug(b, "\t\t\t\t[view] ignoring view %p " \
|
||||||
"(fully transparent)\n", ev);
|
"(fully transparent)\n", ev);
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
|
|
@ -226,13 +226,19 @@ paint_node_update_early(struct weston_paint_node *pnode)
|
||||||
|
|
||||||
buffer = pnode->surface->buffer_ref.buffer;
|
buffer = pnode->surface->buffer_ref.buffer;
|
||||||
pnode->draw_solid = false;
|
pnode->draw_solid = false;
|
||||||
|
pnode->is_fully_transparent = false;
|
||||||
if (buffer->type == WESTON_BUFFER_SOLID) {
|
if (buffer->type == WESTON_BUFFER_SOLID) {
|
||||||
pnode->draw_solid = true;
|
pnode->draw_solid = true;
|
||||||
pnode->is_fully_opaque = (buffer->solid.a == 1.0f);
|
pnode->is_fully_opaque = (buffer->solid.a == 1.0f);
|
||||||
pnode->is_fully_blended = !pnode->is_fully_opaque;
|
pnode->is_fully_blended = !pnode->is_fully_opaque;
|
||||||
pnode->solid = buffer->solid;
|
pnode->solid = buffer->solid;
|
||||||
|
if (pnode->solid.a == 0.0f)
|
||||||
|
pnode->is_fully_transparent = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pnode->view->alpha == 0.0f)
|
||||||
|
pnode->is_fully_transparent = true;
|
||||||
|
|
||||||
/* Check for 2 types of censor requirements
|
/* Check for 2 types of censor requirements
|
||||||
* - recording_censor: Censor protected view when a
|
* - recording_censor: Censor protected view when a
|
||||||
* protected view is captured.
|
* protected view is captured.
|
||||||
|
|
@ -326,6 +332,7 @@ paint_node_update_late(struct weston_paint_node *pnode)
|
||||||
pnode->draw_solid = true;
|
pnode->draw_solid = true;
|
||||||
pnode->is_fully_opaque = true;
|
pnode->is_fully_opaque = true;
|
||||||
pnode->is_fully_blended = false;
|
pnode->is_fully_blended = false;
|
||||||
|
pnode->is_fully_transparent = false;
|
||||||
pnode->solid = (struct weston_solid_buffer_values) {
|
pnode->solid = (struct weston_solid_buffer_values) {
|
||||||
0.0, 0.0, 0.0, 0.0
|
0.0, 0.0, 0.0, 0.0
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -724,6 +724,12 @@ struct weston_paint_node {
|
||||||
bool is_fully_opaque;
|
bool is_fully_opaque;
|
||||||
bool is_fully_blended;
|
bool is_fully_blended;
|
||||||
bool draw_solid;
|
bool draw_solid;
|
||||||
|
|
||||||
|
/* This node's buffer or view alpha causes it to be completely
|
||||||
|
* transparent, so it can be optimized away or skipped for
|
||||||
|
* plane assignment.
|
||||||
|
*/
|
||||||
|
bool is_fully_transparent;
|
||||||
struct weston_solid_buffer_values solid;
|
struct weston_solid_buffer_values solid;
|
||||||
bool need_hole;
|
bool need_hole;
|
||||||
uint32_t psf_flags; /* presentation-feedback flags */
|
uint32_t psf_flags; /* presentation-feedback flags */
|
||||||
|
|
|
||||||
|
|
@ -2070,8 +2070,7 @@ draw_paint_node(struct weston_paint_node *pnode,
|
||||||
if (!pixman_region32_not_empty(&repaint))
|
if (!pixman_region32_not_empty(&repaint))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if (pnode->view->alpha == 0.0f ||
|
if (pnode->is_fully_transparent) {
|
||||||
(pnode->draw_solid && pnode->solid.a == 0.0f)) {
|
|
||||||
gs->used_in_output_repaint = true; /* sort of */
|
gs->used_in_output_repaint = true; /* sort of */
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue