[gimp/goat-invasion: 198/418] app: port gimpimage-convert.c to gimp_drawable_set_buffer()



commit 392cb4d07da72d71c1b6cfe88fa4cdf31db173c2
Author: Michael Natterer <mitch gimp org>
Date:   Wed Mar 21 23:04:14 2012 +0100

    app: port gimpimage-convert.c to gimp_drawable_set_buffer()

 app/core/gimpimage-convert.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/app/core/gimpimage-convert.c b/app/core/gimpimage-convert.c
index 0193769..937474f 100644
--- a/app/core/gimpimage-convert.c
+++ b/app/core/gimpimage-convert.c
@@ -144,6 +144,8 @@
 #include "base/pixel-region.h"
 #include "base/tile-manager.h"
 
+#include "gegl/gimp-gegl-utils.h"
+
 #include "gimp.h"
 #include "gimpcontainer.h"
 #include "gimpdrawable.h"
@@ -973,6 +975,7 @@ gimp_image_convert (GimpImage               *image,
           {
             GimpImageType  new_layer_type;
             TileManager   *new_tiles;
+            GeglBuffer    *new_buffer;
 
             new_layer_type = GIMP_IMAGE_TYPE_FROM_BASE_TYPE (new_type);
 
@@ -986,9 +989,12 @@ gimp_image_convert (GimpImage               *image,
             quantobj->nth_layer = nth_layer;
             (* quantobj->second_pass) (quantobj, layer, new_tiles);
 
-            gimp_drawable_set_tiles (GIMP_DRAWABLE (layer), TRUE, NULL,
-                                     new_tiles, new_layer_type);
+            new_buffer = gimp_tile_manager_create_buffer (new_tiles, NULL);
             tile_manager_unref (new_tiles);
+
+            gimp_drawable_set_buffer (GIMP_DRAWABLE (layer), TRUE, NULL,
+                                      new_buffer, new_layer_type);
+            g_object_unref (new_buffer);
           }
           break;
 



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