summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2015-08-15 16:42:52 +0100
committerChris Young <chris@unsatisfactorysoftware.co.uk>2015-08-15 16:42:52 +0100
commit45171214edd2741e00206df93799a649dcc71384 (patch)
tree3c4360b608f316c1a75f02c94665aad52f5b14e4
parentc2dd23462619cba285c904a91024024a55c16b69 (diff)
downloadnetsurf-45171214edd2741e00206df93799a649dcc71384.tar.gz
netsurf-45171214edd2741e00206df93799a649dcc71384.tar.bz2
Add an option to toggle usage of a friend BitMap for our off-screen rendering buffer (OS3 only).
Defaults to OFF, which works everywhere, but can be switched on for performance benefits when using RTG.
-rw-r--r--amiga/options.h4
-rw-r--r--amiga/plotters.c14
2 files changed, 15 insertions, 3 deletions
diff --git a/amiga/options.h b/amiga/options.h
index a98b1e81d..b28a4f0a2 100644
--- a/amiga/options.h
+++ b/amiga/options.h
@@ -88,4 +88,8 @@ NSOPTION_INTEGER(redraw_tile_size_y, 0)
NSOPTION_INTEGER(monitor_aspect_x, 0)
NSOPTION_INTEGER(monitor_aspect_y, 0)
NSOPTION_BOOL(accept_lang_locale, true)
+/* Options relevant for OS3 only */
+#ifndef __amigaos4__
+NSOPTION_BOOL(friend_bitmap, false)
+#endif
diff --git a/amiga/plotters.c b/amiga/plotters.c
index 202d1b879..09b08354c 100644
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -122,9 +122,15 @@ void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG height)
gg->areabuf = AllocVecTagList(AREA_SIZE, NULL);
gg->tmprasbuf = AllocVecTagList(width * height, NULL);
+ /* Friend BitMaps are weird.
+ * For OS4, we shouldn't use a friend BitMap here (see below).
+ * For OS3 AGA, we get no display blitted if we use a friend BitMap,
+ * however on RTG it seems to be a benefit. Hence this user-adjustable option.
+ */
#ifndef __amigaos4__
- /* If you're wondering why this is #ifdeffed, see the note about OS4 friend bitmaps below */
- friend = scrn->RastPort.BitMap;
+ if(nsoption_bool(friend_bitmap) == true) {
+ friend = scrn->RastPort.BitMap;
+ }
#endif
if(palette_mapped == true) {
@@ -133,7 +139,9 @@ void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG height)
#ifdef __amigaos4__
/* Screen depth is reported as 24 even when it's actually 32-bit.
* We get freezes and other problems on OS4 if we befriend at any
- * other depths, hence this check. */
+ * other depths, hence this check.
+ * Note that this is forced on, the option is only used under OS3.
+ */
if(depth >= 24) friend = scrn->RastPort.BitMap;
#endif
gg->bm = ami_rtg_allocbitmap(width, height, 32, 0, friend, RGBFB_A8R8G8B8);