[gimp] app: use gegl_node_blit() instead of GeglProcessor in GimpPerspectiveClone



commit cc6d3bb1ebcf4c4ef19486c365aec769a011ad77
Author: Michael Natterer <mitch gimp org>
Date:   Thu Mar 7 22:15:29 2013 +0100

    app: use gegl_node_blit() instead of GeglProcessor in GimpPerspectiveClone
    
    the speedup is hardly measurable, but why not get rid of some overhead
    anyway.

 app/paint/gimpperspectiveclone.c |   11 +++--------
 app/paint/gimpperspectiveclone.h |    1 -
 2 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/app/paint/gimpperspectiveclone.c b/app/paint/gimpperspectiveclone.c
index 6cafc47..d6699da 100644
--- a/app/paint/gimpperspectiveclone.c
+++ b/app/paint/gimpperspectiveclone.c
@@ -258,8 +258,6 @@ gimp_perspective_clone_paint (GimpPaintCore    *paint_core,
                                    clone->dest_node,
                                    NULL);
             }
-
-          clone->processor = gegl_node_new_processor (clone->dest_node, NULL);
         }
       break;
 
@@ -323,12 +321,10 @@ gimp_perspective_clone_paint (GimpPaintCore    *paint_core,
       if (clone->node)
         {
           g_object_unref (clone->node);
-          g_object_unref (clone->processor);
           clone->node           = NULL;
           clone->crop           = NULL;
           clone->transform_node = NULL;
           clone->dest_node      = NULL;
-          clone->processor      = NULL;
         }
       break;
 
@@ -437,10 +433,9 @@ gimp_perspective_clone_get_source (GimpSourceCore   *source_core,
                  "buffer", dest_buffer,
                  NULL);
 
-  gegl_processor_set_rectangle (clone->processor,
-                                GEGL_RECTANGLE (0, 0,
-                                                x2d - x1d, y2d - y1d));
-  while (gegl_processor_work (clone->processor, NULL));
+  gegl_node_blit (clone->dest_node, 1.0,
+                  GEGL_RECTANGLE (0, 0, x2d - x1d, y2d - y1d),
+                  NULL, NULL, 0, GEGL_BLIT_DEFAULT);
 
   *src_rect = *GEGL_RECTANGLE (0, 0, x2d - x1d, y2d - y1d);
 
diff --git a/app/paint/gimpperspectiveclone.h b/app/paint/gimpperspectiveclone.h
index c7b7cb5..79db051 100644
--- a/app/paint/gimpperspectiveclone.h
+++ b/app/paint/gimpperspectiveclone.h
@@ -49,7 +49,6 @@ struct _GimpPerspectiveClone
   GeglNode      *crop;
   GeglNode      *transform_node;
   GeglNode      *dest_node;
-  GeglProcessor *processor;
 };
 
 struct _GimpPerspectiveCloneClass


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