vips_sink_screen() now invalidates for you
clients no longer need to call vips_image_invalidate_all()
This commit is contained in:
parent
c80e7292be
commit
16830d6937
10
TODO
10
TODO
@ -1,13 +1,3 @@
|
|||||||
- try:
|
|
||||||
|
|
||||||
$ vips falsecolour k2.jpg x.jpg
|
|
||||||
vips warning: VipsJpeg: read gave 896 warnings
|
|
||||||
vips warning: VipsJpeg: Application transferred too many scanlines
|
|
||||||
|
|
||||||
seems to read twice?
|
|
||||||
|
|
||||||
problem in 7.38 too
|
|
||||||
|
|
||||||
- vips_colourspace() needs an option from_space param,?
|
- vips_colourspace() needs an option from_space param,?
|
||||||
|
|
||||||
- check_uncoded() left to do:
|
- check_uncoded() left to do:
|
||||||
|
@ -120,6 +120,8 @@ int vips_region_prepare_to( VipsRegion *reg,
|
|||||||
VipsRegion *dest, VipsRect *r, int x, int y );
|
VipsRegion *dest, VipsRect *r, int x, int y );
|
||||||
int vips_region_prepare_many( VipsRegion **reg, VipsRect *r );
|
int vips_region_prepare_many( VipsRegion **reg, VipsRect *r );
|
||||||
|
|
||||||
|
void vips_region_invalidate( VipsRegion *reg );
|
||||||
|
|
||||||
void vips_region_dump_all( void );
|
void vips_region_dump_all( void );
|
||||||
|
|
||||||
/* Macros on VipsRegion.
|
/* Macros on VipsRegion.
|
||||||
|
@ -953,9 +953,9 @@ vips_image_build( VipsObject *object )
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
vips_region_invalidate( VipsRegion *reg )
|
vips_image_real_invalidate_cb( VipsRegion *reg )
|
||||||
{
|
{
|
||||||
reg->invalid = TRUE;
|
vips_region_invalidate( reg );
|
||||||
|
|
||||||
return( NULL );
|
return( NULL );
|
||||||
}
|
}
|
||||||
@ -972,7 +972,7 @@ vips_image_real_invalidate( VipsImage *image )
|
|||||||
VIPS_GATE_STOP( "vips_image_real_invalidate: wait" );
|
VIPS_GATE_STOP( "vips_image_real_invalidate: wait" );
|
||||||
|
|
||||||
(void) vips_slist_map2( image->regions,
|
(void) vips_slist_map2( image->regions,
|
||||||
(VipsSListMap2Fn) vips_region_invalidate, NULL, NULL );
|
(VipsSListMap2Fn) vips_image_real_invalidate_cb, NULL, NULL );
|
||||||
|
|
||||||
g_mutex_unlock( image->sslock );
|
g_mutex_unlock( image->sslock );
|
||||||
}
|
}
|
||||||
@ -1274,6 +1274,8 @@ vips_image_invalidate_all_cb( VipsImage *image )
|
|||||||
* is, images which depend on this image.
|
* is, images which depend on this image.
|
||||||
*
|
*
|
||||||
* The "invalidate" callback is triggered for all invalidated images.
|
* The "invalidate" callback is triggered for all invalidated images.
|
||||||
|
*
|
||||||
|
* See also: vips_region_invalidate().
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
vips_image_invalidate_all( VipsImage *image )
|
vips_image_invalidate_all( VipsImage *image )
|
||||||
|
@ -1375,6 +1375,25 @@ vips_region_prepare_many( VipsRegion **reg, VipsRect *r )
|
|||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* vips_region_invalidate:
|
||||||
|
* @reg: region to invalidate
|
||||||
|
*
|
||||||
|
* Mark a region as containing invalid pixels. Calling this function means
|
||||||
|
* that the next time vips_region_prepare() is called, the region will be
|
||||||
|
* recalculated.
|
||||||
|
*
|
||||||
|
* This is faster than calling vips_image_invalidate_all(), but obviously only
|
||||||
|
* affects a single region.
|
||||||
|
*
|
||||||
|
* See also: vips_image_invalidate_all(), vips_region_prepare().
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
vips_region_invalidate( VipsRegion *reg )
|
||||||
|
{
|
||||||
|
reg->invalid = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef VIPS_DEBUG
|
#ifdef VIPS_DEBUG
|
||||||
static void *
|
static void *
|
||||||
vips_region_dump_all_cb( VipsRegion *region, size_t *alive )
|
vips_region_dump_all_cb( VipsRegion *region, size_t *alive )
|
||||||
|
@ -424,6 +424,11 @@ render_work( VipsThreadState *state, void *a )
|
|||||||
}
|
}
|
||||||
tile->painted = TRUE;
|
tile->painted = TRUE;
|
||||||
|
|
||||||
|
/* All downstream images must drop caches, since we've (effectively)
|
||||||
|
* modified render->out.
|
||||||
|
*/
|
||||||
|
vips_image_invalidate_all( render->out );
|
||||||
|
|
||||||
/* Now clients can update.
|
/* Now clients can update.
|
||||||
*/
|
*/
|
||||||
if( render->notify )
|
if( render->notify )
|
||||||
|
Loading…
Reference in New Issue
Block a user