diff --git a/app/core/gimptempbuf.c b/app/core/gimptempbuf.c index f014d783a7..91a00de144 100644 --- a/app/core/gimptempbuf.c +++ b/app/core/gimptempbuf.c @@ -200,3 +200,11 @@ gimp_temp_buf_create_buffer (GimpTempBuf *temp_buf) return buffer; } + +GimpTempBuf * +gimp_gegl_buffer_get_temp_buf (GeglBuffer *buffer) +{ + g_return_val_if_fail (GEGL_IS_BUFFER (buffer), NULL); + + return g_object_get_data (G_OBJECT (buffer), "gimp-temp-buf"); +} diff --git a/app/core/gimptempbuf.h b/app/core/gimptempbuf.h index 404fa17d33..f05cb09fca 100644 --- a/app/core/gimptempbuf.h +++ b/app/core/gimptempbuf.h @@ -29,25 +29,27 @@ struct _GimpTempBuf }; -GimpTempBuf * gimp_temp_buf_new (gint width, - gint height, - const Babl *fomat) G_GNUC_WARN_UNUSED_RESULT; -GimpTempBuf * gimp_temp_buf_copy (const GimpTempBuf *src) 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 (const GimpTempBuf *src) G_GNUC_WARN_UNUSED_RESULT; -GimpTempBuf * gimp_temp_buf_ref (GimpTempBuf *buf); -void gimp_temp_buf_unref (GimpTempBuf *buf); +GimpTempBuf * gimp_temp_buf_ref (GimpTempBuf *buf); +void gimp_temp_buf_unref (GimpTempBuf *buf); -GimpTempBuf * gimp_temp_buf_scale (const GimpTempBuf *buf, - gint width, - gint height) G_GNUC_WARN_UNUSED_RESULT; +GimpTempBuf * gimp_temp_buf_scale (const GimpTempBuf *buf, + gint width, + gint height) G_GNUC_WARN_UNUSED_RESULT; -guchar * gimp_temp_buf_get_data (const GimpTempBuf *buf); -gsize gimp_temp_buf_get_data_size (const GimpTempBuf *buf); -guchar * gimp_temp_buf_data_clear (GimpTempBuf *buf); +guchar * gimp_temp_buf_get_data (const GimpTempBuf *buf); +gsize gimp_temp_buf_get_data_size (const GimpTempBuf *buf); +guchar * gimp_temp_buf_data_clear (GimpTempBuf *buf); -gsize gimp_temp_buf_get_memsize (const GimpTempBuf *buf); +gsize gimp_temp_buf_get_memsize (const GimpTempBuf *buf); + +GeglBuffer * gimp_temp_buf_create_buffer (GimpTempBuf *temp_buf) G_GNUC_WARN_UNUSED_RESULT; +GimpTempBuf * gimp_gegl_buffer_get_temp_buf (GeglBuffer *buffer); -GeglBuffer * gimp_temp_buf_create_buffer (GimpTempBuf *temp_buf) G_GNUC_WARN_UNUSED_RESULT; #endif /* __GIMP_TEMP_BUF_H__ */ diff --git a/app/gegl/gimp-gegl-utils.c b/app/gegl/gimp-gegl-utils.c index 58599c20b0..d65620b14f 100644 --- a/app/gegl/gimp-gegl-utils.c +++ b/app/gegl/gimp-gegl-utils.c @@ -244,14 +244,6 @@ gimp_gegl_buffer_get_tiles (GeglBuffer *buffer) return gimp_tile_backend_tile_manager_get_tiles (backend); } -GimpTempBuf * -gimp_gegl_buffer_get_temp_buf (GeglBuffer *buffer) -{ - g_return_val_if_fail (GEGL_IS_BUFFER (buffer), NULL); - - return g_object_get_data (G_OBJECT (buffer), "gimp-temp-buf"); -} - void gimp_gegl_buffer_refetch_tiles (GeglBuffer *buffer) { diff --git a/app/gegl/gimp-gegl-utils.h b/app/gegl/gimp-gegl-utils.h index 0b2bf671c6..c7e54b51af 100644 --- a/app/gegl/gimp-gegl-utils.h +++ b/app/gegl/gimp-gegl-utils.h @@ -41,8 +41,6 @@ GeglBuffer * gimp_tile_manager_create_buffer (TileManager *tm, const Babl *format); TileManager * gimp_gegl_buffer_get_tiles (GeglBuffer *buffer); -GimpTempBuf * gimp_gegl_buffer_get_temp_buf (GeglBuffer *buffer); - GeglBuffer * gimp_pixbuf_create_buffer (GdkPixbuf *pixbuf); void gimp_gegl_buffer_refetch_tiles (GeglBuffer *buffer); diff --git a/app/paint/gimppaintcore.c b/app/paint/gimppaintcore.c index 49f1d9981f..b1d0927a48 100644 --- a/app/paint/gimppaintcore.c +++ b/app/paint/gimppaintcore.c @@ -39,6 +39,7 @@ #include "core/gimpimage-undo.h" #include "core/gimppickable.h" #include "core/gimpprojection.h" +#include "core/gimptempbuf.h" #include "gimppaintcore.h" #include "gimppaintcoreundo.h"