mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-25 13:37:02 +03:00
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.
This commit is contained in:
parent
e4f11d1b74
commit
8c7eea4b62
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user