[gimp] Use gegl_malloc in GimpTempBuf



commit ff9c91ce6ffac357c089dc473a1b4a3e84490bee
Author: Daniel Sabo <DanielSabo gmail com>
Date:   Tue Jun 25 03:22:32 2013 -0700

    Use gegl_malloc in GimpTempBuf
    
    Which allocates 16 byte aligned memory for SSE code.

 app/core/gimptempbuf.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/app/core/gimptempbuf.c b/app/core/gimptempbuf.c
index e5fb95a..dfd8c1f 100644
--- a/app/core/gimptempbuf.c
+++ b/app/core/gimptempbuf.c
@@ -21,6 +21,7 @@
 
 #include <cairo.h>
 #include <gegl.h>
+#include <gegl-utils.h>
 #include <glib/gstdio.h>
 
 #include "core-types.h"
@@ -54,9 +55,8 @@ gimp_temp_buf_new (gint        width,
   temp->width     = width;
   temp->height    = height;
   temp->format    = format;
-  temp->data      = g_new (guchar,
-                           width * height *
-                           babl_format_get_bytes_per_pixel (format));
+  temp->data      = gegl_malloc (width * height *
+                                 babl_format_get_bytes_per_pixel (format));
 
   return temp;
 }
@@ -98,7 +98,7 @@ gimp_temp_buf_unref (GimpTempBuf *buf)
   if (buf->ref_count < 1)
     {
       if (buf->data)
-        g_free (buf->data);
+        gegl_free (buf->data);
 
       g_slice_free (GimpTempBuf, buf);
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]