[gegl] gegl-paint: use pixelformats that have optimizations
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] gegl-paint: use pixelformats that have optimizations
- Date: Fri, 17 Dec 2010 15:40:49 +0000 (UTC)
commit 9b19beb99f60ea0c90b07933e75c6f0bd8bd6ed9
Author: �yvind Kolås <pippin gimp org>
Date: Fri Dec 17 15:27:43 2010 +0000
gegl-paint: use pixelformats that have optimizations
examples/gegl-paint.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/examples/gegl-paint.c b/examples/gegl-paint.c
index 6dfabbf..7a79b3c 100644
--- a/examples/gegl-paint.c
+++ b/examples/gegl-paint.c
@@ -23,7 +23,7 @@
#include "util/gegl-view.c"
#include "property-types/gegl-path.h"
-#define HARDNESS 0.2
+#define HARDNESS 0.6
#define LINEWIDTH 60.0
#define COLOR "rgba(0.0,0.0,0.0,0.4)"
@@ -130,7 +130,6 @@ gint
main (gint argc,
gchar **argv)
{
-
g_thread_init (NULL);
gtk_init (&argc, &argv);
gegl_init (&argc, &argv);
@@ -143,13 +142,14 @@ main (gint argc,
GeglRectangle rect = {0, 0, 512, 512};
gpointer buf;
- /* XXX: the format should be RaGaBaA float, it is nonpremultiplied
- * right now, slowing things down a bit, but it circumvents overeager
- * in place processing code.
+ /* XXX: for best overall performance, this format should probably
+ * be RaGaBaA float, overeager in-place processing code makes that fail though.
+ */
+ buffer = gegl_buffer_new (&rect, babl_format("R'G'B' u8"));
+ /* it would be useful to have a programmatic way of doing this, filling
+ * with a given pixel value
*/
- buffer = gegl_buffer_new (&rect, babl_format("RGBA float"));
buf = gegl_buffer_linear_open (buffer, NULL, NULL, babl_format ("Y' u8"));
- /* it would be useful to have a programmatic way of doing this */
memset (buf, 255, 512 * 512);
gegl_buffer_linear_close (buffer, buf);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]