Gitweb links:

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

The branch, master has been updated
       via  f814edee75db5158f8fbb1930e25e0877d5448de (commit)
      from  90541333c052b1c89a3f97c1adecf62aeb178668 (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=f814edee75db5158f8fbb1930e25e0877d5448de
commit f814edee75db5158f8fbb1930e25e0877d5448de
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>

    Disable triangle mode for bitmap scaling
    Potential workaround for #2478

diff --git a/frontends/amiga/bitmap.c b/frontends/amiga/bitmap.c
index 3dbe3dd..8c691ed 100644
--- a/frontends/amiga/bitmap.c
+++ b/frontends/amiga/bitmap.c
@@ -57,6 +57,11 @@
 #include "amiga/misc.h"
 #include "amiga/rtg.h"
 
+// disable use of "triangle mode" for scaling
+#ifdef AMI_NS_TRIANGLE_SCALING
+#undef AMI_NS_TRIANGLE_SCALING
+#endif
+
 struct bitmap {
        int width;
        int height;
@@ -510,13 +515,17 @@ static inline struct BitMap 
*ami_bitmap_get_generic(struct bitmap *bitmap,
                        (type == AMI_NSBM_TRUECOLOUR)), 1)) {
                        /* AutoDoc says v52, but this function isn't in OS4.0, 
so checking for v53 (OS4.1)
                         * Additionally, when we use friend BitMaps in non 
32-bit modes it freezes the OS */
+
+                       uint32 flags = 0;
+                       uint32 err = COMPERR_Success;
+#ifdef AMI_NS_TRIANGLE_SCALING
                        struct vertex vtx[6];
                        VTX_RECT(0, 0, bitmap->width, bitmap->height, 0, 0, 
width, height);
 
-                       uint32 flags = COMPFLAG_HardwareOnly;
+                       flags = COMPFLAG_HardwareOnly;
                        if(nsoption_bool(scale_quality) == true) flags |= 
COMPFLAG_SrcFilter;
                        
-                       uint32 err = CompositeTags(COMPOSITE_Src, tbm, scaledbm,
+                       err = CompositeTags(COMPOSITE_Src, tbm, scaledbm,
                                                COMPTAG_VertexArray, vtx,
                                                COMPTAG_VertexFormat, 
COMPVF_STW0_Present,
                                                COMPTAG_NumTriangles, 2,
@@ -527,6 +536,9 @@ static inline struct BitMap *ami_bitmap_get_generic(struct 
bitmap *bitmap,
                        if (err != COMPERR_Success) {
                                LOG("Composite error %ld - falling back", err);
                                /* If it failed, do it again the way which 
works in software */
+#else
+                       {
+#endif
                                flags = 0;
                                if(nsoption_bool(scale_quality) == true) flags 
|= COMPFLAG_SrcFilter;
 


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

Summary of changes:
 frontends/amiga/bitmap.c |   16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/frontends/amiga/bitmap.c b/frontends/amiga/bitmap.c
index 3dbe3dd..8c691ed 100644
--- a/frontends/amiga/bitmap.c
+++ b/frontends/amiga/bitmap.c
@@ -57,6 +57,11 @@
 #include "amiga/misc.h"
 #include "amiga/rtg.h"
 
+// disable use of "triangle mode" for scaling
+#ifdef AMI_NS_TRIANGLE_SCALING
+#undef AMI_NS_TRIANGLE_SCALING
+#endif
+
 struct bitmap {
        int width;
        int height;
@@ -510,13 +515,17 @@ static inline struct BitMap 
*ami_bitmap_get_generic(struct bitmap *bitmap,
                        (type == AMI_NSBM_TRUECOLOUR)), 1)) {
                        /* AutoDoc says v52, but this function isn't in OS4.0, 
so checking for v53 (OS4.1)
                         * Additionally, when we use friend BitMaps in non 
32-bit modes it freezes the OS */
+
+                       uint32 flags = 0;
+                       uint32 err = COMPERR_Success;
+#ifdef AMI_NS_TRIANGLE_SCALING
                        struct vertex vtx[6];
                        VTX_RECT(0, 0, bitmap->width, bitmap->height, 0, 0, 
width, height);
 
-                       uint32 flags = COMPFLAG_HardwareOnly;
+                       flags = COMPFLAG_HardwareOnly;
                        if(nsoption_bool(scale_quality) == true) flags |= 
COMPFLAG_SrcFilter;
                        
-                       uint32 err = CompositeTags(COMPOSITE_Src, tbm, scaledbm,
+                       err = CompositeTags(COMPOSITE_Src, tbm, scaledbm,
                                                COMPTAG_VertexArray, vtx,
                                                COMPTAG_VertexFormat, 
COMPVF_STW0_Present,
                                                COMPTAG_NumTriangles, 2,
@@ -527,6 +536,9 @@ static inline struct BitMap *ami_bitmap_get_generic(struct 
bitmap *bitmap,
                        if (err != COMPERR_Success) {
                                LOG("Composite error %ld - falling back", err);
                                /* If it failed, do it again the way which 
works in software */
+#else
+                       {
+#endif
                                flags = 0;
                                if(nsoption_bool(scale_quality) == true) flags 
|= COMPFLAG_SrcFilter;
 


-- 
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