[gegl] Fix bugs in "Unify buffer reads"



commit 487c7be06d7a008898b1a8f4c4a153fcbb874866
Author: Daniel Sabo <DanielSabo gmail com>
Date:   Wed Nov 20 11:42:30 2013 -0800

    Fix bugs in "Unify buffer reads"
    
    Found by massimo:
    Wrong stride comparison in fill_abyss_color
    Adding height to x instead of y (the value was unused, so no crash)

 gegl/buffer/gegl-buffer-access.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/gegl/buffer/gegl-buffer-access.c b/gegl/buffer/gegl-buffer-access.c
index 0882f06..16d8789 100644
--- a/gegl/buffer/gegl-buffer-access.c
+++ b/gegl/buffer/gegl-buffer-access.c
@@ -28,6 +28,7 @@
 #include "gegl.h"
 #include "gegl/gegl-debug.h"
 #include "gegl-types-internal.h"
+#include "gegl-algorithms.h"
 #include "gegl-buffer-types.h"
 #include "gegl-buffer.h"
 #include "gegl-buffer-private.h"
@@ -43,8 +44,6 @@
 #include "gegl-buffer-iterator.h"
 #include "gegl-buffer-cl-cache.h"
 
- #include "gegl-algorithms.h"
-
 #if 0
 static inline void
 gegl_buffer_pixel_set (GeglBuffer *buffer,
@@ -606,7 +605,7 @@ fill_abyss_none (guchar *buf, gint width, gint height, gint buf_stride, gint pix
 static void
 fill_abyss_color (guchar *buf, gint width, gint height, gint buf_stride, guchar *pixel, gint pixel_size)
 {
-  if (buf_stride == width)
+  if (buf_stride == width * pixel_size)
     {
       gegl_memset_pattern (buf, pixel, pixel_size, width * height);
     }
@@ -706,7 +705,7 @@ gegl_buffer_iterate_read_abyss_color (GeglBuffer          *buffer,
         }
 
       buf += inner_roi.height * buf_stride;
-      current_roi.x += inner_roi.height;
+      /* current_roi.y += inner_roi.height; */
       current_roi.height -= inner_roi.height;
     }
 


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