[gegl] buffer: move gegl_buffer_set_color out of geglbuffer.so
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] buffer: move gegl_buffer_set_color out of geglbuffer.so
- Date: Thu, 27 Sep 2018 12:29:14 +0000 (UTC)
commit 125aa873eaea0a9b81dbe2db94f339573181ceeb
Author: Øyvind Kolås <pippin gimp org>
Date: Thu Sep 27 14:27:27 2018 +0200
buffer: move gegl_buffer_set_color out of geglbuffer.so
gegl/buffer/gegl-buffer-access.c | 14 --------------
gegl/buffer/gegl-buffer.h | 1 -
gegl/gegl-utils.c | 17 +++++++++++++++++
3 files changed, 17 insertions(+), 15 deletions(-)
---
diff --git a/gegl/buffer/gegl-buffer-access.c b/gegl/buffer/gegl-buffer-access.c
index 7e8f463de..391fd3a72 100644
--- a/gegl/buffer/gegl-buffer-access.c
+++ b/gegl/buffer/gegl-buffer-access.c
@@ -29,7 +29,6 @@
#include <gio/gio.h>
#include "gegl.h"
-#include "gegl-debug.h"
#include "gegl-algorithms.h"
#include "gegl-buffer-types.h"
#include "gegl-buffer.h"
@@ -2809,19 +2808,6 @@ gegl_buffer_set_color_from_pixel (GeglBuffer *dst,
}
}
-void
-gegl_buffer_set_color (GeglBuffer *dst,
- const GeglRectangle *dst_rect,
- GeglColor *color)
-{
- uint8_t pixel[128];
- g_return_if_fail (GEGL_IS_BUFFER (dst));
- g_return_if_fail (color);
-
- gegl_color_get_pixel (color, dst->soft_format, pixel);
- gegl_buffer_set_color_from_pixel (dst, dst_rect, &pixel[0], dst->soft_format);
-}
-
GeglBuffer *
gegl_buffer_dup (GeglBuffer *buffer)
{
diff --git a/gegl/buffer/gegl-buffer.h b/gegl/buffer/gegl-buffer.h
index 4253ec52f..b3352c8dc 100644
--- a/gegl/buffer/gegl-buffer.h
+++ b/gegl/buffer/gegl-buffer.h
@@ -304,7 +304,6 @@ void gegl_buffer_set_color (GeglBuffer *buffer,
GeglColor *color);
-
/**
* gegl_buffer_set_color_from_pixel:
* @buffer: a #GeglBuffer
diff --git a/gegl/gegl-utils.c b/gegl/gegl-utils.c
index 456596cb8..849a05541 100644
--- a/gegl/gegl-utils.c
+++ b/gegl/gegl-utils.c
@@ -367,3 +367,20 @@ gegl_memset_pattern (void * restrict dst_ptr,
memcpy (dst, src, remaining_size);
}
}
+
+
+void
+gegl_buffer_set_color (GeglBuffer *dst,
+ const GeglRectangle *dst_rect,
+ GeglColor *color)
+{
+ guchar pixel[128];
+ const Babl *format;
+ g_return_if_fail (GEGL_IS_BUFFER (dst));
+ g_return_if_fail (color);
+ format = gegl_buffer_get_format (dst);
+
+ gegl_color_get_pixel (color, format, pixel);
+ gegl_buffer_set_color_from_pixel (dst, dst_rect, &pixel[0], format);
+}
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]