clean up buffer recycle fix
This commit is contained in:
parent
c782150a6d
commit
82df44f9d6
@ -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
|
void
|
||||||
vips_buffer_undone( VipsBuffer *buffer )
|
vips_buffer_undone( VipsBuffer *buffer )
|
||||||
@ -226,14 +226,15 @@ vips_buffer_undone( VipsBuffer *buffer )
|
|||||||
buffer->done = FALSE;
|
buffer->done = FALSE;
|
||||||
buffer->cache = NULL;
|
buffer->cache = NULL;
|
||||||
|
|
||||||
buffer->area.width = 0;
|
|
||||||
buffer->area.height = 0;
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf( "vips_buffer_undone: %d buffers left\n",
|
printf( "vips_buffer_undone: %d buffers left\n",
|
||||||
g_slist_length( cache_list->buffers ) );
|
g_slist_length( cache_list->buffers ) );
|
||||||
#endif /*DEBUG*/
|
#endif /*DEBUG*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
buffer->area.width = 0;
|
||||||
|
buffer->area.height = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -782,11 +782,8 @@ vips_region_region( VipsRegion *reg,
|
|||||||
|
|
||||||
/* Init new stuff.
|
/* Init new stuff.
|
||||||
*/
|
*/
|
||||||
if( reg->buffer ) {
|
if( reg->buffer )
|
||||||
vips_buffer_undone( reg->buffer );
|
vips_buffer_undone( reg->buffer );
|
||||||
reg->buffer->area.width = 0;
|
|
||||||
reg->buffer->area.height = 0;
|
|
||||||
}
|
|
||||||
reg->invalid = FALSE;
|
reg->invalid = FALSE;
|
||||||
reg->valid = final;
|
reg->valid = final;
|
||||||
reg->bpl = dest->bpl;
|
reg->bpl = dest->bpl;
|
||||||
|
@ -59,7 +59,7 @@ bool init( const char *argv0 )
|
|||||||
return( vips_init( argv0 ) == 0 );
|
return( vips_init( argv0 ) == 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
void shutdown( void )
|
void shutdown()
|
||||||
{
|
{
|
||||||
vips_shutdown();
|
vips_shutdown();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user