diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2012-08-07 00:00:04 +0100 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2012-08-07 00:00:04 +0100 |
commit | a262507b3aa67ca8af1b754646d0835b317a58d7 (patch) | |
tree | a623ec29268ae12b2b37b4cda8d5bcf3862e7b64 /amiga | |
parent | 0ce133099b7b4eff3b77cdabb164de0d406f5a62 (diff) | |
download | netsurf-a262507b3aa67ca8af1b754646d0835b317a58d7.tar.gz netsurf-a262507b3aa67ca8af1b754646d0835b317a58d7.tar.bz2 |
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.
Diffstat (limited to 'amiga')
-rwxr-xr-x | amiga/plotters.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/amiga/plotters.c b/amiga/plotters.c index 6ca31203d..2fbd73521 100755 --- a/amiga/plotters.c +++ b/amiga/plotters.c @@ -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",""); |