[gimp/goat-invasion] app: no need to clear newly created buffers



commit 6b5b887c37536c6db8e58f90494c15ebd1f58042
Author: Ãyvind KolÃs <pippin gimp org>
Date:   Tue Apr 10 18:20:11 2012 +0200

    app: no need to clear newly created buffers
    
    Freshly created GeglBuffers, that are native GeglBuffers are already sparse
    and all tiles are implicit COW empty tiles.

 app/core/gimpdrawable-offset.c   |    4 ----
 app/core/gimpdrawable-stroke.c   |    2 --
 app/paint/gimppaintcore.c        |    1 -
 app/paint/gimpperspectiveclone.c |    1 -
 4 files changed, 0 insertions(+), 8 deletions(-)
---
diff --git a/app/core/gimpdrawable-offset.c b/app/core/gimpdrawable-offset.c
index 1875c9f..385c289 100644
--- a/app/core/gimpdrawable-offset.c
+++ b/app/core/gimpdrawable-offset.c
@@ -101,10 +101,6 @@ gimp_drawable_offset (GimpDrawable   *drawable,
           gegl_buffer_set_color (new_buffer, NULL, color);
           g_object_unref (color);
         }
-      else
-        {
-          gegl_buffer_clear (new_buffer, NULL);
-        }
     }
 
   if (offset_x >= 0)
diff --git a/app/core/gimpdrawable-stroke.c b/app/core/gimpdrawable-stroke.c
index 5d89a5f..1499b72 100644
--- a/app/core/gimpdrawable-stroke.c
+++ b/app/core/gimpdrawable-stroke.c
@@ -341,8 +341,6 @@ gimp_drawable_stroke_scan_convert (GimpDrawable    *drawable,
   mask_buffer = gegl_buffer_new (GEGL_RECTANGLE (0, 0, w, h),
                                  babl_format ("Y u8"));
 
-  gegl_buffer_clear (mask_buffer, NULL);
-
   /* render the stroke into it */
   gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y);
 
diff --git a/app/paint/gimppaintcore.c b/app/paint/gimppaintcore.c
index 1fb68b8..49f1d99 100644
--- a/app/paint/gimppaintcore.c
+++ b/app/paint/gimppaintcore.c
@@ -397,7 +397,6 @@ gimp_paint_core_start (GimpPaintCore     *core,
                                           gimp_item_get_width  (item),
                                           gimp_item_get_height (item)),
                           babl_format ("Y u8"));
-  gegl_buffer_clear (core->canvas_buffer, NULL);
 
   /*  Get the initial undo extents  */
 
diff --git a/app/paint/gimpperspectiveclone.c b/app/paint/gimpperspectiveclone.c
index 48f7f37..9f949b5 100644
--- a/app/paint/gimpperspectiveclone.c
+++ b/app/paint/gimpperspectiveclone.c
@@ -392,7 +392,6 @@ gimp_perspective_clone_get_source (GimpSourceCore   *source_core,
 
   dest_buffer = gegl_buffer_new (GEGL_RECTANGLE (0, 0, x2d - x1d, y2d - y1d),
                                  src_format_alpha);
-  gegl_buffer_clear (dest_buffer, NULL);
 
   gimp_perspective_clone_get_matrix (clone, &matrix);
 



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