[gimp/goat-invasion] app: gimp_-namespace all GimpTempBuf functions



commit 1108b86d9dbaff58bf13fc1e14051b3587a9422f
Author: Michael Natterer <mitch gimp org>
Date:   Sun Apr 8 23:56:52 2012 +0200

    app: gimp_-namespace all GimpTempBuf functions

 app/base/pixel-region.c                |    2 +-
 app/base/temp-buf.c                    |  105 ++++++++++++--------------------
 app/base/temp-buf.h                    |   39 ++++++------
 app/base/tile-manager-preview.c        |    4 +-
 app/core/gimpbrush-load.c              |   22 ++++---
 app/core/gimpbrush-transform.c         |   21 +++---
 app/core/gimpbrush.c                   |   40 ++++++------
 app/core/gimpbrushclipboard.c          |   16 +++--
 app/core/gimpbrushgenerated.c          |   11 ++--
 app/core/gimpbuffer.c                  |    5 +-
 app/core/gimpdrawable-preview.c        |    4 +-
 app/core/gimpgradient.c                |    4 +-
 app/core/gimpimage-preview.c           |    4 +-
 app/core/gimpimage.c                   |    6 +-
 app/core/gimppalette.c                 |    6 +-
 app/core/gimppattern-load.c            |   12 ++--
 app/core/gimppattern.c                 |   17 +++---
 app/core/gimppatternclipboard.c        |   12 ++--
 app/core/gimppreviewcache.c            |   12 ++--
 app/core/gimpundo.c                    |   11 ++--
 app/core/gimpviewable.c                |   14 ++--
 app/paint/gimpbrushcore.c              |   56 +++++++++---------
 app/paint/gimpconvolve.c               |    6 +-
 app/paint/gimpink.c                    |    2 +-
 app/paint/gimpsmudge.c                 |    4 +-
 app/pdb/brush-cmds.c                   |    5 +-
 app/pdb/brushes-cmds.c                 |    4 +-
 app/pdb/drawable-cmds.c                |   12 ++--
 app/pdb/image-cmds.c                   |    6 +-
 app/pdb/pattern-cmds.c                 |    4 +-
 app/pdb/patterns-cmds.c                |    4 +-
 app/text/gimpfont.c                    |    6 +-
 app/tools/gimpiscissorstool.c          |   11 ++--
 app/vectors/gimpvectors-preview.c      |    4 +-
 app/widgets/gimpbrushselect.c          |    4 +-
 app/widgets/gimppatternselect.c        |    4 +-
 app/widgets/gimpviewrenderer.c         |    4 +-
 app/widgets/gimpviewrendererbrush.c    |    6 +-
 app/widgets/gimpviewrendererbuffer.c   |    6 +-
 app/widgets/gimpviewrendererdrawable.c |   15 ++---
 app/widgets/gimpviewrendererimage.c    |   16 ++---
 tools/pdbgen/pdb/brush.pdb             |    5 +-
 tools/pdbgen/pdb/brushes.pdb           |    4 +-
 tools/pdbgen/pdb/drawable.pdb          |   12 ++--
 tools/pdbgen/pdb/image.pdb             |    6 +-
 tools/pdbgen/pdb/pattern.pdb           |    4 +-
 tools/pdbgen/pdb/patterns.pdb          |    4 +-
 47 files changed, 282 insertions(+), 299 deletions(-)
