diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2013-04-28 12:21:39 +0100 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2013-04-28 12:21:39 +0100 |
commit | 8c7eea4b620701b105b4206da9b2c2dbf89fb717 (patch) | |
tree | cdec4270d1a2e3df3aec33c2f8c1a2585b64efca /amiga | |
parent | e4f11d1b748f425ece416aa1a2a9b4c9596b7cbb (diff) | |
download | netsurf-8c7eea4b620701b105b4206da9b2c2dbf89fb717.tar.gz netsurf-8c7eea4b620701b105b4206da9b2c2dbf89fb717.tar.bz2 |
Allocate the off-screen BitMap as a friend of the screen BitMap in the increasingly diminishing number of cases where this works correctly. This should stop NetSurf using memory on the wrong graphics card when two are installed.
Diffstat (limited to 'amiga')
-rwxr-xr-x | amiga/plotters.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/amiga/plotters.c b/amiga/plotters.c index ace3c3b53..884b1ce78 100755 --- a/amiga/plotters.c +++ b/amiga/plotters.c @@ -156,14 +156,21 @@ void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG height) ULONG depth = 32; struct DrawInfo *dri; - struct BitMap *friend = NULL; /* Required to be NULL for Cairo and ARGB bitmaps */ + struct BitMap *friend = NULL; depth = GetBitMapAttr(scrn->RastPort.BitMap, BMA_DEPTH); if((depth < 16) || (nsoption_int(cairo_renderer) == -1)) { palette_mapped = true; - // friend = scrn->RastPort.BitMap; } else { palette_mapped = false; + + /* If we're not palette-mapping allocate using a friend BitMap if the + * depth is 32bpp. In all other cases using a friend BitMap causes a + * hard lockup or odd/missing graphical effects. + */ + + if(depth == 32) + friend = scrn->RastPort.BitMap; } if(nsoption_int(redraw_tile_size_x) <= 0) nsoption_set_int(redraw_tile_size_x, scrn->Width); |