mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-18 02:02:36 +03:00
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:
parent
78663e9111
commit
6f4f860ce3
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user