renderer-gl: Display a solid shader color when direct-display is in use

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
Marius Vlad 2019-11-12 15:44:43 +02:00
parent 9ad82d5996
commit b8987056d4
1 changed files with 10 additions and 1 deletions

View File

@ -839,6 +839,15 @@ setup_censor_overrides(struct weston_output *output,
bool unprotected_censor =
(ev->surface->desired_protection > output->current_protection);
if (gs->direct_display) {
gs->color[0] = 0.40;
gs->color[1] = 0.0;
gs->color[2] = 0.0;
gs->color[3] = 1.0;
gs->shader = &gr->solid_shader;
return gs->shader;
}
/* When not in enforced mode, the client is notified of the protection */
/* change, so content censoring is not required */
if (ev->surface->protection_mode !=
@ -877,7 +886,7 @@ draw_view(struct weston_view *ev, struct weston_output *output,
/* In case of a runtime switch of renderers, we may not have received
* an attach for this surface since the switch. In that case we don't
* have a valid buffer or a proper shader set up so skip rendering. */
if (!gs->shader)
if (!gs->shader && !gs->direct_display)
return;
pixman_region32_init(&repaint);