[gtk+] rendernode: Use ceilf() on the size of the cairo surface
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] rendernode: Use ceilf() on the size of the cairo surface
- Date: Tue, 1 Nov 2016 02:55:48 +0000 (UTC)
commit f4c4ab6ab152ebf4b963c7dc4be6af5718d3961b
Author: Benjamin Otte <otte redhat com>
Date: Tue Nov 1 03:40:01 2016 +0100
rendernode: Use ceilf() on the size of the cairo surface
Bounds sizes are floats, so round up to the next integer so we end up
with enough space to draw.
gsk/gskrendernode.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gsk/gskrendernode.c b/gsk/gskrendernode.c
index 6d2cf87..85cf246 100644
--- a/gsk/gskrendernode.c
+++ b/gsk/gskrendernode.c
@@ -49,6 +49,8 @@
#include <graphene-gobject.h>
+#include <math.h>
+
#include <gobject/gvaluecollector.h>
/**
@@ -1416,8 +1418,8 @@ gsk_render_node_get_draw_context (GskRenderNode *node)
node->surface = gsk_renderer_create_cairo_surface (node->renderer,
node->opaque ? CAIRO_FORMAT_RGB24
: CAIRO_FORMAT_ARGB32,
- node->bounds.size.width,
- node->bounds.size.height);
+ ceilf (node->bounds.size.width),
+ ceilf (node->bounds.size.height));
}
res = cairo_create (node->surface);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]