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:
Chris Young 2012-08-07 00:00:04 +01:00
parent 0ce133099b
commit a262507b3a

View File

@ -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","");