[gegl] buffer: in GeglTileHandlerZoom, avoid copying fully-damaged tiles



commit 0f3dff02dd7c411c19cc2958d651907f5547355d
Author: Ell <ell_se yahoo com>
Date:   Tue Jan 1 14:43:36 2019 -0500

    buffer: in GeglTileHandlerZoom, avoid copying fully-damaged tiles
    
    In GeglTileHandlerZoom, restore the original damage mask of the
    tile before locking it for writing, so that fully-damaged tile data
    doesn't get unnecessarily copied during uncloning.

 gegl/buffer/gegl-tile-handler-zoom.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/gegl/buffer/gegl-tile-handler-zoom.c b/gegl/buffer/gegl-tile-handler-zoom.c
index 0e8afc3d8..4674f1323 100644
--- a/gegl/buffer/gegl-tile-handler-zoom.c
+++ b/gegl/buffer/gegl-tile-handler-zoom.c
@@ -235,6 +235,11 @@ get_tile (GeglTileSource *gegl_tile_source,
     if (! tile)
       tile = gegl_tile_handler_create_tile (GEGL_TILE_HANDLER (zoom), x, y, z);
 
+    /* restore the original damage mask, so that fully-damaged tiles aren't
+     * copied during uncloning.
+     */
+    tile->damage = damage;
+
     gegl_tile_lock (tile);
 
     for (i = 0; i < 2; i++)
@@ -276,6 +281,7 @@ get_tile (GeglTileSource *gegl_tile_source,
                 }
             }
         }
+
     gegl_tile_unlock (tile);
   }
 


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