Gitweb links:

...log 
http://git.netsurf-browser.org/netsurf.git/shortlog/c7766fddff000614de3e1467e39cdfb0301a022d
...commit 
http://git.netsurf-browser.org/netsurf.git/commit/c7766fddff000614de3e1467e39cdfb0301a022d
...tree 
http://git.netsurf-browser.org/netsurf.git/tree/c7766fddff000614de3e1467e39cdfb0301a022d

The branch, master has been updated
       via  c7766fddff000614de3e1467e39cdfb0301a022d (commit)
       via  8b31fc0e7880fed1da176c996fdf5acd5b63d8fb (commit)
      from  59784ba8528182089c77e710f5ff31b3c78d6dc1 (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/commitdiff/c7766fddff000614de3e1467e39cdfb0301a022d
commit c7766fddff000614de3e1467e39cdfb0301a022d
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>

    Change default mask threshold to something more sensible

diff --git a/amiga/options.h b/amiga/options.h
index ed5bc93..de2e75f 100644
--- a/amiga/options.h
+++ b/amiga/options.h
@@ -112,7 +112,7 @@
        .faster_scroll = true,                          \
        .scale_quality = false,                         \
        .dither_quality = 1,                            \
-       .mask_alpha = 0,                                        \
+       .mask_alpha = 50,                                       \
        .ask_overwrite = true,                          \
        .printer_unit = 0,                              \
        .print_scale = 100,                             \


commitdiff 
http://git.netsurf-browser.org/netsurf.git/commitdiff/8b31fc0e7880fed1da176c996fdf5acd5b63d8fb
commit 8b31fc0e7880fed1da176c996fdf5acd5b63d8fb
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>

    Fix mask calculation (thanks to Fredrik Wikstrom)

diff --git a/amiga/bitmap.c b/amiga/bitmap.c
index 97e00f3..ee15065 100644
--- a/amiga/bitmap.c
+++ b/amiga/bitmap.c
@@ -478,24 +478,24 @@ PLANEPTR ami_bitmap_get_mask(struct bitmap *bitmap, int 
width,
        uint32 *bmi = (uint32 *) bitmap->pixdata;
        UBYTE maskbit = 0;
        ULONG bm_width;
-       int y, x, w;
+       int y, x, bpr;
 
        if((height != bitmap->height) || (width != bitmap->width)) return NULL;
        if(bitmap_get_opaque(bitmap) == true) return NULL;
        if(bitmap->native_mask) return bitmap->native_mask;
 
        bm_width = GetBitMapAttr(n_bm, BMA_WIDTH);
+       bpr = RASSIZE(bm_width, 1);
        bitmap->native_mask = AllocRaster(bm_width, height);
-
-       int bpr = RASSIZE(bm_width, 1);
+       SetMem(bitmap->native_mask, 0, bpr * height);
 
        for(y=0; y<height; y++) {
                for(x=0; x<width; x++) {
                        if ((*bmi & 0x000000ffU) <= 
(ULONG)nsoption_int(mask_alpha)) maskbit = 0;
                                else maskbit = 1;
                        bmi++;
-                       bitmap->native_mask[(y*bpr) + (x/8)] =
-                               (bitmap->native_mask[(y*bpr) + (x/8)] << 1) | 
maskbit;
+                       bitmap->native_mask[(y*bpr) + (x/8)] |=
+                               maskbit << (7 - (x % 8));
                }
        }
 


-----------------------------------------------------------------------

Summary of changes:
 amiga/bitmap.c  |   10 +++++-----
 amiga/options.h |    2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/amiga/bitmap.c b/amiga/bitmap.c
index 97e00f3..ee15065 100644
--- a/amiga/bitmap.c
+++ b/amiga/bitmap.c
@@ -478,24 +478,24 @@ PLANEPTR ami_bitmap_get_mask(struct bitmap *bitmap, int 
width,
        uint32 *bmi = (uint32 *) bitmap->pixdata;
        UBYTE maskbit = 0;
        ULONG bm_width;
-       int y, x, w;
+       int y, x, bpr;
 
        if((height != bitmap->height) || (width != bitmap->width)) return NULL;
        if(bitmap_get_opaque(bitmap) == true) return NULL;
        if(bitmap->native_mask) return bitmap->native_mask;
 
        bm_width = GetBitMapAttr(n_bm, BMA_WIDTH);
+       bpr = RASSIZE(bm_width, 1);
        bitmap->native_mask = AllocRaster(bm_width, height);
-
-       int bpr = RASSIZE(bm_width, 1);
+       SetMem(bitmap->native_mask, 0, bpr * height);
 
        for(y=0; y<height; y++) {
                for(x=0; x<width; x++) {
                        if ((*bmi & 0x000000ffU) <= 
(ULONG)nsoption_int(mask_alpha)) maskbit = 0;
                                else maskbit = 1;
                        bmi++;
-                       bitmap->native_mask[(y*bpr) + (x/8)] =
-                               (bitmap->native_mask[(y*bpr) + (x/8)] << 1) | 
maskbit;
+                       bitmap->native_mask[(y*bpr) + (x/8)] |=
+                               maskbit << (7 - (x % 8));
                }
        }
 
diff --git a/amiga/options.h b/amiga/options.h
index ed5bc93..de2e75f 100644
--- a/amiga/options.h
+++ b/amiga/options.h
@@ -112,7 +112,7 @@
        .faster_scroll = true,                          \
        .scale_quality = false,                         \
        .dither_quality = 1,                            \
-       .mask_alpha = 0,                                        \
+       .mask_alpha = 50,                                       \
        .ask_overwrite = true,                          \
        .printer_unit = 0,                              \
        .print_scale = 100,                             \


-- 
NetSurf Browser

_______________________________________________
netsurf-commits mailing list
[email protected]
http://vlists.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to