[gtk+/wip/baedert/gl: 16/90] snapshot: Don't create blur nodes with radius 0
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/gl: 16/90] snapshot: Don't create blur nodes with radius 0
- Date: Fri, 8 Dec 2017 20:11:12 +0000 (UTC)
commit 5d6ea4f5baf1f78f06e85f45b9090d136403ecd2
Author: Timm Bäder <mail baedert org>
Date: Fri Dec 8 16:58:06 2017 +0100
snapshot: Don't create blur nodes with radius 0
gtk/gtksnapshot.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c
index a9882db..ac18bb5 100644
--- a/gtk/gtksnapshot.c
+++ b/gtk/gtksnapshot.c
@@ -346,12 +346,18 @@ gtk_snapshot_collect_blur (GtkSnapshot *snapshot,
const char *name)
{
GskRenderNode *node, *blur_node;
+ double radius;
node = gtk_snapshot_collect_default (snapshot, state, nodes, n_nodes, name);
if (node == NULL)
return NULL;
- blur_node = gsk_blur_node_new (node, state->data.blur.radius);
+ radius = state->data.blur.radius;
+
+ if (radius == 0.0)
+ return node;
+
+ blur_node = gsk_blur_node_new (node, radius);
if (name)
gsk_render_node_set_name (blur_node, name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]