mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-11 11:20:12 +00:00
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:
parent
8e74eb382f
commit
a394a86151
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user