forked from AuroraMiddleware/gtk
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.
This commit is contained in:
parent
ee4ba18d5e
commit
f4c4ab6ab1
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user