Gitweb links:

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

The branch, master has been updated
       via  ddcc914a3ffe02edaeafa93eecf54a77daf8a4cd (commit)
       via  dc633bc154b913f8f5b6ce33ee34eb1dcfee75d4 (commit)
       via  796974521786d65f1117cf22c23bb1592a27b6f0 (commit)
       via  59b29930d7c89c53f85d4536bb3657b1c0bd2736 (commit)
      from  eb9571ede701defafd2b9685138826a719124b5b (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=ddcc914a3ffe02edaeafa93eecf54a77daf8a4cd
commit ddcc914a3ffe02edaeafa93eecf54a77daf8a4cd
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>

    Use GuiGFX to scale 8-bit images rather than doing two separate operations

diff --git a/frontends/amiga/bitmap.c b/frontends/amiga/bitmap.c
index 5b8117a..53e33d6 100644
--- a/frontends/amiga/bitmap.c
+++ b/frontends/amiga/bitmap.c
@@ -309,7 +309,7 @@ static void ami_bitmap_rgba_to_argb(struct bitmap *bm)
        
        ULONG *data = (ULONG *)amiga_bitmap_get_buffer(bm);
        for(int i = 0; i < (bm->width * bm->height); i++) {
-               data[i] = (data[i] >> 8) | (data[i] << 24);
+               data[i] = (data[ i] >> 8) | (data[i] << 24);
        }
 }
 
