[gegl] buffer: improve rowstride handling in chunking of scaled blits



commit 41b1c2ca72ae6fba4e06dbb1ca0b28dbbd969ee1
Author: Øyvind Kolås <pippin gimp org>
Date:   Tue Feb 13 12:00:15 2018 +0100

    buffer: improve rowstride handling in chunking of scaled blits
    
    Fixes bug #793403, which thus far only had manifested itself in thumbnails
    embedded in exported files in GIMP, massimo found trigger commit through
    bisect.

 gegl/buffer/gegl-buffer-access.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gegl/buffer/gegl-buffer-access.c b/gegl/buffer/gegl-buffer-access.c
index e9795bc..4b393c5 100644
--- a/gegl/buffer/gegl-buffer-access.c
+++ b/gegl/buffer/gegl-buffer-access.c
@@ -2051,6 +2051,9 @@ _gegl_buffer_get_unlocked (GeglBuffer          *buffer,
           scale  *= 2;
         }
 
+      if (rowstride == GEGL_AUTO_ROWSTRIDE)
+        rowstride = rect2.width * bpp;
+
       if (GEGL_FLOAT_EQUAL (scale, 1.0))
         {
           sample_rect.x      = factor * x1;
@@ -2063,9 +2066,6 @@ _gegl_buffer_get_unlocked (GeglBuffer          *buffer,
           goto setup_next_chunk;
         }
 
-      if (rowstride == GEGL_AUTO_ROWSTRIDE)
-        rowstride = rect2.width * bpp;
-
       /* this is the level where we split and chew through a small temp-buf worth of data
        * possibly managing to keep things in L2 cache
        */


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