[gtk] gl renderer: Fix blur nodes with radius 0
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] gl renderer: Fix blur nodes with radius 0
- Date: Tue, 7 May 2019 16:24:46 +0000 (UTC)
commit e847c030bde2cfa37533c1b26bb02d2e62208fc5
Author: Timm Bäder <mail baedert org>
Date: Tue May 7 17:20:11 2019 +0200
gl renderer: Fix blur nodes with radius 0
gsk/gl/gskglrenderer.c | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index 6a5c098465..29e8172aa5 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -1268,10 +1268,17 @@ render_blur_node (GskGLRenderer *self,
const float min_y = builder->dy + node->bounds.origin.y;
const float max_x = min_x + node->bounds.size.width;
const float max_y = min_y + node->bounds.size.height;
+ const float blur_radius = gsk_blur_node_get_radius (node);
int texture_id;
gboolean is_offscreen;
RenderOp op;
+ if (blur_radius <= 0)
+ {
+ gsk_gl_renderer_add_render_ops (self, gsk_blur_node_get_child (node), builder);
+ return;
+ }
+
/* 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]