@@ -426,7 +426,7 @@ static inline struct BitMap *ami_bitmap_get_generic(struct 
bitmap *bitmap,
                                                                                
tbm, bitmap->width, bitmap->height,
                                                                                
bitmap->width * 4, AMI_BITMAP_FORMAT);
                } else {
-                       tbm = ami_rtg_allocbitmap(bitmap->width, bitmap->height,
+                       tbm = ami_rtg_allocbitmap(width, height,
                                                                                
8, 0, friendbm, AMI_BITMAP_FORMAT);
                        if(tbm == NULL) return NULL;
 
@@ -450,7 +450,7 @@ static inline struct BitMap *ami_bitmap_get_generic(struct 
bitmap *bitmap,
 
                                APTR ddh = 
CreateDirectDrawHandle(bitmap->drawhandle,
                                                                                
bitmap->width, bitmap->height,
-                                                                               
bitmap->width, bitmap->height, NULL);
+                                                                               
width, height, NULL);
 
                                DirectDrawTrueColor(ddh, (ULONG 
*)amiga_bitmap_get_buffer(bitmap), 0, 0, TAG_DONE);
                                DeleteDirectDrawHandle(ddh);
@@ -466,14 +466,19 @@ static inline struct BitMap 
*ami_bitmap_get_generic(struct bitmap *bitmap,
                if(nsoption_int(cache_bitmaps) == 2)
                {
                        bitmap->nativebm = tbm;
-                       bitmap->nativebmwidth = bitmap->width;
-                       bitmap->nativebmheight = bitmap->height;
+                       if(type == AMI_NSBM_TRUECOLOUR) {
+                               bitmap->nativebmwidth = bitmap->width;
+                               bitmap->nativebmheight = bitmap->height;
+                       } else {
+                               bitmap->nativebmwidth = width;
+                               bitmap->nativebmheight = height;
+                       }
                        bitmap->native = type;
                }
        }
 
-       if((bitmap->width != width) || (bitmap->height != height))
-       {
+       if(((bitmap->width != width) || (bitmap->height != height)) &&
+               (type == AMI_NSBM_TRUECOLOUR)) {
                struct BitMap *restrict scaledbm;
                struct BitScaleArgs bsa;
                int depth = 32;


commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=dc633bc154b913f8f5b6ce33ee34eb1dcfee75d4
commit dc633bc154b913f8f5b6ce33ee34eb1dcfee75d4
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>

    Force friend BitMap usage at depths>8bpp
    Fix logic so this forced usage actually applies

diff --git a/frontends/amiga/plotters.c b/frontends/amiga/plotters.c
index 2ad7f2b..9076eea 100644
--- a/frontends/amiga/plotters.c
+++ b/frontends/amiga/plotters.c
@@ -106,18 +106,31 @@ void ami_init_layers(struct gui_globals *gg, ULONG width, 
ULONG height, bool for
        if(force32bit == false) depth = GetBitMapAttr(scrn->RastPort.BitMap, 
BMA_DEPTH);
        LOG("Screen depth = %d", depth);
 
+#ifdef __amigaos4__
        if(depth < 16) {
                gg->palette_mapped = true;
        } else {
                gg->palette_mapped = false;
        }
-
-#ifndef __amigaos4__
+#else
+       /* 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.
+        */
+       if(nsoption_bool(friend_bitmap) == true) {
+               friend = scrn->RastPort.BitMap;
+       } else {
+               /* Force friend BitMaps on for obvious RTG screens under OS3.
+                * If we get a bit smarter about this we can lose the user 
option. */
+               if((depth > 8) && (force32bit == false)) friend = 
scrn->RastPort.BitMap;
+       }
 #warning OS3 locked to palette-mapped modes
        gg->palette_mapped = true;
        if(depth > 8) depth = 8;
 #endif
 
+
        /* Probably need to fix this next line */
        if(gg->palette_mapped == true) nsoption_set_bool(font_antialiasing, 
false);
 
@@ -136,21 +149,6 @@ void ami_init_layers(struct gui_globals *gg, ULONG width, 
ULONG height, bool for
        gg->tmprasbuf = AllocVec(width * height, MEMF_CHIP);
 #endif
 
-       /* 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.
-        */
-#ifndef __amigaos4__
-       if(nsoption_bool(friend_bitmap) == true) {
-               friend = scrn->RastPort.BitMap;
-       } else {
-               /* Force friend BitMaps on for obvious RTG screens under OS3.
-                * If we get a bit smarter about this we can lose the user 
option. */
-               if((depth >= 16) && (force32bit == false)) friend = 
scrn->RastPort.BitMap;
-       }
-#endif
-
        if(gg->palette_mapped == true) {
                gg->bm = AllocBitMap(width, height, depth, 0, friend);
        } else {


commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=796974521786d65f1117cf22c23bb1592a27b6f0
commit 796974521786d65f1117cf22c23bb1592a27b6f0
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>

    restrict some more vars

diff --git a/frontends/amiga/font_bullet.c b/frontends/amiga/font_bullet.c
index 7220cb0..5542ed9 100644
--- a/frontends/amiga/font_bullet.c
+++ b/frontends/amiga/font_bullet.c
@@ -727,11 +727,11 @@ static const uint16 *ami_font_translate_smallcaps(uint16 
*utf16char)
 static ULONG amiga_nsfont_text(struct RastPort *rp, const char *string, ULONG 
length,
                        const plot_font_style_t *fstyle, ULONG dx, ULONG dy, 
bool aa)
 {
-       uint16 *utf16 = NULL, *outf16 = NULL;
-       uint16 *utf16charsc = 0, *utf16nextsc = 0;
-       uint16 *utf16next = 0;
+       uint16 *restrict utf16 = NULL, *restrict outf16 = NULL;
+       uint16 *restrict utf16charsc = 0, *restrict utf16nextsc = 0;
+       uint16 *restrict utf16next = 0;
        int utf16charlen;
-       struct OutlineFont *ofont, *ufont = NULL;
+       struct OutlineFont *restrict ofont, *restrict ufont = NULL;
        uint32 x=0;
        int32 tempx = 0;
        ULONG emwidth = (ULONG)NSA_FONT_EMWIDTH(fstyle->size);
@@ -792,11 +792,11 @@ static ULONG amiga_nsfont_text(struct RastPort *rp, const 
char *string, ULONG le
 static inline ULONG ami_font_unicode_width(const char *string, ULONG length,
                        const plot_font_style_t *fstyle, ULONG dx, ULONG dy, 
bool aa)
 {
-       uint16 *utf16 = NULL, *outf16 = NULL;
-       uint16 *utf16charsc = 0, *utf16nextsc = 0;
-       uint16 *utf16next = 0;
+       uint16 *restrict utf16 = NULL, *restrict outf16 = NULL;
+       uint16 *restrict utf16charsc = 0, *restrict utf16nextsc = 0;
+       uint16 *restrict utf16next = 0;
        int utf16charlen;
-       struct OutlineFont *ofont, *ufont = NULL;
+       struct OutlineFont *restrict ofont, *restrict ufont = NULL;
        uint32 x=0;
        int32 tempx = 0;
        ULONG emwidth = (ULONG)NSA_FONT_EMWIDTH(fstyle->size);


commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=59b29930d7c89c53f85d4536bb3657b1c0bd2736
commit 59b29930d7c89c53f85d4536bb3657b1c0bd2736
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>

    Fix the signalling to the old session of NetSurf from the newly-launched 
one.
    No idea how this ever worked previously, as it was sending commands to the 
ARexx server instead of NetSurf.

diff --git a/frontends/amiga/arexx.c b/frontends/amiga/arexx.c
index 14c0ad7..1f2d95b 100644
--- a/frontends/amiga/arexx.c
+++ b/frontends/amiga/arexx.c
@@ -133,6 +133,7 @@ bool ami_arexx_init(ULONG *rxsig)
                        AREXX_ReplyHook,NULL,
                        AREXX_DefExtension,"nsrx",
                        End;
+
                return false;
        }
 }
@@ -142,10 +143,15 @@ void ami_arexx_handle(void)
        RA_HandleRexx(arexx_obj);
 }
 
-void ami_arexx_command(const char *cmd)
+static void ami_arexx_command(const char *cmd, const char *port)
 {
        if(arexx_obj == NULL) return;
-       IDoMethod(arexx_obj, AM_EXECUTE, cmd, NULL, NULL, NULL, NULL, NULL);
+       IDoMethod(arexx_obj, AM_EXECUTE, cmd, port, NULL, NULL, NULL, NULL);
+}
+
+void ami_arexx_self(const char *cmd)
+{
+       ami_arexx_command(cmd, "NETSURF");
 }
 
 void ami_arexx_execute(char *script)
@@ -156,7 +162,7 @@ void ami_arexx_execute(char *script)
        if((lock = Lock(script, ACCESS_READ))) {
                DevNameFromLock(lock, full_script_path, 1024, DN_FULLPATH);
                LOG("Executing script: %s", full_script_path);
-               ami_arexx_command(full_script_path);
+               ami_arexx_command(full_script_path, NULL);
                UnLock(lock);
        }
 }
diff --git a/frontends/amiga/arexx.h b/frontends/amiga/arexx.h
index e6c9c7e..b97967a 100755
--- a/frontends/amiga/arexx.h
+++ b/frontends/amiga/arexx.h
@@ -25,6 +25,6 @@
 bool ami_arexx_init(ULONG *rxsig);
 void ami_arexx_handle(void);
 void ami_arexx_execute(char *);
-void ami_arexx_command(const char *cmd);
+void ami_arexx_self(const char *cmd);
 void ami_arexx_cleanup(void);
 #endif
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index 9bf1689..a05761a 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -1076,7 +1076,8 @@ static void gui_init2(int argc, char** argv)
                } else {
                        sendcmd = ASPrintf("OPEN \"%s\" 
NEW",nsoption_charp(homepage_url));
                }
-               ami_arexx_command(sendcmd);
+               ami_arexx_self(sendcmd);
+
                FreeVec(sendcmd);
 
                ami_quit=true;


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

Summary of changes:
 frontends/amiga/arexx.c       |   12 +++++++++---
 frontends/amiga/arexx.h       |    2 +-
 frontends/amiga/bitmap.c      |   19 ++++++++++++-------
 frontends/amiga/font_bullet.c |   16 ++++++++--------
 frontends/amiga/gui.c         |    3 ++-
 frontends/amiga/plotters.c    |   32 +++++++++++++++-----------------
 6 files changed, 47 insertions(+), 37 deletions(-)

diff --git a/frontends/amiga/arexx.c b/frontends/amiga/arexx.c
index 14c0ad7..1f2d95b 100644
--- a/frontends/amiga/arexx.c
+++ b/frontends/amiga/arexx.c
@@ -133,6 +133,7 @@ bool ami_arexx_init(ULONG *rxsig)
                        AREXX_ReplyHook,NULL,
                        AREXX_DefExtension,"nsrx",
                        End;
+
                return false;
        }
 }
@@ -142,10 +143,15 @@ void ami_arexx_handle(void)
        RA_HandleRexx(arexx_obj);
 }
 
-void ami_arexx_command(const char *cmd)
+static void ami_arexx_command(const char *cmd, const char *port)
 {
        if(arexx_obj == NULL) return;
-       IDoMethod(arexx_obj, AM_EXECUTE, cmd, NULL, NULL, NULL, NULL, NULL);
+       IDoMethod(arexx_obj, AM_EXECUTE, cmd, port, NULL, NULL, NULL, NULL);
+}
+
+void ami_arexx_self(const char *cmd)
+{
+       ami_arexx_command(cmd, "NETSURF");
 }
 
 void ami_arexx_execute(char *script)
@@ -156,7 +162,7 @@ void ami_arexx_execute(char *script)
        if((lock = Lock(script, ACCESS_READ))) {
                DevNameFromLock(lock, full_script_path, 1024, DN_FULLPATH);
                LOG("Executing script: %s", full_script_path);
-               ami_arexx_command(full_script_path);
+               ami_arexx_command(full_script_path, NULL);
                UnLock(lock);
        }
 }
diff --git a/frontends/amiga/arexx.h b/frontends/amiga/arexx.h
index e6c9c7e..b97967a 100755
--- a/frontends/amiga/arexx.h
+++ b/frontends/amiga/arexx.h
@@ -25,6 +25,6 @@
 bool ami_arexx_init(ULONG *rxsig);
 void ami_arexx_handle(void);
 void ami_arexx_execute(char *);
-void ami_arexx_command(const char *cmd);
+void ami_arexx_self(const char *cmd);
 void ami_arexx_cleanup(void);
 #endif
diff --git a/frontends/amiga/bitmap.c b/frontends/amiga/bitmap.c
index 5b8117a..53e33d6 100644
--- a/frontends/amiga/bitmap.c
+++ b/frontends/amiga/bitmap.c
@@ -309,7 +309,7 @@ static void ami_bitmap_rgba_to_argb(struct bitmap *bm)
        
        ULONG *data = (ULONG *)amiga_bitmap_get_buffer(bm);
        for(int i = 0; i < (bm->width * bm->height); i++) {
-               data[i] = (data[i] >> 8) | (data[i] << 24);
+               data[i] = (data[ i] >> 8) | (data[i] << 24);
        }
 }
 
@@ -426,7 +426,7 @@ static inline struct BitMap *ami_bitmap_get_generic(struct 
bitmap *bitmap,
                                                                                
tbm, bitmap->width, bitmap->height,
                                                                                
bitmap->width * 4, AMI_BITMAP_FORMAT);
                } else {
-                       tbm = ami_rtg_allocbitmap(bitmap->width, bitmap->height,
+                       tbm = ami_rtg_allocbitmap(width, height,
                                                                                
8, 0, friendbm, AMI_BITMAP_FORMAT);
                        if(tbm == NULL) return NULL;
 
@@ -450,7 +450,7 @@ static inline struct BitMap *ami_bitmap_get_generic(struct 
bitmap *bitmap,
 
                                APTR ddh = 
CreateDirectDrawHandle(bitmap->drawhandle,
                                                                                
bitmap->width, bitmap->height,
-                                                                               
bitmap->width, bitmap->height, NULL);
+                                                                               
width, height, NULL);
 
                                DirectDrawTrueColor(ddh, (ULONG 
*)amiga_bitmap_get_buffer(bitmap), 0, 0, TAG_DONE);
                                DeleteDirectDrawHandle(ddh);
@@ -466,14 +466,19 @@ static inline struct BitMap 
*ami_bitmap_get_generic(struct bitmap *bitmap,
                if(nsoption_int(cache_bitmaps) == 2)
                {
                        bitmap->nativebm = tbm;
-                       bitmap->nativebmwidth = bitmap->width;
-                       bitmap->nativebmheight = bitmap->height;
+                       if(type == AMI_NSBM_TRUECOLOUR) {
+                               bitmap->nativebmwidth = bitmap->width;
+                               bitmap->nativebmheight = bitmap->height;
+                       } else {
+                               bitmap->nativebmwidth = width;
+                               bitmap->nativebmheight = height;
+                       }
                        bitmap->native = type;
                }
        }
 
-       if((bitmap->width != width) || (bitmap->height != height))
-       {
+       if(((bitmap->width != width) || (bitmap->height != height)) &&
+               (type == AMI_NSBM_TRUECOLOUR)) {
                struct BitMap *restrict scaledbm;
                struct BitScaleArgs bsa;
                int depth = 32;
diff --git a/frontends/amiga/font_bullet.c b/frontends/amiga/font_bullet.c
index 7220cb0..5542ed9 100644
--- a/frontends/amiga/font_bullet.c
+++ b/frontends/amiga/font_bullet.c
@@ -727,11 +727,11 @@ static const uint16 *ami_font_translate_smallcaps(uint16 
*utf16char)
 static ULONG amiga_nsfont_text(struct RastPort *rp, const char *string, ULONG 
length,
                        const plot_font_style_t *fstyle, ULONG dx, ULONG dy, 
bool aa)
 {
-       uint16 *utf16 = NULL, *outf16 = NULL;
-       uint16 *utf16charsc = 0, *utf16nextsc = 0;
-       uint16 *utf16next = 0;
+       uint16 *restrict utf16 = NULL, *restrict outf16 = NULL;
+       uint16 *restrict utf16charsc = 0, *restrict utf16nextsc = 0;
+       uint16 *restrict utf16next = 0;
        int utf16charlen;
-       struct OutlineFont *ofont, *ufont = NULL;
+       struct OutlineFont *restrict ofont, *restrict ufont = NULL;
        uint32 x=0;
        int32 tempx = 0;
        ULONG emwidth = (ULONG)NSA_FONT_EMWIDTH(fstyle->size);
@@ -792,11 +792,11 @@ static ULONG amiga_nsfont_text(struct RastPort *rp, const 
char *string, ULONG le
 static inline ULONG ami_font_unicode_width(const char *string, ULONG length,
                        const plot_font_style_t *fstyle, ULONG dx, ULONG dy, 
bool aa)
 {
-       uint16 *utf16 = NULL, *outf16 = NULL;
-       uint16 *utf16charsc = 0, *utf16nextsc = 0;
-       uint16 *utf16next = 0;
+       uint16 *restrict utf16 = NULL, *restrict outf16 = NULL;
+       uint16 *restrict utf16charsc = 0, *restrict utf16nextsc = 0;
+       uint16 *restrict utf16next = 0;
        int utf16charlen;
-       struct OutlineFont *ofont, *ufont = NULL;
+       struct OutlineFont *restrict ofont, *restrict ufont = NULL;
        uint32 x=0;
        int32 tempx = 0;
        ULONG emwidth = (ULONG)NSA_FONT_EMWIDTH(fstyle->size);
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index 9bf1689..a05761a 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -1076,7 +1076,8 @@ static void gui_init2(int argc, char** argv)
                } else {
                        sendcmd = ASPrintf("OPEN \"%s\" 
NEW",nsoption_charp(homepage_url));
                }
-               ami_arexx_command(sendcmd);
+               ami_arexx_self(sendcmd);
+
                FreeVec(sendcmd);
 
                ami_quit=true;
diff --git a/frontends/amiga/plotters.c b/frontends/amiga/plotters.c
index 2ad7f2b..9076eea 100644
--- a/frontends/amiga/plotters.c
+++ b/frontends/amiga/plotters.c
@@ -106,18 +106,31 @@ void ami_init_layers(struct gui_globals *gg, ULONG width, 
ULONG height, bool for
        if(force32bit == false) depth = GetBitMapAttr(scrn->RastPort.BitMap, 
BMA_DEPTH);
        LOG("Screen depth = %d", depth);
 
+#ifdef __amigaos4__
        if(depth < 16) {
                gg->palette_mapped = true;
        } else {
                gg->palette_mapped = false;
        }
-
-#ifndef __amigaos4__
+#else
+       /* 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.
+        */
+       if(nsoption_bool(friend_bitmap) == true) {
+               friend = scrn->RastPort.BitMap;
+       } else {
+               /* Force friend BitMaps on for obvious RTG screens under OS3.
+                * If we get a bit smarter about this we can lose the user 
option. */
+               if((depth > 8) && (force32bit == false)) friend = 
scrn->RastPort.BitMap;
+       }
 #warning OS3 locked to palette-mapped modes
        gg->palette_mapped = true;
        if(depth > 8) depth = 8;
 #endif
 
+
        /* Probably need to fix this next line */
        if(gg->palette_mapped == true) nsoption_set_bool(font_antialiasing, 
false);
 
@@ -136,21 +149,6 @@ void ami_init_layers(struct gui_globals *gg, ULONG width, 
ULONG height, bool for
        gg->tmprasbuf = AllocVec(width * height, MEMF_CHIP);
 #endif
 
-       /* 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.
-        */
-#ifndef __amigaos4__
-       if(nsoption_bool(friend_bitmap) == true) {
-               friend = scrn->RastPort.BitMap;
-       } else {
-               /* Force friend BitMaps on for obvious RTG screens under OS3.
-                * If we get a bit smarter about this we can lose the user 
option. */
-               if((depth >= 16) && (force32bit == false)) friend = 
scrn->RastPort.BitMap;
-       }
-#endif
-
        if(gg->palette_mapped == true) {
                gg->bm = AllocBitMap(width, height, depth, 0, friend);
        } else {


-- 
NetSurf Browser

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

Reply via email to