summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2019-11-12 15:44:43 +0200
committerMarius Vlad <marius.vlad@collabora.com>2019-11-21 14:07:54 +0200
commitb8987056d4a81ce48ebc8956f52c3e7968b660b6 (patch)
tree93d8c6b225140c5c167681d7289b4d2a92149b2f
parent9ad82d59969d4168721fa2ac1b9c18da8a038414 (diff)
downloadweston-b8987056d4a81ce48ebc8956f52c3e7968b660b6.tar.gz
weston-b8987056d4a81ce48ebc8956f52c3e7968b660b6.tar.bz2
weston-b8987056d4a81ce48ebc8956f52c3e7968b660b6.zip
renderer-gl: Display a solid shader color when direct-display is in use
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
-rw-r--r--libweston/renderer-gl/gl-renderer.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libweston/renderer-gl/gl-renderer.c b/libweston/renderer-gl/gl-renderer.c
index 35b278d4..7c32fb3c 100644
--- a/libweston/renderer-gl/gl-renderer.c
+++ b/libweston/renderer-gl/gl-renderer.c
@@ -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);