Use aligned allocators for GskRenderNode

Any data that is later fed to graphene must be
allocated with proper alignment, if graphene
uses SSE2 or GCC vector instructions.
This commit is contained in:
Руслан Ижбулатов 2018-06-09 14:05:49 +00:00
parent 8e74eb382f
commit a394a86151

View File

@ -42,6 +42,7 @@
#include "gskdebugprivate.h"
#include "gskrendererprivate.h"
#include "gskallocprivate.h"
#include <graphene-gobject.h>
@ -66,7 +67,7 @@ gsk_render_node_finalize (GskRenderNode *self)
{
self->node_class->finalize (self);
g_free (self);
gsk_aligned_free (self);
}
/*< private >
@ -83,7 +84,7 @@ gsk_render_node_new (const GskRenderNodeClass *node_class, gsize extra_size)
g_return_val_if_fail (node_class != NULL, NULL);
g_return_val_if_fail (node_class->node_type != GSK_NOT_A_RENDER_NODE, NULL);
self = g_malloc0 (node_class->struct_size + extra_size);
self = gsk_aligned_alloc0 (node_class->struct_size + extra_size, 1, 16);
self->node_class = node_class;