[gimp/goat-invasion: 18/412] app: gimptilebackendtilemanager reduce cases with 0copy



commit 826beeaf6a8a52b29ccbe984b2f6cbde96295732
Author: Ãyvind KolÃs <pippin gimp org>
Date:   Wed Mar 14 02:11:34 2012 +0000

    app: gimptilebackendtilemanager reduce cases with 0copy
    
    We cannot do 0copy access if the height doesn't match, babl through GEGL might
    read into the memory.

 app/gegl/gimptilebackendtilemanager.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/app/gegl/gimptilebackendtilemanager.c b/app/gegl/gimptilebackendtilemanager.c
index b83968d..fec82b1 100644
--- a/app/gegl/gimptilebackendtilemanager.c
+++ b/app/gegl/gimptilebackendtilemanager.c
@@ -152,7 +152,8 @@ gimp_tile_backend_tile_manager_command (GeglTileSource  *tile_store,
         tile_stride      = TILE_WIDTH * tile_bpp (gimp_tile);
         gimp_tile_stride = tile_ewidth (gimp_tile) * tile_bpp (gimp_tile);
 
-        if (tile_stride == gimp_tile_stride)
+        if (tile_stride == gimp_tile_stride && 
+            TILE_HEIGHT == tile_eheight (gimp_tile))
           {
             /* use the GimpTile directly as GEGL tile */
             tile = gegl_tile_new_bare ();



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