---
diff --git a/app/base/pixel-region.c b/app/base/pixel-region.c
index 95c1054..ab7fb41 100644
--- a/app/base/pixel-region.c
+++ b/app/base/pixel-region.c
@@ -90,7 +90,7 @@ pixel_region_init_temp_buf (PixelRegion *PR,
                             gint         w,
                             gint         h)
 {
-  PR->data          = temp_buf_get_data (temp_buf);
+  PR->data          = gimp_temp_buf_get_data (temp_buf);
   PR->tiles         = NULL;
   PR->curtile       = NULL;
   PR->offx          = 0;
diff --git a/app/base/temp-buf.c b/app/base/temp-buf.c
index 823ca44..6cc9dc0 100644
--- a/app/base/temp-buf.c
+++ b/app/base/temp-buf.c
@@ -33,9 +33,9 @@
 
 
 GimpTempBuf *
-temp_buf_new (gint        width,
-              gint        height,
-              const Babl *format)
+gimp_temp_buf_new (gint        width,
+                   gint        height,
+                   const Babl *format)
 {
   GimpTempBuf *temp;
 
@@ -58,28 +58,36 @@ temp_buf_new (gint        width,
 }
 
 GimpTempBuf *
-temp_buf_copy (GimpTempBuf *src)
+gimp_temp_buf_copy (GimpTempBuf *src)
 {
   GimpTempBuf *dest;
 
   g_return_val_if_fail (src != NULL, NULL);
 
-  dest = temp_buf_new (src->width, src->height, src->format);
+  dest = gimp_temp_buf_new (src->width, src->height, src->format);
 
-  if (! dest)
-    return NULL;
-
-  memcpy (temp_buf_get_data (dest),
-          temp_buf_get_data (src),
-          temp_buf_get_data_size (src));
+  memcpy (gimp_temp_buf_get_data (dest),
+          gimp_temp_buf_get_data (src),
+          gimp_temp_buf_get_data_size (src));
 
   return dest;
 }
 
+void
+gimp_temp_buf_free (GimpTempBuf *buf)
+{
+  g_return_if_fail (buf != NULL);
+
+  if (buf->data)
+    g_free (buf->data);
+
+  g_slice_free (GimpTempBuf, buf);
+}
+
 GimpTempBuf *
-temp_buf_scale (GimpTempBuf *src,
-                gint         new_width,
-                gint         new_height)
+gimp_temp_buf_scale (GimpTempBuf *src,
+                     gint         new_width,
+                     gint         new_height)
 {
   GimpTempBuf  *dest;
   const guchar *src_data;
@@ -93,12 +101,12 @@ temp_buf_scale (GimpTempBuf *src,
   g_return_val_if_fail (src != NULL, NULL);
   g_return_val_if_fail (new_width > 0 && new_height > 0, NULL);
 
-  dest = temp_buf_new (new_width,
-                       new_height,
-                       src->format);
+  dest = gimp_temp_buf_new (new_width,
+                            new_height,
+                            src->format);
 
-  src_data  = temp_buf_get_data (src);
-  dest_data = temp_buf_get_data (dest);
+  src_data  = gimp_temp_buf_get_data (src);
+  dest_data = gimp_temp_buf_get_data (dest);
 
   x_ratio = (gdouble) src->width  / (gdouble) new_width;
   y_ratio = (gdouble) src->height / (gdouble) new_height;
@@ -129,13 +137,13 @@ temp_buf_scale (GimpTempBuf *src,
 }
 
 /**
- * temp_buf_demultiply:
+ * gimp_temp_buf_demultiply:
  * @buf:
  *
  * Converts a GimpTempBuf with pre-multiplied alpha to a 'normal' GimpTempBuf.
  */
 void
-temp_buf_demultiply (GimpTempBuf *buf)
+gimp_temp_buf_demultiply (GimpTempBuf *buf)
 {
   guchar *data;
   gint    pixels;
@@ -148,7 +156,7 @@ temp_buf_demultiply (GimpTempBuf *buf)
       break;
 
     case 2:
-      data = temp_buf_get_data (buf);
+      data = gimp_temp_buf_get_data (buf);
       pixels = buf->width * buf->height;
       while (pixels--)
         {
@@ -162,7 +170,7 @@ temp_buf_demultiply (GimpTempBuf *buf)
       break;
 
     case 4:
-      data = temp_buf_get_data (buf);
+      data = gimp_temp_buf_get_data (buf);
       pixels = buf->width * buf->height;
       while (pixels--)
         {
@@ -180,70 +188,35 @@ temp_buf_demultiply (GimpTempBuf *buf)
     }
 }
 
-void
-temp_buf_free (GimpTempBuf *buf)
-{
-  g_return_if_fail (buf != NULL);
-
-  if (buf->data)
-    g_free (buf->data);
-
-  g_slice_free (GimpTempBuf, buf);
-}
-
 guchar *
-temp_buf_get_data (const GimpTempBuf *buf)
+gimp_temp_buf_get_data (const GimpTempBuf *buf)
 {
   return buf->data;
 }
 
 gsize
-temp_buf_get_data_size (GimpTempBuf *buf)
+gimp_temp_buf_get_data_size (GimpTempBuf *buf)
 {
   return babl_format_get_bytes_per_pixel (buf->format) * buf->width * buf->height;
 }
 
 guchar *
-temp_buf_data_clear (GimpTempBuf *buf)
+gimp_temp_buf_data_clear (GimpTempBuf *buf)
 {
-  memset (buf->data, 0, temp_buf_get_data_size (buf));
+  memset (buf->data, 0, gimp_temp_buf_get_data_size (buf));
 
   return buf->data;
 }
 
 gsize
-temp_buf_get_memsize (GimpTempBuf *buf)
+gimp_temp_buf_get_memsize (GimpTempBuf *buf)
 {
   if (buf)
-    return (sizeof (GimpTempBuf) + temp_buf_get_data_size (buf));
+    return (sizeof (GimpTempBuf) + gimp_temp_buf_get_data_size (buf));
 
   return 0;
 }
 
-
-/**
- * temp_buf_dump:
- * @buf:
- * @file:
- *
- * Dumps a GimpTempBuf to a raw RGB image that is easy to analyze, for
- * example with GIMP.
- **/
-void
-temp_buf_dump (GimpTempBuf *buf,
-               const gchar *filename)
-{
-  gint fd = g_open (filename, O_CREAT | O_TRUNC | O_WRONLY, 0666);
-
-  g_return_if_fail (fd != -1);
-  g_return_if_fail (buf != NULL);
-  g_return_if_fail (temp_buf_get_data (buf) != NULL);
-
-  write (fd, temp_buf_get_data (buf), temp_buf_get_data_size (buf));
-
-  close (fd);
-}
-
 GeglBuffer  *
 gimp_temp_buf_create_buffer (GimpTempBuf *temp_buf,
                              gboolean     take_ownership)
@@ -253,14 +226,14 @@ gimp_temp_buf_create_buffer (GimpTempBuf *temp_buf,
   g_return_val_if_fail (temp_buf != NULL, NULL);
 
   buffer =
-    gegl_buffer_linear_new_from_data (temp_buf_get_data (temp_buf),
+    gegl_buffer_linear_new_from_data (gimp_temp_buf_get_data (temp_buf),
                                       temp_buf->format,
                                       GEGL_RECTANGLE (0, 0,
                                                       temp_buf->width,
                                                       temp_buf->height),
                                       GEGL_AUTO_ROWSTRIDE,
                                       take_ownership ?
-                                      (GDestroyNotify) temp_buf_free : NULL,
+                                      (GDestroyNotify) gimp_temp_buf_free : NULL,
                                       take_ownership ?
                                       temp_buf : NULL);
 
diff --git a/app/base/temp-buf.h b/app/base/temp-buf.h
index 80c1c59..a7757c2 100644
--- a/app/base/temp-buf.h
+++ b/app/base/temp-buf.h
@@ -15,8 +15,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef __TEMP_BUF_H__
-#define __TEMP_BUF_H__
+#ifndef __GIMP_TEMP_BUF_H__
+#define __GIMP_TEMP_BUF_H__
 
 
 struct _GimpTempBuf
@@ -32,27 +32,26 @@ struct _GimpTempBuf
 
 /*  The temp buffer functions  */
 
-GimpTempBuf * temp_buf_new           (gint               width,
-                                      gint               height,
-                                      const Babl        *fomat);
-GimpTempBuf * temp_buf_copy          (GimpTempBuf       *src);
-GimpTempBuf * temp_buf_scale         (GimpTempBuf       *buf,
-                                      gint               width,
-                                      gint               height) G_GNUC_WARN_UNUSED_RESULT;
+GimpTempBuf * gimp_temp_buf_new           (gint               width,
+                                           gint               height,
+                                           const Babl        *fomat) G_GNUC_WARN_UNUSED_RESULT;
+GimpTempBuf * gimp_temp_buf_copy          (GimpTempBuf       *src) G_GNUC_WARN_UNUSED_RESULT;
+void          gimp_temp_buf_free          (GimpTempBuf       *buf);
 
-void          temp_buf_demultiply    (GimpTempBuf       *buf);
+GimpTempBuf * gimp_temp_buf_scale         (GimpTempBuf       *buf,
+                                           gint               width,
+                                           gint               height) G_GNUC_WARN_UNUSED_RESULT;
 
-void          temp_buf_free          (GimpTempBuf       *buf);
-guchar      * temp_buf_get_data      (const GimpTempBuf *buf);
-gsize         temp_buf_get_data_size (GimpTempBuf       *buf);
-guchar      * temp_buf_data_clear    (GimpTempBuf       *buf);
+void          gimp_temp_buf_demultiply    (GimpTempBuf       *buf);
 
-gsize         temp_buf_get_memsize   (GimpTempBuf       *buf);
-void          temp_buf_dump          (GimpTempBuf       *buf,
-                                      const gchar       *filename);
+guchar      * gimp_temp_buf_get_data      (const GimpTempBuf *buf);
+gsize         gimp_temp_buf_get_data_size (GimpTempBuf       *buf);
+guchar      * gimp_temp_buf_data_clear    (GimpTempBuf       *buf);
 
-GeglBuffer  * gimp_temp_buf_create_buffer (GimpTempBuf  *temp_buf,
-                                          gboolean       take_ownership);
+gsize         gimp_temp_buf_get_memsize   (GimpTempBuf       *buf);
 
+GeglBuffer  * gimp_temp_buf_create_buffer (GimpTempBuf       *temp_buf,
+                                           gboolean           take_ownership) G_GNUC_WARN_UNUSED_RESULT;
 
-#endif  /*  __TEMP_BUF_H__  */
+
+#endif  /*  __GIMP_TEMP_BUF_H__  */
diff --git a/app/base/tile-manager-preview.c b/app/base/tile-manager-preview.c
index 28f9459..297e91d 100644
--- a/app/base/tile-manager-preview.c
+++ b/app/base/tile-manager-preview.c
@@ -98,8 +98,8 @@ tile_manager_create_preview (TileManager *tiles,
   PixelRegion  destPR;
   gint         subsample = 1;
 
-  preview = temp_buf_new (dest_width, dest_height,
-                          gimp_bpp_to_babl_format (tile_manager_bpp (tiles)));
+  preview = gimp_temp_buf_new (dest_width, dest_height,
+                               gimp_bpp_to_babl_format (tile_manager_bpp (tiles)));
 
   pixel_region_init (&srcPR, tiles, src_x, src_y, src_width, src_height, FALSE);
 
diff --git a/app/core/gimpbrush-load.c b/app/core/gimpbrush-load.c
index df5b33d..ce1248d 100644
--- a/app/core/gimpbrush-load.c
+++ b/app/core/gimpbrush-load.c
@@ -291,10 +291,10 @@ gimp_brush_load_brush (GimpContext  *context,
                         NULL);
   g_free (name);
 
-  brush->mask = temp_buf_new (header.width, header.height,
-                              babl_format ("Y u8"));
+  brush->mask = gimp_temp_buf_new (header.width, header.height,
+                                   babl_format ("Y u8"));
 
-  mask = temp_buf_get_data (brush->mask);
+  mask = gimp_temp_buf_get_data (brush->mask);
   size = header.width * header.height * header.bytes;
 
   switch (header.bytes)
@@ -346,9 +346,9 @@ gimp_brush_load_brush (GimpContext  *context,
       {
         guchar buf[8 * 1024];
 
-        brush->pixmap = temp_buf_new (header.width, header.height,
-                                      babl_format ("R'G'B' u8"));
-        pixmap = temp_buf_get_data (brush->pixmap);
+        brush->pixmap = gimp_temp_buf_new (header.width, header.height,
+                                           babl_format ("R'G'B' u8"));
+        pixmap = gimp_temp_buf_get_data (brush->pixmap);
 
         for (i = 0; success && i < size;)
           {
@@ -650,9 +650,10 @@ gimp_brush_load_abr_brush_v12 (FILE         *file,
         brush->x_axis.y = 0.0;
         brush->y_axis.x = 0.0;
         brush->y_axis.y = height / 2.0;
-        brush->mask     = temp_buf_new (width, height, babl_format ("Y u8"));
+        brush->mask     = gimp_temp_buf_new (width, height,
+                                             babl_format ("Y u8"));
 
-        mask = temp_buf_get_data (brush->mask);
+        mask = gimp_temp_buf_get_data (brush->mask);
         size = width * height * bytes;
 
         compress = abr_read_char (file);
@@ -757,9 +758,10 @@ gimp_brush_load_abr_brush_v6 (FILE         *file,
   brush->x_axis.y = 0.0;
   brush->y_axis.x = 0.0;
   brush->y_axis.y = height / 2.0;
-  brush->mask     = temp_buf_new (width, height, babl_format ("Y u8"));
+  brush->mask     = gimp_temp_buf_new (width, height,
+                                       babl_format ("Y u8"));
 
-  mask = temp_buf_get_data (brush->mask);
+  mask = gimp_temp_buf_get_data (brush->mask);
 
   /* data decoding */
   if (! compress)
diff --git a/app/core/gimpbrush-transform.c b/app/core/gimpbrush-transform.c
index 2091cf8..8ea182a 100644
--- a/app/core/gimpbrush-transform.c
+++ b/app/core/gimpbrush-transform.c
@@ -178,7 +178,7 @@ gimp_brush_real_transform_mask (GimpBrush *brush,
                                scale, aspect_ratio, angle, &matrix);
 
   if (gimp_matrix3_is_identity (&matrix))
-    return temp_buf_copy (source);
+    return gimp_temp_buf_copy (source);
 
   src_width  = source->width;
   src_height = source->height;
@@ -190,10 +190,10 @@ gimp_brush_real_transform_mask (GimpBrush *brush,
   gimp_matrix3_translate (&matrix, -x, -y);
   gimp_matrix3_invert (&matrix);
 
-  result = temp_buf_new (dest_width, dest_height, babl_format ("Y u8"));
+  result = gimp_temp_buf_new (dest_width, dest_height, babl_format ("Y u8"));
 
-  dest = temp_buf_get_data (result);
-  src  = temp_buf_get_data (source);
+  dest = gimp_temp_buf_get_data (result);
+  src  = gimp_temp_buf_get_data (source);
 
   /* prevent disappearance of 1x1 pixel brush at some rotations when
      scaling < 1 */
@@ -340,7 +340,7 @@ gimp_brush_real_transform_mask (GimpBrush *brush,
 
       gimp_brush_transform_fill_blur_kernel (blur_kernel, kernel_len);
 
-      blur_src = temp_buf_copy (result);
+      blur_src = gimp_temp_buf_copy (result);
 
       src_buffer  = gimp_temp_buf_create_buffer (blur_src, TRUE);
       dest_buffer = gimp_temp_buf_create_buffer (blur_src, FALSE);
@@ -473,7 +473,7 @@ gimp_brush_real_transform_pixmap (GimpBrush *brush,
                                scale, aspect_ratio, angle, &matrix);
 
   if (gimp_matrix3_is_identity (&matrix))
-    return temp_buf_copy (source);
+    return gimp_temp_buf_copy (source);
 
   src_width  = source->width;
   src_height = source->height;
@@ -485,10 +485,11 @@ gimp_brush_real_transform_pixmap (GimpBrush *brush,
   gimp_matrix3_translate (&matrix, -x, -y);
   gimp_matrix3_invert (&matrix);
 
-  result = temp_buf_new (dest_width, dest_height, babl_format ("R'G'B' u8"));
+  result = gimp_temp_buf_new (dest_width, dest_height,
+                              babl_format ("R'G'B' u8"));
 
-  dest = temp_buf_get_data (result);
-  src  = temp_buf_get_data (source);
+  dest = gimp_temp_buf_get_data (result);
+  src  = gimp_temp_buf_get_data (source);
 
   gimp_matrix3_transform_point (&matrix, 0,          0,           &tlx, &tly);
   gimp_matrix3_transform_point (&matrix, dest_width, 0,           &trx, &try);
@@ -640,7 +641,7 @@ gimp_brush_real_transform_pixmap (GimpBrush *brush,
 
       gimp_brush_transform_fill_blur_kernel (blur_kernel, kernel_len);
 
-      blur_src = temp_buf_copy (result);
+      blur_src = gimp_temp_buf_copy (result);
 
       src_buffer  = gimp_temp_buf_create_buffer (blur_src, TRUE);
       dest_buffer = gimp_temp_buf_create_buffer (blur_src, FALSE);
diff --git a/app/core/gimpbrush.c b/app/core/gimpbrush.c
index 109c952..b21b7bc 100644
--- a/app/core/gimpbrush.c
+++ b/app/core/gimpbrush.c
@@ -177,13 +177,13 @@ gimp_brush_finalize (GObject *object)
 
   if (brush->mask)
     {
-      temp_buf_free (brush->mask);
+      gimp_temp_buf_free (brush->mask);
       brush->mask = NULL;
     }
 
   if (brush->pixmap)
     {
-      temp_buf_free (brush->pixmap);
+      gimp_temp_buf_free (brush->pixmap);
       brush->pixmap = NULL;
     }
 
@@ -255,8 +255,8 @@ gimp_brush_get_memsize (GimpObject *object,
   GimpBrush *brush   = GIMP_BRUSH (object);
   gint64     memsize = 0;
 
-  memsize += temp_buf_get_memsize (brush->mask);
-  memsize += temp_buf_get_memsize (brush->pixmap);
+  memsize += gimp_temp_buf_get_memsize (brush->mask);
+  memsize += gimp_temp_buf_get_memsize (brush->pixmap);
 
   return memsize + GIMP_OBJECT_CLASS (parent_class)->get_memsize (object,
                                                                   gui_size);
@@ -314,8 +314,8 @@ gimp_brush_get_new_preview (GimpViewable *viewable,
 
           if (! mask_buf)
             {
-              mask_buf = temp_buf_new (1, 1, babl_format ("Y u8"));
-              temp_buf_data_clear ((GimpTempBuf *) mask_buf);
+              mask_buf = gimp_temp_buf_new (1, 1, babl_format ("Y u8"));
+              gimp_temp_buf_data_clear ((GimpTempBuf *) mask_buf);
               free_mask = TRUE;
             }
 
@@ -330,16 +330,16 @@ gimp_brush_get_new_preview (GimpViewable *viewable,
         }
     }
 
-  return_buf = temp_buf_new (mask_width, mask_height,
-                             babl_format ("R'G'B'A u8"));
-  temp_buf_data_clear (return_buf);
+  return_buf = gimp_temp_buf_new (mask_width, mask_height,
+                                  babl_format ("R'G'B'A u8"));
+  gimp_temp_buf_data_clear (return_buf);
 
-  mask = temp_buf_get_data (mask_buf);
-  buf  = temp_buf_get_data (return_buf);
+  mask = gimp_temp_buf_get_data (mask_buf);
+  buf  = gimp_temp_buf_get_data (return_buf);
 
   if (pixmap_buf)
     {
-      guchar *pixmap = temp_buf_get_data (pixmap_buf);
+      guchar *pixmap = gimp_temp_buf_get_data (pixmap_buf);
 
       for (y = 0; y < mask_height; y++)
         {
@@ -369,7 +369,7 @@ gimp_brush_get_new_preview (GimpViewable *viewable,
   if (scaled)
     {
       if (free_mask)
-        temp_buf_free ((GimpTempBuf *) mask_buf);
+        gimp_temp_buf_free ((GimpTempBuf *) mask_buf);
 
       gimp_brush_end_use (brush);
     }
@@ -416,10 +416,10 @@ static void
 gimp_brush_real_begin_use (GimpBrush *brush)
 {
   brush->mask_cache =
-    gimp_brush_cache_new ((GDestroyNotify) temp_buf_free, 'M', 'm');
+    gimp_brush_cache_new ((GDestroyNotify) gimp_temp_buf_free, 'M', 'm');
 
   brush->pixmap_cache =
-    gimp_brush_cache_new ((GDestroyNotify) temp_buf_free, 'P', 'p');
+    gimp_brush_cache_new ((GDestroyNotify) gimp_temp_buf_free, 'P', 'p');
 
   brush->boundary_cache =
     gimp_brush_cache_new ((GDestroyNotify) gimp_bezier_desc_free, 'B', 'b');
@@ -464,9 +464,11 @@ gimp_brush_get_checksum (GimpTagged *tagged)
     {
       GChecksum *checksum = g_checksum_new (G_CHECKSUM_MD5);
 
-      g_checksum_update (checksum, temp_buf_get_data (brush->mask), temp_buf_get_data_size (brush->mask));
+      g_checksum_update (checksum, gimp_temp_buf_get_data (brush->mask),
+                         gimp_temp_buf_get_data_size (brush->mask));
       if (brush->pixmap)
-        g_checksum_update (checksum, temp_buf_get_data (brush->pixmap), temp_buf_get_data_size (brush->pixmap));
+        g_checksum_update (checksum, gimp_temp_buf_get_data (brush->pixmap),
+                           gimp_temp_buf_get_data_size (brush->pixmap));
       g_checksum_update (checksum, (const guchar *) &brush->spacing, sizeof (brush->spacing));
       g_checksum_update (checksum, (const guchar *) &brush->x_axis, sizeof (brush->x_axis));
       g_checksum_update (checksum, (const guchar *) &brush->y_axis, sizeof (brush->y_axis));
@@ -619,7 +621,7 @@ gimp_brush_transform_mask (GimpBrush *brush,
           angle        == 0.0 &&
           hardness     == 1.0)
         {
-          mask = temp_buf_copy (brush->mask);
+          mask = gimp_temp_buf_copy (brush->mask);
         }
       else
         {
@@ -669,7 +671,7 @@ gimp_brush_transform_pixmap (GimpBrush *brush,
           angle        == 0.0 &&
           hardness     == 1.0)
         {
-          pixmap = temp_buf_copy (brush->pixmap);
+          pixmap = gimp_temp_buf_copy (brush->pixmap);
         }
       else
         {
diff --git a/app/core/gimpbrushclipboard.c b/app/core/gimpbrushclipboard.c
index a3ba62c..379ffac 100644
--- a/app/core/gimpbrushclipboard.c
+++ b/app/core/gimpbrushclipboard.c
@@ -184,13 +184,13 @@ gimp_brush_clipboard_buffer_changed (Gimp      *gimp,
 
   if (brush->mask)
     {
-      temp_buf_free (brush->mask);
+      gimp_temp_buf_free (brush->mask);
       brush->mask = NULL;
     }
 
   if (brush->pixmap)
     {
-      temp_buf_free (brush->pixmap);
+      gimp_temp_buf_free (brush->pixmap);
       brush->pixmap = NULL;
     }
 
@@ -203,8 +203,10 @@ gimp_brush_clipboard_buffer_changed (Gimp      *gimp,
       width  = MIN (gimp_buffer_get_width  (gimp->global_buffer), 512);
       height = MIN (gimp_buffer_get_height (gimp->global_buffer), 512);
 
-      brush->mask   = temp_buf_new (width, height, babl_format ("Y u8"));
-      brush->pixmap = temp_buf_new (width, height, babl_format ("R'G'B' u8"));
+      brush->mask   = gimp_temp_buf_new (width, height,
+                                         babl_format ("Y u8"));
+      brush->pixmap = gimp_temp_buf_new (width, height,
+                                         babl_format ("R'G'B' u8"));
 
       /*  copy the alpha channel into the brush's mask  */
       if (babl_format_has_alpha (format))
@@ -218,7 +220,7 @@ gimp_brush_clipboard_buffer_changed (Gimp      *gimp,
         }
       else
         {
-          memset (temp_buf_get_data (brush->mask), OPAQUE_OPACITY,
+          memset (gimp_temp_buf_get_data (brush->mask), OPAQUE_OPACITY,
                   width * height);
         }
 
@@ -234,8 +236,8 @@ gimp_brush_clipboard_buffer_changed (Gimp      *gimp,
       width  = 17;
       height = 17;
 
-      brush->mask = temp_buf_new (width, height, babl_format ("Y u8"));
-      temp_buf_data_clear (brush->mask);
+      brush->mask = gimp_temp_buf_new (width, height, babl_format ("Y u8"));
+      gimp_temp_buf_data_clear (brush->mask);
     }
 
   brush->x_axis.x = width / 2;
diff --git a/app/core/gimpbrushgenerated.c b/app/core/gimpbrushgenerated.c
index 7d4fd29..63cb963 100644
--- a/app/core/gimpbrushgenerated.c
+++ b/app/core/gimpbrushgenerated.c
@@ -254,7 +254,7 @@ gimp_brush_generated_dirty (GimpData *data)
   GimpBrush          *gbrush = GIMP_BRUSH (brush);
 
   if (gbrush->mask)
-    temp_buf_free (gbrush->mask);
+    gimp_temp_buf_free (gbrush->mask);
 
   gbrush->mask = gimp_brush_generated_calc (brush,
                                             brush->shape,
@@ -482,11 +482,12 @@ gimp_brush_generated_calc (GimpBrushGenerated      *brush,
                                       &half_width, &half_height,
                                       &s, &c, &x_axis, &y_axis);
 
-  mask = temp_buf_new (half_width  * 2 + 1,
-                       half_height * 2 + 1,
-                       babl_format ("Y u8"));
+  mask = gimp_temp_buf_new (half_width  * 2 + 1,
+                            half_height * 2 + 1,
+                            babl_format ("Y u8"));
 
-  centerp = temp_buf_get_data (mask) + half_height * mask->width + half_width;
+  centerp = gimp_temp_buf_get_data (mask) +
+            half_height * mask->width + half_width;
 
   lookup = gimp_brush_generated_calc_lut (radius, hardness);
 
diff --git a/app/core/gimpbuffer.c b/app/core/gimpbuffer.c
index 2120183..1f93436 100644
--- a/app/core/gimpbuffer.c
+++ b/app/core/gimpbuffer.c
@@ -198,13 +198,14 @@ gimp_buffer_get_new_preview (GimpViewable *viewable,
   GimpBuffer  *buffer = GIMP_BUFFER (viewable);
   GimpTempBuf *preview;
 
-  preview = temp_buf_new (width, height, gimp_buffer_get_format (buffer));
+  preview = gimp_temp_buf_new (width, height,
+                               gimp_buffer_get_format (buffer));
 
   gegl_buffer_get (buffer->buffer, NULL,
                    MIN ((gdouble) width  / (gdouble) gimp_buffer_get_width (buffer),
                         (gdouble) height / (gdouble) gimp_buffer_get_height (buffer)),
                    NULL,
-                   temp_buf_get_data (preview),
+                   gimp_temp_buf_get_data (preview),
                    GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
 
   return preview;
diff --git a/app/core/gimpdrawable-preview.c b/app/core/gimpdrawable-preview.c
index 76b898b..414790e 100644
--- a/app/core/gimpdrawable-preview.c
+++ b/app/core/gimpdrawable-preview.c
@@ -220,8 +220,8 @@ gimp_drawable_indexed_preview (GimpDrawable *drawable,
                      src_x, src_y, src_width, src_height,
                      FALSE);
 
-  preview_buf = temp_buf_new (dest_width, dest_height,
-                              gimp_bpp_to_babl_format (bytes));
+  preview_buf = gimp_temp_buf_new (dest_width, dest_height,
+                                   gimp_bpp_to_babl_format (bytes));
 
   pixel_region_init_temp_buf (&destPR, preview_buf,
                               0, 0, dest_width, dest_height);
diff --git a/app/core/gimpgradient.c b/app/core/gimpgradient.c
index 247cfc4..1c65283 100644
--- a/app/core/gimpgradient.c
+++ b/app/core/gimpgradient.c
@@ -220,9 +220,9 @@ gimp_gradient_get_new_preview (GimpViewable *viewable,
       cur_x += dx;
     }
 
-  temp_buf = temp_buf_new (width, height, babl_format ("R'G'B'A u8"));
+  temp_buf = gimp_temp_buf_new (width, height, babl_format ("R'G'B'A u8"));
 
-  buf = temp_buf_get_data (temp_buf);
+  buf = gimp_temp_buf_get_data (temp_buf);
 
   for (y = 0; y < height; y++)
     memcpy (buf + (width * y * 4), row, width * 4);
diff --git a/app/core/gimpimage-preview.c b/app/core/gimpimage-preview.c
index 38a1e6f..4489e49 100644
--- a/app/core/gimpimage-preview.c
+++ b/app/core/gimpimage-preview.c
@@ -111,7 +111,7 @@ gimp_image_get_preview (GimpViewable *viewable,
     {
       /*  The hard way  */
       if (private->preview)
-        temp_buf_free (private->preview);
+        gimp_temp_buf_free (private->preview);
 
       private->preview = gimp_image_get_new_preview (viewable, context,
                                                      width, height);
@@ -147,7 +147,7 @@ gimp_image_get_new_preview (GimpViewable *viewable,
    *        preview code would know how to deal with pre-multiply alpha.
    */
   if (is_premult)
-    temp_buf_demultiply (buf);
+    gimp_temp_buf_demultiply (buf);
 
   return buf;
 }
diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c
index a0f9ebe..29febcd 100644
--- a/app/core/gimpimage.c
+++ b/app/core/gimpimage.c
@@ -945,7 +945,7 @@ gimp_image_finalize (GObject *object)
 
   if (private->preview)
     {
-      temp_buf_free (private->preview);
+      gimp_temp_buf_free (private->preview);
       private->preview = NULL;
     }
 
@@ -1070,7 +1070,7 @@ gimp_image_get_memsize (GimpObject *object,
   memsize += gimp_object_get_memsize (GIMP_OBJECT (private->redo_stack),
                                       gui_size);
 
-  *gui_size += temp_buf_get_memsize (private->preview);
+  *gui_size += gimp_temp_buf_get_memsize (private->preview);
 
   return memsize + GIMP_OBJECT_CLASS (parent_class)->get_memsize (object,
                                                                   gui_size);
@@ -1098,7 +1098,7 @@ gimp_image_invalidate_preview (GimpViewable *viewable)
 
   if (private->preview)
     {
-      temp_buf_free (private->preview);
+      gimp_temp_buf_free (private->preview);
       private->preview = NULL;
     }
 }
diff --git a/app/core/gimppalette.c b/app/core/gimppalette.c
index 2cf9904..72dc57d 100644
--- a/app/core/gimppalette.c
+++ b/app/core/gimppalette.c
@@ -211,8 +211,8 @@ gimp_palette_get_new_preview (GimpViewable *viewable,
   gint         cell_size;
   gint         x, y;
 
-  temp_buf = temp_buf_new (width, height, babl_format ("R'G'B' u8"));
-  memset (temp_buf_get_data (temp_buf), 255, width * height * 3);
+  temp_buf = gimp_temp_buf_new (width, height, babl_format ("R'G'B' u8"));
+  memset (gimp_temp_buf_get_data (temp_buf), 255, width * height * 3);
 
   if (palette->n_columns > 1)
     cell_size = MAX (4, width / palette->n_columns);
@@ -222,7 +222,7 @@ gimp_palette_get_new_preview (GimpViewable *viewable,
   columns = width  / cell_size;
   rows    = height / cell_size;
 
-  buf = temp_buf_get_data (temp_buf);
+  buf = gimp_temp_buf_get_data (temp_buf);
   b   = g_new (guchar, width * 3);
 
   list = palette->colors;
diff --git a/app/core/gimppattern-load.c b/app/core/gimppattern-load.c
index d272dd6..48bb0c2 100644
--- a/app/core/gimppattern-load.c
+++ b/app/core/gimppattern-load.c
@@ -156,10 +156,10 @@ gimp_pattern_load (GimpContext  *context,
 
   g_free (name);
 
-  pattern->mask = temp_buf_new (header.width, header.height,
-                                gimp_bpp_to_babl_format (header.bytes));
+  pattern->mask = gimp_temp_buf_new (header.width, header.height,
+                                     gimp_bpp_to_babl_format (header.bytes));
 
-  if (read (fd, temp_buf_get_data (pattern->mask),
+  if (read (fd, gimp_temp_buf_get_data (pattern->mask),
             header.width * header.height * header.bytes) <
       header.width * header.height * header.bytes)
     {
@@ -218,9 +218,9 @@ gimp_pattern_load_pixbuf (GimpContext  *context,
   g_free (name);
 
   pattern->mask =
-    temp_buf_new (gdk_pixbuf_get_width (pixbuf),
-                  gdk_pixbuf_get_height (pixbuf),
-                  gimp_bpp_to_babl_format (gdk_pixbuf_get_n_channels (pixbuf)));
+    gimp_temp_buf_new (gdk_pixbuf_get_width (pixbuf),
+                       gdk_pixbuf_get_height (pixbuf),
+                       gimp_bpp_to_babl_format (gdk_pixbuf_get_n_channels (pixbuf)));
 
   src_buffer  = gimp_pixbuf_create_buffer (pixbuf);
   dest_buffer = gimp_temp_buf_create_buffer (pattern->mask, FALSE);
diff --git a/app/core/gimppattern.c b/app/core/gimppattern.c
index 5e8efcf..86b59d8 100644
--- a/app/core/gimppattern.c
+++ b/app/core/gimppattern.c
@@ -105,7 +105,7 @@ gimp_pattern_finalize (GObject *object)
 
   if (pattern->mask)
     {
-      temp_buf_free (pattern->mask);
+      gimp_temp_buf_free (pattern->mask);
       pattern->mask = NULL;
     }
 
@@ -119,7 +119,7 @@ gimp_pattern_get_memsize (GimpObject *object,
   GimpPattern *pattern = GIMP_PATTERN (object);
   gint64       memsize = 0;
 
-  memsize += temp_buf_get_memsize (pattern->mask);
+  memsize += gimp_temp_buf_get_memsize (pattern->mask);
 
   return memsize + GIMP_OBJECT_CLASS (parent_class)->get_memsize (object,
                                                                   gui_size);
@@ -154,8 +154,8 @@ gimp_pattern_get_new_preview (GimpViewable *viewable,
   copy_width  = MIN (width,  pattern->mask->width);
   copy_height = MIN (height, pattern->mask->height);
 
-  temp_buf = temp_buf_new (copy_width, copy_height,
-                           pattern->mask->format);
+  temp_buf = gimp_temp_buf_new (copy_width, copy_height,
+                                pattern->mask->format);
 
   src_buffer  = gimp_temp_buf_create_buffer (pattern->mask, FALSE);
   dest_buffer = gimp_temp_buf_create_buffer (temp_buf, FALSE);
@@ -192,7 +192,7 @@ gimp_pattern_duplicate (GimpData *data)
 {
   GimpPattern *pattern = g_object_new (GIMP_TYPE_PATTERN, NULL);
 
-  pattern->mask = temp_buf_copy (GIMP_PATTERN (data)->mask);
+  pattern->mask = gimp_temp_buf_copy (GIMP_PATTERN (data)->mask);
 
   return GIMP_DATA (pattern);
 }
@@ -207,7 +207,8 @@ gimp_pattern_get_checksum (GimpTagged *tagged)
     {
       GChecksum *checksum = g_checksum_new (G_CHECKSUM_MD5);
 
-      g_checksum_update (checksum, temp_buf_get_data (pattern->mask), temp_buf_get_data_size (pattern->mask));
+      g_checksum_update (checksum, gimp_temp_buf_get_data (pattern->mask),
+                         gimp_temp_buf_get_data_size (pattern->mask));
 
       checksum_string = g_strdup (g_checksum_get_string (checksum));
 
@@ -232,9 +233,9 @@ gimp_pattern_new (GimpContext *context,
                           "name", name,
                           NULL);
 
-  pattern->mask = temp_buf_new (32, 32, babl_format ("R'G'B' u8"));
+  pattern->mask = gimp_temp_buf_new (32, 32, babl_format ("R'G'B' u8"));
 
-  data = temp_buf_get_data (pattern->mask);
+  data = gimp_temp_buf_get_data (pattern->mask);
 
   for (row = 0; row < pattern->mask->height; row++)
     for (col = 0; col < pattern->mask->width; col++)
diff --git a/app/core/gimppatternclipboard.c b/app/core/gimppatternclipboard.c
index ada97a1..8ced5bc 100644
--- a/app/core/gimppatternclipboard.c
+++ b/app/core/gimppatternclipboard.c
@@ -182,7 +182,7 @@ gimp_pattern_clipboard_buffer_changed (Gimp        *gimp,
 {
   if (pattern->mask)
     {
-      temp_buf_free (pattern->mask);
+      gimp_temp_buf_free (pattern->mask);
       pattern->mask = NULL;
     }
 
@@ -195,19 +195,19 @@ gimp_pattern_clipboard_buffer_changed (Gimp        *gimp,
       width  = MIN (gimp_buffer_get_width  (buffer), 512);
       height = MIN (gimp_buffer_get_height (buffer), 512);
 
-      pattern->mask = temp_buf_new (width, height,
-                                    gimp_buffer_get_format (buffer));
+      pattern->mask = gimp_temp_buf_new (width, height,
+                                         gimp_buffer_get_format (buffer));
 
       gegl_buffer_get (gimp_buffer_get_buffer (buffer),
                        GEGL_RECTANGLE (0, 0, width, height), 1.0,
                        NULL,
-                       temp_buf_get_data (pattern->mask),
+                       gimp_temp_buf_get_data (pattern->mask),
                        GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
     }
   else
     {
-      pattern->mask = temp_buf_new (16, 16, babl_format ("R'G'B' u8"));
-      memset (temp_buf_get_data (pattern->mask), 255, 16 * 16 * 3);
+      pattern->mask = gimp_temp_buf_new (16, 16, babl_format ("R'G'B' u8"));
+      memset (gimp_temp_buf_get_data (pattern->mask), 255, 16 * 16 * 3);
     }
 
   gimp_data_dirty (GIMP_DATA (pattern));
diff --git a/app/core/gimppreviewcache.c b/app/core/gimppreviewcache.c
index e7c0094..622ed93 100644
--- a/app/core/gimppreviewcache.c
+++ b/app/core/gimppreviewcache.c
@@ -126,7 +126,7 @@ preview_cache_remove_smallest (GSList **plist)
                smallest->width, smallest->height);
 #endif
 
-      temp_buf_free (smallest);
+      gimp_temp_buf_free (smallest);
     }
 }
 
@@ -155,7 +155,7 @@ gimp_preview_cache_invalidate (GSList **plist)
   preview_cache_print (*plist);
 #endif
 
-  g_slist_free_full (*plist, (GDestroyNotify) temp_buf_free);
+  g_slist_free_full (*plist, (GDestroyNotify) gimp_temp_buf_free);
   *plist = NULL;
 }
 
@@ -229,7 +229,7 @@ gimp_preview_cache_get (GSList **plist,
       pheight = pn.buf->height;
 
       /* Now get the real one and add to cache */
-      preview = temp_buf_new (width, height, pn.buf->format);
+      preview = gimp_temp_buf_new (width, height, pn.buf->format);
 
       /* preview from nearest bigger one */
       if (width)
@@ -242,8 +242,8 @@ gimp_preview_cache_get (GSList **plist,
       else
         y_ratio = 0.0;
 
-      src_data  = temp_buf_get_data (pn.buf);
-      dest_data = temp_buf_get_data (preview);
+      src_data  = gimp_temp_buf_get_data (pn.buf);
+      dest_data = gimp_temp_buf_get_data (preview);
 
       bytes = babl_format_get_bytes_per_pixel (preview->format);
 
@@ -287,7 +287,7 @@ gimp_preview_cache_get_memsize (GSList *cache)
     return 0;
 
   for (list = cache; list; list = list->next)
-    memsize += sizeof (GSList) + temp_buf_get_memsize (list->data);
+    memsize += sizeof (GSList) + gimp_temp_buf_get_memsize (list->data);
 
   return memsize;
 }
diff --git a/app/core/gimpundo.c b/app/core/gimpundo.c
index 922968b..af7d2f6 100644
--- a/app/core/gimpundo.c
+++ b/app/core/gimpundo.c
@@ -199,7 +199,7 @@ gimp_undo_finalize (GObject *object)
 
   if (undo->preview)
     {
-      temp_buf_free (undo->preview);
+      gimp_temp_buf_free (undo->preview);
       undo->preview = NULL;
     }
 
@@ -272,7 +272,7 @@ gimp_undo_get_memsize (GimpObject *object,
   GimpUndo *undo    = GIMP_UNDO (object);
   gint64    memsize = 0;
 
-  *gui_size += temp_buf_get_memsize (undo->preview);
+  *gui_size += gimp_temp_buf_get_memsize (undo->preview);
 
   return memsize + GIMP_OBJECT_CLASS (parent_class)->get_memsize (object,
                                                                   gui_size);
@@ -325,10 +325,11 @@ gimp_undo_get_new_preview (GimpViewable *viewable,
       if (preview_width  < undo->preview->width &&
           preview_height < undo->preview->height)
         {
-          return temp_buf_scale (undo->preview, preview_width, preview_height);
+          return gimp_temp_buf_scale (undo->preview,
+                                      preview_width, preview_height);
         }
 
-      return temp_buf_copy (undo->preview);
+      return gimp_temp_buf_copy (undo->preview);
     }
 
   return NULL;
@@ -510,7 +511,7 @@ gimp_undo_refresh_preview (GimpUndo    *undo,
 
   if (undo->preview)
     {
-      temp_buf_free (undo->preview);
+      gimp_temp_buf_free (undo->preview);
       undo->preview = NULL;
       gimp_undo_create_preview (undo, context, FALSE);
     }
diff --git a/app/core/gimpviewable.c b/app/core/gimpviewable.c
index 5d120f3..2b722a7 100644
--- a/app/core/gimpviewable.c
+++ b/app/core/gimpviewable.c
@@ -211,7 +211,7 @@ gimp_viewable_finalize (GObject *object)
 
   if (private->preview_temp_buf)
     {
-      temp_buf_free (private->preview_temp_buf);
+      gimp_temp_buf_free (private->preview_temp_buf);
       private->preview_temp_buf = NULL;
     }
 
@@ -275,7 +275,7 @@ gimp_viewable_get_memsize (GimpObject *object,
 {
   GimpViewablePrivate *private = GET_PRIVATE (object);
 
-  *gui_size += temp_buf_get_memsize (private->preview_temp_buf);
+  *gui_size += gimp_temp_buf_get_memsize (private->preview_temp_buf);
 
   if (private->preview_pixbuf)
     {
@@ -295,7 +295,7 @@ gimp_viewable_real_invalidate_preview (GimpViewable *viewable)
 
   if (private->preview_temp_buf)
     {
-      temp_buf_free (private->preview_temp_buf);
+      gimp_temp_buf_free (private->preview_temp_buf);
       private->preview_temp_buf = NULL;
     }
 
@@ -716,7 +716,7 @@ gimp_viewable_get_preview (GimpViewable *viewable,
           return private->preview_temp_buf;
         }
 
-      temp_buf_free (private->preview_temp_buf);
+      gimp_temp_buf_free (private->preview_temp_buf);
       private->preview_temp_buf = NULL;
     }
 
@@ -775,7 +775,7 @@ gimp_viewable_get_new_preview (GimpViewable *viewable,
                                             width, height);
 
   if (temp_buf)
-    return temp_buf_copy (temp_buf);
+    return gimp_temp_buf_copy (temp_buf);
 
   return NULL;
 }
@@ -812,10 +812,10 @@ gimp_viewable_get_dummy_preview (GimpViewable  *viewable,
 
   pixbuf = gimp_viewable_get_dummy_pixbuf (viewable, width, height, bpp);
 
-  buf = temp_buf_new (width, height, gimp_bpp_to_babl_format (bpp));
+  buf = gimp_temp_buf_new (width, height, gimp_bpp_to_babl_format (bpp));
 
   src  = gdk_pixbuf_get_pixels (pixbuf);
-  dest = temp_buf_get_data (buf);
+  dest = gimp_temp_buf_get_data (buf);
 
   while (height--)
     {
diff --git a/app/paint/gimpbrushcore.c b/app/paint/gimpbrushcore.c
index 7b5ac01..08eedc6 100644
--- a/app/paint/gimpbrushcore.c
+++ b/app/paint/gimpbrushcore.c
@@ -243,7 +243,7 @@ gimp_brush_core_finalize (GObject *object)
 
   if (core->pressure_brush)
     {
-      temp_buf_free (core->pressure_brush);
+      gimp_temp_buf_free (core->pressure_brush);
       core->pressure_brush = NULL;
     }
 
@@ -251,7 +251,7 @@ gimp_brush_core_finalize (GObject *object)
     for (j = 0; j < BRUSH_CORE_SOLID_SUBSAMPLE; j++)
       if (core->solid_brushes[i][j])
         {
-          temp_buf_free (core->solid_brushes[i][j]);
+          gimp_temp_buf_free (core->solid_brushes[i][j]);
           core->solid_brushes[i][j] = NULL;
         }
 
@@ -265,7 +265,7 @@ gimp_brush_core_finalize (GObject *object)
     for (j = 0; j < KERNEL_SUBSAMPLE + 1; j++)
       if (core->subsample_brushes[i][j])
         {
-          temp_buf_free (core->subsample_brushes[i][j]);
+          gimp_temp_buf_free (core->subsample_brushes[i][j]);
           core->subsample_brushes[i][j] = NULL;
         }
 
@@ -835,7 +835,7 @@ gimp_brush_core_get_paint_buffer (GimpPaintCore    *paint_core,
       const Babl  *format = gimp_drawable_get_format_with_alpha (drawable);
       GimpTempBuf *temp_buf;
 
-      temp_buf = temp_buf_new ((x2 - x1), (y2 - y1), format);
+      temp_buf = gimp_temp_buf_new ((x2 - x1), (y2 - y1), format);
 
       *paint_buffer_x = x1;
       *paint_buffer_y = y1;
@@ -1119,7 +1119,7 @@ gimp_brush_core_subsample_mask (GimpBrushCore     *core,
         for (j = 0; j < KERNEL_SUBSAMPLE + 1; j++)
           if (core->subsample_brushes[i][j])
             {
-              temp_buf_free (core->subsample_brushes[i][j]);
+              gimp_temp_buf_free (core->subsample_brushes[i][j]);
               core->subsample_brushes[i][j] = NULL;
             }
 
@@ -1127,10 +1127,10 @@ gimp_brush_core_subsample_mask (GimpBrushCore     *core,
       core->subsample_cache_invalid   = FALSE;
     }
 
-  dest = temp_buf_new (mask->width  + 2,
-                       mask->height + 2,
-                       babl_format ("Y u8"));
-  temp_buf_data_clear (dest);
+  dest = gimp_temp_buf_new (mask->width  + 2,
+                            mask->height + 2,
+                            babl_format ("Y u8"));
+  gimp_temp_buf_data_clear (dest);
 
   /* Allocate and initialize the accum buffer */
   for (i = 0; i < KERNEL_HEIGHT ; i++)
@@ -1138,7 +1138,7 @@ gimp_brush_core_subsample_mask (GimpBrushCore     *core,
 
   core->subsample_brushes[index2][index1] = dest;
 
-  m = temp_buf_get_data (mask);
+  m = gimp_temp_buf_get_data (mask);
   for (i = 0; i < mask->height; i++)
     {
       for (j = 0; j < mask->width; j++)
@@ -1155,7 +1155,7 @@ gimp_brush_core_subsample_mask (GimpBrushCore     *core,
         }
 
       /* store the accum buffer into the destination mask */
-      d = temp_buf_get_data (dest) + (i + dest_offset_y) * dest->width;
+      d = gimp_temp_buf_get_data (dest) + (i + dest_offset_y) * dest->width;
       for (j = 0; j < dest->width; j++)
         *d++ = (accum[0][j] + 127) / KERNEL_SUM;
 
@@ -1167,7 +1167,7 @@ gimp_brush_core_subsample_mask (GimpBrushCore     *core,
   /* store the rest of the accum buffer into the dest mask */
   while (i + dest_offset_y < dest->height)
     {
-      d = temp_buf_get_data (dest) + (i + dest_offset_y) * dest->width;
+      d = gimp_temp_buf_get_data (dest) + (i + dest_offset_y) * dest->width;
       for (j = 0; j < dest->width; j++)
         *d++ = (accum[0][j] + (KERNEL_SUM / 2)) / KERNEL_SUM;
 
@@ -1206,12 +1206,12 @@ gimp_brush_core_pressurize_mask (GimpBrushCore     *core,
     return subsample_mask;
 
   if (core->pressure_brush)
-    temp_buf_free (core->pressure_brush);
+    gimp_temp_buf_free (core->pressure_brush);
 
-  core->pressure_brush = temp_buf_new (brush_mask->width  + 2,
-                                       brush_mask->height + 2,
-                                       babl_format ("Y u8"));
-  temp_buf_data_clear (core->pressure_brush);
+  core->pressure_brush = gimp_temp_buf_new (brush_mask->width  + 2,
+                                            brush_mask->height + 2,
+                                            babl_format ("Y u8"));
+  gimp_temp_buf_data_clear (core->pressure_brush);
 
 #ifdef FANCY_PRESSURE
 
@@ -1288,8 +1288,8 @@ gimp_brush_core_pressurize_mask (GimpBrushCore     *core,
 
   /* Now convert the brush */
 
-  source = temp_buf_get_data (subsample_mask);
-  dest   = temp_buf_get_data (core->pressure_brush);
+  source = gimp_temp_buf_get_data (subsample_mask);
+  dest   = gimp_temp_buf_get_data (core->pressure_brush);
 
   i = subsample_mask->width * subsample_mask->height;
   while (i--)
@@ -1341,7 +1341,7 @@ gimp_brush_core_solidify_mask (GimpBrushCore     *core,
         for (j = 0; j < BRUSH_CORE_SOLID_SUBSAMPLE; j++)
           if (core->solid_brushes[i][j])
             {
-              temp_buf_free (core->solid_brushes[i][j]);
+              gimp_temp_buf_free (core->solid_brushes[i][j]);
               core->solid_brushes[i][j] = NULL;
             }
 
@@ -1349,15 +1349,15 @@ gimp_brush_core_solidify_mask (GimpBrushCore     *core,
       core->solid_cache_invalid   = FALSE;
     }
 
-  dest = temp_buf_new (brush_mask->width  + 2,
-                       brush_mask->height + 2,
-                       babl_format ("Y u8"));
-  temp_buf_data_clear (dest);
+  dest = gimp_temp_buf_new (brush_mask->width  + 2,
+                            brush_mask->height + 2,
+                            babl_format ("Y u8"));
+  gimp_temp_buf_data_clear (dest);
 
   core->solid_brushes[dest_offset_y][dest_offset_x] = dest;
 
-  m = temp_buf_get_data (brush_mask);
-  d = (temp_buf_get_data (dest) +
+  m = gimp_temp_buf_get_data (brush_mask);
+  d = (gimp_temp_buf_get_data (dest) +
        (dest_offset_y + 1) * dest->width +
        (dest_offset_x + 1));
 
@@ -1638,13 +1638,13 @@ gimp_brush_core_paint_line_pixmap_mask (GimpImage                *dest,
   pixmap_bytes = babl_format_get_bytes_per_pixel (pixmap_mask->format);
 
   /* Point to the approriate scanline */
-  b = (temp_buf_get_data (pixmap_mask) +
+  b = (gimp_temp_buf_get_data (pixmap_mask) +
        (y % pixmap_mask->height) * pixmap_mask->width * pixmap_bytes);
 
   if (mode == GIMP_BRUSH_SOFT && brush_mask)
     {
       const Babl   *fish;
-      const guchar *mask     = (temp_buf_get_data (brush_mask) +
+      const guchar *mask     = (gimp_temp_buf_get_data (brush_mask) +
                                 (y % brush_mask->height) * brush_mask->width);
       guchar       *line_buf = g_alloca (width * (pixmap_bytes + 1));
       guchar       *l        = line_buf;
diff --git a/app/paint/gimpconvolve.c b/app/paint/gimpconvolve.c
index 50da2f2..d0b7731 100644
--- a/app/paint/gimpconvolve.c
+++ b/app/paint/gimpconvolve.c
@@ -181,9 +181,9 @@ gimp_convolve_motion (GimpPaintCore    *paint_core,
                                   brush_core->brush->mask->height / 2,
                                   rate);
 
-  convolve_temp = temp_buf_new (gegl_buffer_get_width  (paint_buffer),
-                                gegl_buffer_get_height (paint_buffer),
-                                gegl_buffer_get_format (paint_buffer));
+  convolve_temp = gimp_temp_buf_new (gegl_buffer_get_width  (paint_buffer),
+                                     gegl_buffer_get_height (paint_buffer),
+                                     gegl_buffer_get_format (paint_buffer));
 
   convolve_buffer = gimp_temp_buf_create_buffer (convolve_temp, TRUE);
 
diff --git a/app/paint/gimpink.c b/app/paint/gimpink.c
index da83274..39a88fb 100644
--- a/app/paint/gimpink.c
+++ b/app/paint/gimpink.c
@@ -223,7 +223,7 @@ gimp_ink_get_paint_buffer (GimpPaintCore    *paint_core,
       const Babl  *format = gimp_drawable_get_format_with_alpha (drawable);
       GimpTempBuf *temp_buf;
 
-      temp_buf = temp_buf_new ((x2 - x1), (y2 - y1), format);
+      temp_buf = gimp_temp_buf_new ((x2 - x1), (y2 - y1), format);
 
       *paint_buffer_x = x1;
       *paint_buffer_y = y1;
diff --git a/app/paint/gimpsmudge.c b/app/paint/gimpsmudge.c
index 6ff08c5..1e24c7c 100644
--- a/app/paint/gimpsmudge.c
+++ b/app/paint/gimpsmudge.c
@@ -185,8 +185,8 @@ gimp_smudge_start (GimpPaintCore    *paint_core,
   gimp_smudge_accumulator_size (paint_options, &accum_size);
 
   /*  Allocate the accumulation buffer */
-  accum_temp = temp_buf_new (accum_size, accum_size,
-                             gimp_drawable_get_format (drawable));
+  accum_temp = gimp_temp_buf_new (accum_size, accum_size,
+                                  gimp_drawable_get_format (drawable));
 
   smudge->accum_buffer = gimp_temp_buf_create_buffer (accum_temp, TRUE);
 
diff --git a/app/pdb/brush-cmds.c b/app/pdb/brush-cmds.c
index 4226eea..e639d76 100644
--- a/app/pdb/brush-cmds.c
+++ b/app/pdb/brush-cmds.c
@@ -332,14 +332,15 @@ brush_get_pixels_invoker (GimpProcedure      *procedure,
           height         = brush->mask->height;
           mask_bpp       = babl_format_get_bytes_per_pixel (brush->mask->format);
           num_mask_bytes = brush->mask->height * brush->mask->width * mask_bpp;
-          mask_bytes     = g_memdup (temp_buf_get_data (brush->mask), num_mask_bytes);
+          mask_bytes     = g_memdup (gimp_temp_buf_get_data (brush->mask),
+                                     num_mask_bytes);
 
           if (brush->pixmap)
             {
               color_bpp       = babl_format_get_bytes_per_pixel (brush->pixmap->format);
               num_color_bytes = brush->pixmap->height * brush->pixmap->width *
                                 color_bpp;
-              color_bytes     = g_memdup (temp_buf_get_data (brush->pixmap),
+              color_bytes     = g_memdup (gimp_temp_buf_get_data (brush->pixmap),
                                           num_color_bytes);
             }
         }
diff --git a/app/pdb/brushes-cmds.c b/app/pdb/brushes-cmds.c
index 80db524..be86145 100644
--- a/app/pdb/brushes-cmds.c
+++ b/app/pdb/brushes-cmds.c
@@ -216,8 +216,8 @@ brushes_get_brush_data_invoker (GimpProcedure      *procedure,
           paint_mode  = 0;
           width       = brush->mask->width;
           height      = brush->mask->height;
-          length      = brush->mask->height * brush->mask->width;
-          mask_data   = g_memdup (temp_buf_get_data (brush->mask), length);
+          length      = gimp_temp_buf_get_data_size (brush->mask);
+          mask_data   = g_memdup (gimp_temp_buf_get_data (brush->mask), length);
         }
       else
         success = FALSE;
diff --git a/app/pdb/drawable-cmds.c b/app/pdb/drawable-cmds.c
index 9c759f5..67e148f 100644
--- a/app/pdb/drawable-cmds.c
+++ b/app/pdb/drawable-cmds.c
@@ -748,11 +748,11 @@ drawable_thumbnail_invoker (GimpProcedure      *procedure,
           actual_width         = buf->width;
           actual_height        = buf->height;
           bpp                  = babl_format_get_bytes_per_pixel (buf->format);
-          thumbnail_data_count = temp_buf_get_data_size (buf);
-          thumbnail_data       = g_memdup (temp_buf_get_data (buf),
+          thumbnail_data_count = gimp_temp_buf_get_data_size (buf);
+          thumbnail_data       = g_memdup (gimp_temp_buf_get_data (buf),
                                            thumbnail_data_count);
 
-          temp_buf_free (buf);
+          gimp_temp_buf_free (buf);
         }
       else
         success = FALSE;
@@ -828,11 +828,11 @@ drawable_sub_thumbnail_invoker (GimpProcedure      *procedure,
               width                = buf->width;
               height               = buf->height;
               bpp                  = babl_format_get_bytes_per_pixel (buf->format);
-              thumbnail_data_count = temp_buf_get_data_size (buf);
-              thumbnail_data       = g_memdup (temp_buf_get_data (buf),
+              thumbnail_data_count = gimp_temp_buf_get_data_size (buf);
+              thumbnail_data       = g_memdup (gimp_temp_buf_get_data (buf),
                                                thumbnail_data_count);
 
-              temp_buf_free (buf);
+              gimp_temp_buf_free (buf);
             }
           else
             success = FALSE;
diff --git a/app/pdb/image-cmds.c b/app/pdb/image-cmds.c
index 7c859e4..3ce4c3c 100644
--- a/app/pdb/image-cmds.c
+++ b/app/pdb/image-cmds.c
@@ -1715,11 +1715,11 @@ image_thumbnail_invoker (GimpProcedure      *procedure,
           actual_width         = buf->width;
           actual_height        = buf->height;
           bpp                  = babl_format_get_bytes_per_pixel (buf->format);
-          thumbnail_data_count = temp_buf_get_data_size (buf);
-          thumbnail_data       = g_memdup (temp_buf_get_data (buf),
+          thumbnail_data_count = gimp_temp_buf_get_data_size (buf);
+          thumbnail_data       = g_memdup (gimp_temp_buf_get_data (buf),
                                            thumbnail_data_count);
 
-          temp_buf_free (buf);
+          gimp_temp_buf_free (buf);
         }
       else
         success = FALSE;
diff --git a/app/pdb/pattern-cmds.c b/app/pdb/pattern-cmds.c
index c084ddb..a8f00de 100644
--- a/app/pdb/pattern-cmds.c
+++ b/app/pdb/pattern-cmds.c
@@ -109,8 +109,8 @@ pattern_get_pixels_invoker (GimpProcedure      *procedure,
           width           = pattern->mask->width;
           height          = pattern->mask->height;
           bpp             = babl_format_get_bytes_per_pixel (pattern->mask->format);
-          num_color_bytes = temp_buf_get_data_size (pattern->mask);
-          color_bytes     = g_memdup (temp_buf_get_data (pattern->mask),
+          num_color_bytes = gimp_temp_buf_get_data_size (pattern->mask);
+          color_bytes     = g_memdup (gimp_temp_buf_get_data (pattern->mask),
                                       num_color_bytes);
         }
       else
diff --git a/app/pdb/patterns-cmds.c b/app/pdb/patterns-cmds.c
index 160e344..94ab367 100644
--- a/app/pdb/patterns-cmds.c
+++ b/app/pdb/patterns-cmds.c
@@ -159,8 +159,8 @@ patterns_get_pattern_data_invoker (GimpProcedure      *procedure,
           width       = pattern->mask->width;
           height      = pattern->mask->height;
           mask_bpp    = babl_format_get_bytes_per_pixel (pattern->mask->format);
-          length      = temp_buf_get_data_size (pattern->mask);
-          mask_data   = g_memdup (temp_buf_get_data (pattern->mask), length);
+          length      = gimp_temp_buf_get_data_size (pattern->mask);
+          mask_data   = g_memdup (gimp_temp_buf_get_data (pattern->mask), length);
         }
       else
         success = FALSE;
diff --git a/app/text/gimpfont.c b/app/text/gimpfont.c
index 42a351e..6c4d7b2 100644
--- a/app/text/gimpfont.c
+++ b/app/text/gimpfont.c
@@ -283,10 +283,10 @@ gimp_font_get_new_preview (GimpViewable *viewable,
 
   width = cairo_format_stride_for_width (CAIRO_FORMAT_A8, width);
 
-  temp_buf = temp_buf_new (width, height, babl_format ("Y' u8"));
-  memset (temp_buf_get_data (temp_buf), 255, width * height);
+  temp_buf = gimp_temp_buf_new (width, height, babl_format ("Y' u8"));
+  memset (gimp_temp_buf_get_data (temp_buf), 255, width * height);
 
-  surface = cairo_image_surface_create_for_data (temp_buf_get_data (temp_buf),
+  surface = cairo_image_surface_create_for_data (gimp_temp_buf_get_data (temp_buf),
                                                  CAIRO_FORMAT_A8,
                                                  width, height, width);
 
diff --git a/app/tools/gimpiscissorstool.c b/app/tools/gimpiscissorstool.c
index b8e27e0..6814a5f 100644
--- a/app/tools/gimpiscissorstool.c
+++ b/app/tools/gimpiscissorstool.c
@@ -401,7 +401,7 @@ gimp_iscissors_tool_control (GimpTool       *tool,
       /*  Reset the dp buffers  */
       if (iscissors->dp_buf)
         {
-          temp_buf_free (iscissors->dp_buf);
+          gimp_temp_buf_free (iscissors->dp_buf);
           iscissors->dp_buf = NULL;
         }
       break;
@@ -1336,9 +1336,10 @@ calculate_curve (GimpIscissorsTool *iscissors,
 
       /*  allocate the dynamic programming array  */
       if (iscissors->dp_buf)
-        temp_buf_free (iscissors->dp_buf);
+        gimp_temp_buf_free (iscissors->dp_buf);
 
-      iscissors->dp_buf = temp_buf_new (width, height, babl_format ("Y u32"));
+      iscissors->dp_buf = gimp_temp_buf_new (width, height,
+                                             babl_format ("Y u32"));
 
       /*  find the optimal path of pixels from (x1, y1) to (x2, y2)  */
       find_optimal_path (iscissors->gradient_map, iscissors->dp_buf,
@@ -1476,7 +1477,7 @@ plot_pixels (GimpIscissorsTool *iscissors,
   width = dp_buf->width;
 
   /*  Start the data pointer at the correct location  */
-  data = (guint *) temp_buf_get_data (dp_buf) + (ye - y1) * width + (xe - x1);
+  data = (guint *) gimp_temp_buf_get_data (dp_buf) + (ye - y1) * width + (xe - x1);
 
   x = xe;
   y = ye;
@@ -1533,7 +1534,7 @@ find_optimal_path (TileManager *gradient_map,
   guint32 *d;
 
   /*  initialize the dynamic programming buffer  */
-  data = (guint32 *) temp_buf_data_clear (dp_buf);
+  data = (guint32 *) gimp_temp_buf_data_clear (dp_buf);
 
   /*  what directions are we filling the array in according to?  */
   dirx = (xs - x1 == 0) ? 1 : -1;
diff --git a/app/vectors/gimpvectors-preview.c b/app/vectors/gimpvectors-preview.c
index 98212fe..b4c42ee 100644
--- a/app/vectors/gimpvectors-preview.c
+++ b/app/vectors/gimpvectors-preview.c
@@ -55,8 +55,8 @@ gimp_vectors_get_new_preview (GimpViewable *viewable,
   xscale = ((gdouble) width)  / gimp_image_get_width  (gimp_item_get_image (item));
   yscale = ((gdouble) height) / gimp_image_get_height (gimp_item_get_image (item));
 
-  temp_buf = temp_buf_new (width, height, babl_format ("Y' u8"));
-  data = temp_buf_get_data (temp_buf);
+  temp_buf = gimp_temp_buf_new (width, height, babl_format ("Y' u8"));
+  data = gimp_temp_buf_get_data (temp_buf);
   memset (data, 255, width * height);
 
   for (cur_stroke = gimp_vectors_stroke_get_next (vectors, NULL);
diff --git a/app/widgets/gimpbrushselect.c b/app/widgets/gimpbrushselect.c
index 24badf6..7c3be30 100644
--- a/app/widgets/gimpbrushselect.c
+++ b/app/widgets/gimpbrushselect.c
@@ -263,8 +263,8 @@ gimp_brush_select_run_callback (GimpPdbDialog  *dialog,
   GimpArray   *array;
   GValueArray *return_vals;
 
-  array = gimp_array_new (temp_buf_get_data (brush->mask),
-                          temp_buf_get_data_size (brush->mask),
+  array = gimp_array_new (gimp_temp_buf_get_data (brush->mask),
+                          gimp_temp_buf_get_data_size (brush->mask),
                           TRUE);
 
   return_vals =
diff --git a/app/widgets/gimppatternselect.c b/app/widgets/gimppatternselect.c
index df579fa..17b027a 100644
--- a/app/widgets/gimppatternselect.c
+++ b/app/widgets/gimppatternselect.c
@@ -107,8 +107,8 @@ gimp_pattern_select_run_callback (GimpPdbDialog  *dialog,
   GimpArray   *array;
   GValueArray *return_vals;
 
-  array = gimp_array_new (temp_buf_get_data (pattern->mask),
-                          temp_buf_get_data_size (pattern->mask),
+  array = gimp_array_new (gimp_temp_buf_get_data (pattern->mask),
+                          gimp_temp_buf_get_data_size (pattern->mask),
                           TRUE);
 
   return_vals =
diff --git a/app/widgets/gimpviewrenderer.c b/app/widgets/gimpviewrenderer.c
index 69dc3ec..8d3a6cb 100644
--- a/app/widgets/gimpviewrenderer.c
+++ b/app/widgets/gimpviewrenderer.c
@@ -1016,8 +1016,8 @@ gimp_view_render_temp_buf_to_surface (GimpTempBuf     *temp_buf,
   x2 = CLAMP (temp_buf->x + temp_buf->width,  0, dest_width);
   y2 = CLAMP (temp_buf->y + temp_buf->height, 0, dest_height);
 
-  src = temp_buf_get_data (temp_buf) + ((y1 - temp_buf->y) * rowstride +
-                                        (x1 - temp_buf->x) * bytes);
+  src = gimp_temp_buf_get_data (temp_buf) + ((y1 - temp_buf->y) * rowstride +
+                                             (x1 - temp_buf->x) * bytes);
 
   for (i = 0; i < dest_height; i++)
     {
diff --git a/app/widgets/gimpviewrendererbrush.c b/app/widgets/gimpviewrendererbrush.c
index 0624bae..7a84d62 100644
--- a/app/widgets/gimpviewrendererbrush.c
+++ b/app/widgets/gimpviewrendererbrush.c
@@ -114,7 +114,7 @@ gimp_view_renderer_brush_render (GimpViewRenderer *renderer,
                                           GIMP_VIEW_BG_WHITE,
                                           GIMP_VIEW_BG_WHITE);
 
-      temp_buf_free (temp_buf);
+      gimp_temp_buf_free (temp_buf);
 
       if (GIMP_IS_BRUSH_PIPE (renderer->viewable))
         {
@@ -131,7 +131,7 @@ gimp_view_renderer_brush_render (GimpViewRenderer *renderer,
                                       GIMP_VIEW_BG_WHITE,
                                       GIMP_VIEW_BG_WHITE);
 
-  temp_buf_free (temp_buf);
+  gimp_temp_buf_free (temp_buf);
 }
 
 static gboolean
@@ -176,7 +176,7 @@ gimp_view_renderer_brush_render_timeout (gpointer data)
                                       GIMP_VIEW_BG_WHITE,
                                       GIMP_VIEW_BG_WHITE);
 
-  temp_buf_free (temp_buf);
+  gimp_temp_buf_free (temp_buf);
 
   gimp_view_renderer_update (renderer);
 
diff --git a/app/widgets/gimpviewrendererbuffer.c b/app/widgets/gimpviewrendererbuffer.c
index f3a02d2..33e6874 100644
--- a/app/widgets/gimpviewrendererbuffer.c
+++ b/app/widgets/gimpviewrendererbuffer.c
@@ -89,9 +89,9 @@ gimp_view_renderer_buffer_render (GimpViewRenderer *renderer,
 
       if (temp_buf)
         {
-          render_buf = temp_buf_scale (temp_buf, view_width, view_height);
+          render_buf = gimp_temp_buf_scale (temp_buf, view_width, view_height);
 
-          temp_buf_free (temp_buf);
+          gimp_temp_buf_free (temp_buf);
         }
     }
   else
@@ -105,7 +105,7 @@ gimp_view_renderer_buffer_render (GimpViewRenderer *renderer,
     {
       gimp_view_renderer_render_temp_buf_simple (renderer, render_buf);
 
-      temp_buf_free (render_buf);
+      gimp_temp_buf_free (render_buf);
     }
   else /* no preview available */
     {
diff --git a/app/widgets/gimpviewrendererdrawable.c b/app/widgets/gimpviewrendererdrawable.c
index 11f046f..1617483 100644
--- a/app/widgets/gimpviewrendererdrawable.c
+++ b/app/widgets/gimpviewrendererdrawable.c
@@ -168,9 +168,9 @@ gimp_view_renderer_drawable_render (GimpViewRenderer *renderer,
             {
               gint bytes = gimp_drawable_preview_bytes (drawable);
 
-              render_buf = temp_buf_new (1, 1,
-                                         gimp_bpp_to_babl_format (bytes));
-              temp_buf_data_clear (render_buf);
+              render_buf = gimp_temp_buf_new (1, 1,
+                                              gimp_bpp_to_babl_format (bytes));
+              gimp_temp_buf_data_clear (render_buf);
             }
         }
       else
@@ -184,9 +184,9 @@ gimp_view_renderer_drawable_render (GimpViewRenderer *renderer,
 
           if (temp_buf)
             {
-              render_buf = temp_buf_scale (temp_buf, view_width, view_height);
-
-              temp_buf_free (temp_buf);
+              render_buf = gimp_temp_buf_scale (temp_buf,
+                                                view_width, view_height);
+              gimp_temp_buf_free (temp_buf);
             }
         }
     }
@@ -232,8 +232,7 @@ gimp_view_renderer_drawable_render (GimpViewRenderer *renderer,
       gimp_view_renderer_render_temp_buf (renderer, render_buf, -1,
                                           GIMP_VIEW_BG_CHECKS,
                                           GIMP_VIEW_BG_CHECKS);
-
-      temp_buf_free (render_buf);
+      gimp_temp_buf_free (render_buf);
     }
   else
     {
diff --git a/app/widgets/gimpviewrendererimage.c b/app/widgets/gimpviewrendererimage.c
index 598cef1..33f68bc 100644
--- a/app/widgets/gimpviewrendererimage.c
+++ b/app/widgets/gimpviewrendererimage.c
@@ -106,9 +106,9 @@ gimp_view_renderer_image_render (GimpViewRenderer *renderer,
 
           if (temp_buf)
             {
-              render_buf = temp_buf_scale (temp_buf, view_width, view_height);
-
-              temp_buf_free (temp_buf);
+              render_buf = gimp_temp_buf_scale (temp_buf,
+                                                view_width, view_height);
+              gimp_temp_buf_free (temp_buf);
             }
         }
       else
@@ -128,10 +128,9 @@ gimp_view_renderer_image_render (GimpViewRenderer *renderer,
             {
               GimpTempBuf *temp_buf;
 
-              temp_buf = temp_buf_scale (render_buf,
-                                         renderer->width, renderer->height);
-
-              temp_buf_free (render_buf);
+              temp_buf = gimp_temp_buf_scale (render_buf,
+                                              renderer->width, renderer->height);
+              gimp_temp_buf_free (render_buf);
               render_buf = temp_buf;
             }
 
@@ -149,8 +148,7 @@ gimp_view_renderer_image_render (GimpViewRenderer *renderer,
                                               component_index,
                                               GIMP_VIEW_BG_CHECKS,
                                               GIMP_VIEW_BG_WHITE);
-
-          temp_buf_free (render_buf);
+          gimp_temp_buf_free (render_buf);
 
           return;
         }
diff --git a/tools/pdbgen/pdb/brush.pdb b/tools/pdbgen/pdb/brush.pdb
index 798b0d8..edb6864 100644
--- a/tools/pdbgen/pdb/brush.pdb
+++ b/tools/pdbgen/pdb/brush.pdb
@@ -296,14 +296,15 @@ HELP
       height         = brush->mask->height;
       mask_bpp       = babl_format_get_bytes_per_pixel (brush->mask->format);
       num_mask_bytes = brush->mask->height * brush->mask->width * mask_bpp;
-      mask_bytes     = g_memdup (temp_buf_get_data (brush->mask), num_mask_bytes);
+      mask_bytes     = g_memdup (gimp_temp_buf_get_data (brush->mask),
+                                 num_mask_bytes);
 
       if (brush->pixmap)
         {
           color_bpp       = babl_format_get_bytes_per_pixel (brush->pixmap->format);
           num_color_bytes = brush->pixmap->height * brush->pixmap->width *
                             color_bpp;
-          color_bytes     = g_memdup (temp_buf_get_data (brush->pixmap),
+          color_bytes     = g_memdup (gimp_temp_buf_get_data (brush->pixmap),
                                       num_color_bytes);
         }
     }
diff --git a/tools/pdbgen/pdb/brushes.pdb b/tools/pdbgen/pdb/brushes.pdb
index fc66881..27e7f55 100644
--- a/tools/pdbgen/pdb/brushes.pdb
+++ b/tools/pdbgen/pdb/brushes.pdb
@@ -186,8 +186,8 @@ sub brushes_get_brush_data {
       paint_mode  = 0;
       width       = brush->mask->width;
       height      = brush->mask->height;
-      length      = brush->mask->height * brush->mask->width;
-      mask_data   = g_memdup (temp_buf_get_data (brush->mask), length);
+      length      = gimp_temp_buf_get_data_size (brush->mask);
+      mask_data   = g_memdup (gimp_temp_buf_get_data (brush->mask), length);
     }
   else
     success = FALSE;
diff --git a/tools/pdbgen/pdb/drawable.pdb b/tools/pdbgen/pdb/drawable.pdb
index 0703476..13400ff 100644
--- a/tools/pdbgen/pdb/drawable.pdb
+++ b/tools/pdbgen/pdb/drawable.pdb
@@ -732,11 +732,11 @@ HELP
       actual_width         = buf->width;
       actual_height        = buf->height;
       bpp                  = babl_format_get_bytes_per_pixel (buf->format);
-      thumbnail_data_count = temp_buf_get_data_size (buf);
-      thumbnail_data       = g_memdup (temp_buf_get_data (buf),
+      thumbnail_data_count = gimp_temp_buf_get_data_size (buf);
+      thumbnail_data       = g_memdup (gimp_temp_buf_get_data (buf),
                                        thumbnail_data_count);
 
-      temp_buf_free (buf);
+      gimp_temp_buf_free (buf);
     }
   else
     success = FALSE;
@@ -813,11 +813,11 @@ HELP
           width                = buf->width;
           height               = buf->height;
           bpp                  = babl_format_get_bytes_per_pixel (buf->format);
-          thumbnail_data_count = temp_buf_get_data_size (buf);
-          thumbnail_data       = g_memdup (temp_buf_get_data (buf),
+          thumbnail_data_count = gimp_temp_buf_get_data_size (buf);
+          thumbnail_data       = g_memdup (gimp_temp_buf_get_data (buf),
                                            thumbnail_data_count);
 
-          temp_buf_free (buf);
+          gimp_temp_buf_free (buf);
         }
       else
         success = FALSE;
diff --git a/tools/pdbgen/pdb/image.pdb b/tools/pdbgen/pdb/image.pdb
index 81b324e..a999ccc 100644
--- a/tools/pdbgen/pdb/image.pdb
+++ b/tools/pdbgen/pdb/image.pdb
@@ -2863,11 +2863,11 @@ HELP
       actual_width         = buf->width;
       actual_height        = buf->height;
       bpp                  = babl_format_get_bytes_per_pixel (buf->format);
-      thumbnail_data_count = temp_buf_get_data_size (buf);
-      thumbnail_data       = g_memdup (temp_buf_get_data (buf),
+      thumbnail_data_count = gimp_temp_buf_get_data_size (buf);
+      thumbnail_data       = g_memdup (gimp_temp_buf_get_data (buf),
                                        thumbnail_data_count);
 
-      temp_buf_free (buf);
+      gimp_temp_buf_free (buf);
     }
   else
     success = FALSE;
diff --git a/tools/pdbgen/pdb/pattern.pdb b/tools/pdbgen/pdb/pattern.pdb
index 7b90524..b21112a 100644
--- a/tools/pdbgen/pdb/pattern.pdb
+++ b/tools/pdbgen/pdb/pattern.pdb
@@ -98,8 +98,8 @@ HELP
       width           = pattern->mask->width;
       height          = pattern->mask->height;
       bpp             = babl_format_get_bytes_per_pixel (pattern->mask->format);
-      num_color_bytes = temp_buf_get_data_size (pattern->mask);
-      color_bytes     = g_memdup (temp_buf_get_data (pattern->mask),
+      num_color_bytes = gimp_temp_buf_get_data_size (pattern->mask);
+      color_bytes     = g_memdup (gimp_temp_buf_get_data (pattern->mask),
                                   num_color_bytes);
     }
   else
diff --git a/tools/pdbgen/pdb/patterns.pdb b/tools/pdbgen/pdb/patterns.pdb
index 68cfe49..d188cc9 100644
--- a/tools/pdbgen/pdb/patterns.pdb
+++ b/tools/pdbgen/pdb/patterns.pdb
@@ -137,8 +137,8 @@ sub patterns_get_pattern_data {
       width       = pattern->mask->width;
       height      = pattern->mask->height;
       mask_bpp    = babl_format_get_bytes_per_pixel (pattern->mask->format);
-      length      = temp_buf_get_data_size (pattern->mask);
-      mask_data   = g_memdup (temp_buf_get_data (pattern->mask), length);
+      length      = gimp_temp_buf_get_data_size (pattern->mask);
+      mask_data   = g_memdup (gimp_temp_buf_get_data (pattern->mask), length);
     }
   else
     success = FALSE;



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