From 6bc564a1e1f8dba9b69f8802284b35ee8aaf6cfb Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Fri, 7 Dec 2018 16:43:44 +0000 Subject: [PATCH] turn on smalltile 2D locality helps a lot with many subimages --- ChangeLog | 3 ++- libvips/conversion/composite.cpp | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 62e39981..02e88cc6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,8 +9,9 @@ - add bandand()/or()/eor() to cplusplus binding [clcaalu] - implement shrink-on-load for tiff pyramids [jcupitt] - added vips_image_set_blob_copy() [jcupitt] -- don't stop composite on first non-transparent image [felixbuenemann] +- don't stop composite on first non-transparent image [felixbuenemann, GDmac] - add vips_rect_overlapsrect() +- composite is much faster at positioning subimages 21/11/18 started 8.7.3 - fix infinite loop for autofit with non-scaleable font diff --git a/libvips/conversion/composite.cpp b/libvips/conversion/composite.cpp index aee62693..5c0f4f0f 100644 --- a/libvips/conversion/composite.cpp +++ b/libvips/conversion/composite.cpp @@ -10,7 +10,7 @@ * 11/8/18 [medakk] * - x/y params let you position images * 27/11/18 - * - don't stop on first non-transparent image [felixbuenemann] + * - don't stop on first non-transparent image [felixbuenemann, GDmac] * 6/12/18 * - do our own subimage positioning */ @@ -1356,8 +1356,11 @@ vips_composite_base_build( VipsObject *object ) return( -1 ); in = format; + /* We want locality, so that we only prepare a few subimages each + * time. + */ if( vips_image_pipeline_array( conversion->out, - VIPS_DEMAND_STYLE_THINSTRIP, in ) ) + VIPS_DEMAND_STYLE_SMALLTILE, in ) ) return( -1 ); /* The output image is always the size of the base image.