From 59bf76dce184af268115e5926ab514c58583f12f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 13 Jan 2019 08:21:58 +0100 Subject: [PATCH] gl renderer: Force blur shadow node children offscreen This broke the overlay blur demoe when resizing the window to a size that would completely move the image below a button, causing the GtkSnapshot code to remove the clip node below the blur node. --- gsk/gl/gskglrenderer.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c index cdac8a1410..ead5894445 100644 --- a/gsk/gl/gskglrenderer.c +++ b/gsk/gl/gskglrenderer.c @@ -1091,10 +1091,15 @@ render_blur_node (GskGLRenderer *self, gboolean is_offscreen; RenderOp op; + /* TODO(perf): We're forcing the child offscreen even if it's a texture + * so the resulting offscreen texture is bigger by the gaussian blur factor + * (see gsk_blur_node_new), but we didn't have to do that if the blur + * shader could handle that situation. */ + add_offscreen_ops (self, builder, &node->bounds, gsk_blur_node_get_child (node), - &texture_id, &is_offscreen, FALSE, TRUE); + &texture_id, &is_offscreen, TRUE, TRUE); ops_set_program (builder, &self->blur_program); op.op = OP_CHANGE_BLUR;