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:
@@ -839,6 +839,15 @@ setup_censor_overrides(struct weston_output *output,
|
|||||||
bool unprotected_censor =
|
bool unprotected_censor =
|
||||||
(ev->surface->desired_protection > output->current_protection);
|
(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 */
|
/* When not in enforced mode, the client is notified of the protection */
|
||||||
/* change, so content censoring is not required */
|
/* change, so content censoring is not required */
|
||||||
if (ev->surface->protection_mode !=
|
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
|
/* 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
|
* 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. */
|
* have a valid buffer or a proper shader set up so skip rendering. */
|
||||||
if (!gs->shader)
|
if (!gs->shader && !gs->direct_display)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
pixman_region32_init(&repaint);
|
pixman_region32_init(&repaint);
|
||||||
|
|||||||
Reference in New Issue
Block a user