[gimp] app: use gimp_gegl_buffer_copy() in various places



commit bb7f61c9192e4827cd9c80dfe71e6d133eb6fda1
Author: Ell <ell_se yahoo com>
Date:   Wed Mar 6 04:50:03 2019 -0500

    app: use gimp_gegl_buffer_copy() in various places
    
    ... instead of gegl_buffer_copy().  The former parallelizes the
    format conversion.

 app/core/gimplineart.c             |  4 +++-
 app/gegl/gimptilehandlervalidate.c |  5 +++--
 app/paint/gimppaintcore.c          | 20 +++++++++++---------
 3 files changed, 17 insertions(+), 12 deletions(-)
---
diff --git a/app/core/gimplineart.c b/app/core/gimplineart.c
index b63c40aa05..0c2b8df066 100644
--- a/app/core/gimplineart.c
+++ b/app/core/gimplineart.c
@@ -27,6 +27,8 @@
 
 #include "core-types.h"
 
+#include "gegl/gimp-gegl-loops.h"
+
 #include "gimp-parallel.h"
 #include "gimp-priorities.h"
 #include "gimp-utils.h" /* GIMP_TIMER */
@@ -901,7 +903,7 @@ gimp_line_art_close (GeglBuffer  *buffer,
   /* Transform the line art from any format to gray. */
   strokes = gegl_buffer_new (gegl_buffer_get_extent (buffer),
                              gray_format);
-  gegl_buffer_copy (buffer, NULL, GEGL_ABYSS_NONE, strokes, NULL);
+  gimp_gegl_buffer_copy (buffer, NULL, GEGL_ABYSS_NONE, strokes, NULL);
   gegl_buffer_set_format (strokes, babl_format ("Y' u8"));
 
   if (! select_transparent)
diff --git a/app/gegl/gimptilehandlervalidate.c b/app/gegl/gimptilehandlervalidate.c
index 813ee90108..2e7e3b6657 100644
--- a/app/gegl/gimptilehandlervalidate.c
+++ b/app/gegl/gimptilehandlervalidate.c
@@ -22,6 +22,7 @@
 
 #include "gimp-gegl-types.h"
 
+#include "gimp-gegl-loops.h"
 #include "gimptilehandlervalidate.h"
 
 
@@ -609,8 +610,8 @@ gimp_tile_handler_validate_buffer_copy (GeglBuffer          *src_buffer,
 
   dst_validate->suspend_validate++;
 
-  gegl_buffer_copy (src_buffer, &real_src_rect, GEGL_ABYSS_NONE,
-                    dst_buffer, &real_dst_rect);
+  gimp_gegl_buffer_copy (src_buffer, &real_src_rect, GEGL_ABYSS_NONE,
+                         dst_buffer, &real_dst_rect);
 
   dst_validate->suspend_validate--;
 
diff --git a/app/paint/gimppaintcore.c b/app/paint/gimppaintcore.c
index 4ff3ebca9a..4b52ac23be 100644
--- a/app/paint/gimppaintcore.c
+++ b/app/paint/gimppaintcore.c
@@ -1053,15 +1053,17 @@ gimp_paint_core_replace (GimpPaintCore            *core,
           combined_mask_buffer = gegl_buffer_new (&aligned_combined_mask_rect,
                                                   babl_format ("Y float"));
 
-          gegl_buffer_copy (core->mask_buffer,
-                            GEGL_RECTANGLE (aligned_combined_mask_rect.x -
-                                            core->mask_x_offset,
-                                            aligned_combined_mask_rect.y -
-                                            core->mask_y_offset,
-                                            aligned_combined_mask_rect.width,
-                                            aligned_combined_mask_rect.height),
-                            GEGL_ABYSS_NONE,
-                            combined_mask_buffer, &aligned_combined_mask_rect);
+          gimp_gegl_buffer_copy (
+            core->mask_buffer,
+            GEGL_RECTANGLE (aligned_combined_mask_rect.x -
+                            core->mask_x_offset,
+                            aligned_combined_mask_rect.y -
+                            core->mask_y_offset,
+                            aligned_combined_mask_rect.width,
+                            aligned_combined_mask_rect.height),
+            GEGL_ABYSS_NONE,
+            combined_mask_buffer,
+            &aligned_combined_mask_rect);
 
           gimp_gegl_combine_mask (mask_buffer,          &mask_rect,
                                   combined_mask_buffer, &combined_mask_rect,


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