Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/81f6cd2074f76f3e97653...
...commit
http://git.netsurf-browser.org/netsurf.git/commit/81f6cd2074f76f3e9765374...
...tree
http://git.netsurf-browser.org/netsurf.git/tree/81f6cd2074f76f3e976537453...
The branch, master has been updated
via 81f6cd2074f76f3e976537453be18b6f34f1ab7f (commit)
from c0469ca905ef699fef36b02c058a21fed821d564 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=81f6cd2074f76f3e976...
commit 81f6cd2074f76f3e976537453be18b6f34f1ab7f
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Correct the screen depth check for setting friend bitmaps.
Add some comments because using friend bitmaps in NetSurf causes problems under OS4.
diff --git a/amiga/plotters.c b/amiga/plotters.c
index 256f477..899ec49 100644
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -121,6 +121,7 @@ void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG
height)
gg->tmprasbuf = AllocVecTagList(width * height, NULL);
#ifndef __amigaos4__
+ /* If you're wondering why this is #ifdeffed, see the note about OS4 friend bitmaps
below */
friend = scrn->RastPort.BitMap;
#endif
@@ -128,7 +129,10 @@ void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG
height)
gg->bm = AllocBitMap(width, height, depth, 0, friend);
} else {
#ifdef __amigaos4__
- if(depth == 32) friend = scrn->RastPort.BitMap;
+ /* 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. */
+ if(depth >= 24) friend = scrn->RastPort.BitMap;
#endif
gg->bm = ami_rtg_allocbitmap(width, height, 32, 0, friend, RGBFB_A8R8G8B8);
}
-----------------------------------------------------------------------
Summary of changes:
amiga/plotters.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/amiga/plotters.c b/amiga/plotters.c
index 256f477..899ec49 100644
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -121,6 +121,7 @@ void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG
height)
gg->tmprasbuf = AllocVecTagList(width * height, NULL);
#ifndef __amigaos4__
+ /* If you're wondering why this is #ifdeffed, see the note about OS4 friend bitmaps
below */
friend = scrn->RastPort.BitMap;
#endif
@@ -128,7 +129,10 @@ void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG
height)
gg->bm = AllocBitMap(width, height, depth, 0, friend);
} else {
#ifdef __amigaos4__
- if(depth == 32) friend = scrn->RastPort.BitMap;
+ /* 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. */
+ if(depth >= 24) friend = scrn->RastPort.BitMap;
#endif
gg->bm = ami_rtg_allocbitmap(width, height, 32, 0, friend, RGBFB_A8R8G8B8);
}
--
NetSurf Browser