[gtk+/wip/baedert/gl: 140/146] snapshot: Don't create clip nodes with 0 width or height
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/gl: 140/146] snapshot: Don't create clip nodes with 0 width or height
- Date: Thu, 28 Dec 2017 15:56:46 +0000 (UTC)
commit a61eecc22ecf593d579394c2aa15578167c5dd77
Author: Timm Bäder <mail baedert org>
Date: Thu Dec 28 10:52:57 2017 +0100
snapshot: Don't create clip nodes with 0 width or height
gtk/gtksnapshot.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c
index e16e0d3..45bb205 100644
--- a/gtk/gtksnapshot.c
+++ b/gtk/gtksnapshot.c
@@ -589,6 +589,10 @@ gtk_snapshot_collect_clip (GtkSnapshot *snapshot,
if (graphene_rect_contains_rect (&state->data.clip.bounds, &node->bounds))
return node;
+ if (state->data.clip.bounds.size.width == 0 ||
+ state->data.clip.bounds.size.height == 0)
+ return NULL;
+
clip_node = gsk_clip_node_new (node, &state->data.clip.bounds);
if (name)
gsk_render_node_set_name (clip_node, name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]