clean up buffer recycle fix

This commit is contained in:
John Cupitt 2013-12-13 14:05:10 +00:00
parent c782150a6d
commit 82df44f9d6
3 changed files with 6 additions and 8 deletions

View File

@ -197,7 +197,7 @@ vips_buffer_done( VipsBuffer *buffer )
}
}
/* Take off the public 'done' list.
/* Take off the public 'done' list. Make sure it has no calculated pixels in.
*/
void
vips_buffer_undone( VipsBuffer *buffer )
@ -226,14 +226,15 @@ vips_buffer_undone( VipsBuffer *buffer )
buffer->done = FALSE;
buffer->cache = NULL;
buffer->area.width = 0;
buffer->area.height = 0;
#ifdef DEBUG
printf( "vips_buffer_undone: %d buffers left\n",
g_slist_length( cache_list->buffers ) );
#endif /*DEBUG*/
}
buffer->area.width = 0;
buffer->area.height = 0;
}
void

View File

@ -782,11 +782,8 @@ vips_region_region( VipsRegion *reg,
/* Init new stuff.
*/
if( reg->buffer ) {
if( reg->buffer )
vips_buffer_undone( reg->buffer );
reg->buffer->area.width = 0;
reg->buffer->area.height = 0;
}
reg->invalid = FALSE;
reg->valid = final;
reg->bpl = dest->bpl;

View File

@ -59,7 +59,7 @@ bool init( const char *argv0 )
return( vips_init( argv0 ) == 0 );
}
void shutdown( void )
void shutdown()
{
vips_shutdown();
}