mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-11 13:29:21 +03:00
If using the gfx.lib true-colour plotters on a 16-bit screenmode, allocate a 16-bit off-screen bitmap instead of a 32-bit one. This _should_ make things a little quicker in that scenario.
This commit is contained in:
parent
0ce133099b
commit
a262507b3a
@ -153,11 +153,12 @@ void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG height)
|
||||
gg->areabuf = AllocVec(100, MEMF_PRIVATE | MEMF_CLEAR);
|
||||
gg->tmprasbuf = AllocVec(width * height, MEMF_PRIVATE | MEMF_CLEAR);
|
||||
|
||||
if(palette_mapped ==false) {
|
||||
if((palette_mapped == true) ||
|
||||
((depth == 16) && (nsoption_int(cairo_renderer) <= 0))) {
|
||||
gg->bm = AllocBitMap(width, height, depth, BMF_INTERLEAVED, friend);
|
||||
} else {
|
||||
gg->bm = p96AllocBitMap(width, height, 32,
|
||||
BMF_INTERLEAVED, friend, RGBFB_A8R8G8B8);
|
||||
} else {
|
||||
gg->bm = AllocBitMap(width, height, depth, BMF_INTERLEAVED, friend);
|
||||
}
|
||||
|
||||
if(!gg->bm) warn_user("NoMemory","");
|
||||
|
Loading…
Reference in New Issue
Block a user