From f39e2e271dec95f575a7a32bb83e8e7f1b09a897 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Sun, 6 Jun 2021 16:53:00 +0100 Subject: [PATCH] don't invalidate in sinkscreen it was called from a bg thread and could race when under heavy load, eg. vipsdisp displaying animated jpg images --- libvips/conversion/composite.cpp | 1 + libvips/iofuncs/sinkscreen.c | 11 ----------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/libvips/conversion/composite.cpp b/libvips/conversion/composite.cpp index 267e0a56..6b42fb39 100644 --- a/libvips/conversion/composite.cpp +++ b/libvips/conversion/composite.cpp @@ -211,6 +211,7 @@ static inline void * vips_alloc_aligned( size_t sz, size_t align ) { g_assert( !(align & (align - 1)) ); + #ifdef HAVE__ALIGNED_MALLOC return _aligned_malloc( sz, align ); #elif defined(HAVE_POSIX_MEMALIGN) diff --git a/libvips/iofuncs/sinkscreen.c b/libvips/iofuncs/sinkscreen.c index 3508cae9..aa1146d9 100644 --- a/libvips/iofuncs/sinkscreen.c +++ b/libvips/iofuncs/sinkscreen.c @@ -433,17 +433,6 @@ render_work( VipsThreadState *state, void *a ) } tile->painted = TRUE; - /* All downstream images must drop caches, since we've (effectively) - * modified render->out. - */ - if( !render->shutdown ) - vips_image_invalidate_all( render->out ); - if( !render->shutdown && - render->mask ) - vips_image_invalidate_all( render->mask ); - - /* Now clients can update. - */ if( !render->shutdown && render->notify ) render->notify( render->out, &tile->area, render->a );