Count total number of images that were not rendered and log on exit.
svn path=/trunk/netsurf/; revision=12740
This commit is contained in:
parent
dca97bc8d4
commit
4e2a0bbc45
|
@ -82,6 +82,8 @@ struct image_cache_s {
|
|||
int specultive_miss_count; /* bitmap was available but never actually required conversion */
|
||||
int hit_count; /* bitmap was available at plot time required no conversion */
|
||||
int fail_count; /* bitmap was not available at plot time, required conversion which failed */
|
||||
|
||||
int total_unrendered; /* bitmap was freed without ever being required for redraw */
|
||||
};
|
||||
|
||||
static struct image_cache_s *image_cache = NULL;
|
||||
|
@ -191,6 +193,10 @@ static void image_cache__free_entry(struct image_cache_entry_s *centry)
|
|||
{
|
||||
LOG(("freeing %p ", centry));
|
||||
|
||||
if (centry->redraw_count == 0) {
|
||||
image_cache->total_unrendered++;
|
||||
}
|
||||
|
||||
image_cache__free_bitmap(centry);
|
||||
|
||||
image_cache__unlink(centry);
|
||||
|
@ -314,6 +320,9 @@ nserror image_cache_fini(void)
|
|||
(image_cache->miss_count * 100) / op_count,
|
||||
(image_cache->specultive_miss_count * 100) / op_count,
|
||||
(image_cache->fail_count * 100) / op_count));
|
||||
LOG(("Total images never rendered: %d (includes %d that were converted)",
|
||||
image_cache->total_unrendered,
|
||||
image_cache->specultive_miss_count));
|
||||
free(image_cache);
|
||||
|
||||
return NSERROR_OK;
|
||||
|
|
Loading…
Reference in New Issue