diff --git a/TODO b/TODO index 29abd088..2c49d218 100644 --- a/TODO +++ b/TODO @@ -1,12 +1,28 @@ - can we use postbuild elsewhere? look at use of "preclose" / "written", etc. + + + - why is cache in nip2 so slow? its awful investigate again is it using vips_sinkscreen()? should it use tilecache? + Cache calls cache in _stdenv.def + + cache calls im_cache() + + im_cache() calls vips_sink_screen() + + + + im_tile_cache() calls vips_tilecache() + + add im_tile_cache to vips7 op db, try using it from nip2 + + - test draw_mask on labq images diff --git a/libvips/deprecated/package.c b/libvips/deprecated/package.c index df2194bc..dd43802a 100644 --- a/libvips/deprecated/package.c +++ b/libvips/deprecated/package.c @@ -497,6 +497,30 @@ static im_function cache_desc = { cache_args /* Arg list */ }; +/* Call im_tile_cache() via arg vector. + */ +static int +tile_cache_vec( im_object *argv ) +{ + int tile_width = *((int *) argv[2]); + int tile_height = *((int *) argv[3]); + int max_tiles = *((int *) argv[4]); + + return( im_tile_cache( argv[0], argv[1], + tile_width, tile_height, max_tiles ) ); +} + +/* Description of im_cache. + */ +static im_function tile_cache_desc = { + "im_tile_cache", /* Name */ + "cache results of an operation",/* Description */ + 0, /* Flags */ + tile_cache_vec, /* Dispatch function */ + VIPS_NUMBER( cache_args ), /* Size of arg list */ + cache_args /* Arg list */ +}; + /* im_binfile() args. */ static im_arg_desc binfile_args[] = { @@ -546,6 +570,7 @@ static im_function binfile_desc = { static im_function *iofuncs_list[] = { &binfile_desc, &cache_desc, + &tile_cache_desc, &concurrency_get_desc, &getext_desc, &guess_prefix_desc,