Add some debug round thumbnail creation

More debugging of thumbnail creation as it appears to be involved in a
number of recently reported crashes on RISC OS.
This commit is contained in:
Vincent Sanders 2015-03-27 14:39:00 +00:00
parent 78663e9111
commit 6f4f860ce3
3 changed files with 13 additions and 4 deletions

View File

@ -524,6 +524,7 @@ nserror browser_window_history_add(struct browser_window *bw,
/* Thumbnailing failed. Ignore it
* silently but clean up bitmap.
*/
LOG(("Thumbnail bitmap creation failed"));
bitmap_destroy(bitmap);
bitmap = NULL;
}

View File

@ -67,8 +67,11 @@ bool thumbnail_redraw(struct hlcache_handle *content,
assert(content);
if (ctx->plot->option_knockout)
LOG(("Content %p %dx%d ctx:%p", content, width, height, ctx));
if (ctx->plot->option_knockout) {
knockout_plot_start(ctx, &new_ctx);
}
/* Set clip rectangle to required thumbnail size */
clip.x0 = 0;
@ -99,8 +102,9 @@ bool thumbnail_redraw(struct hlcache_handle *content,
/* Render the content */
plot_ok &= content_redraw(content, &data, &clip, &new_ctx);
if (ctx->plot->option_knockout)
if (ctx->plot->option_knockout) {
knockout_plot_end();
}
return plot_ok;
}

View File

@ -92,12 +92,16 @@ bool thumbnail_create(hlcache_handle *content, struct bitmap *bitmap)
assert(content);
assert(bitmap);
LOG(("content %p in bitmap %p", content, bitmap));
/* check if we have access to 32bpp sprites natively */
if (thumbnail_32bpp_available == -1)
if (thumbnail_32bpp_available == -1) {
thumbnail_test();
}
/* if we don't support 32bpp sprites then we redirect to an 8bpp
* image and then convert back. */
* image and then convert back.
*/
if (thumbnail_32bpp_available != 1) {
sprite_area = thumbnail_create_8bpp(bitmap);
if (!sprite_area)