summaryrefslogtreecommitdiff
path: root/amiga
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2009-05-07 18:40:33 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2009-05-07 18:40:33 +0000
commite7cbf49fb91b6508e2c65c5fbe24d775e5fe7be2 (patch)
tree51092d631d39dcb6316c009d568e8436adbae765 /amiga
parentc2ecbebd3dff9531e0b46a5d5983f776920935bb (diff)
downloadnetsurf-e7cbf49fb91b6508e2c65c5fbe24d775e5fe7be2.tar.gz
netsurf-e7cbf49fb91b6508e2c65c5fbe24d775e5fe7be2.tar.bz2
Some optimisations, makes page rendering much quicker at least on OS4.1.
svn path=/trunk/netsurf/; revision=7431
Diffstat (limited to 'amiga')
-rwxr-xr-xamiga/gui.c9
-rwxr-xr-xamiga/plotters.c49
2 files changed, 53 insertions, 5 deletions
diff --git a/amiga/gui.c b/amiga/gui.c
index 4d5e98208..39ea08dc8 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -540,8 +540,11 @@ void gui_init2(int argc, char** argv)
SetDrMd(&glob.rp,BGBACKFILL);
glob.layerinfo = NewLayerInfo();
+
glob.rp.Layer = CreateUpfrontLayer(glob.layerinfo,glob.bm,0,0,
- scrn->Width-1,scrn->Width-1,0,NULL);
+ scrn->Width-1,scrn->Width-1,LAYERSIMPLE,NULL);
+
+ InstallLayerHook(glob.rp.Layer,LAYERS_NOBACKFILL);
glob.areabuf = AllocVec(100,MEMF_PRIVATE | MEMF_CLEAR);
glob.rp.AreaInfo = AllocVec(sizeof(struct AreaInfo),MEMF_PRIVATE | MEMF_CLEAR);
@@ -1672,6 +1675,7 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
WA_SizeGadget, TRUE,
WA_CustomScreen,scrn,
WA_ReportMouse,TRUE,
+ WA_SimpleRefresh,TRUE,
WA_IDCMP,IDCMP_MENUPICK | IDCMP_MOUSEMOVE | IDCMP_MOUSEBUTTONS |
IDCMP_NEWSIZE | IDCMP_RAWKEY | IDCMP_GADGETUP |
IDCMP_IDCMPUPDATE | IDCMP_INTUITICKS | IDCMP_EXTENDEDMOUSE,
@@ -1752,6 +1756,7 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
WA_Height,curh,
WA_CustomScreen,scrn,
WA_ReportMouse,TRUE,
+ WA_SimpleRefresh,TRUE,
WA_IDCMP,IDCMP_MENUPICK | IDCMP_MOUSEMOVE |
IDCMP_MOUSEBUTTONS | IDCMP_NEWSIZE |
IDCMP_RAWKEY |
@@ -2242,7 +2247,7 @@ void ami_do_redraw(struct gui_window_2 *g,bool scroll)
if (c->locked) return;
current_redraw_browser = g->bw;
- currp = &glob.rp;
+// currp = &glob.rp;
width=bbox->Width;
height=bbox->Height;
diff --git a/amiga/plotters.c b/amiga/plotters.c
index 1a746d202..ce1184703 100755
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -29,6 +29,7 @@
#include <proto/layers.h>
#include "amiga/options.h"
#include <graphics/blitattr.h>
+#include <graphics/composite.h>
#include "utils/log.h"
#include <math.h>
#include <assert.h>
@@ -250,6 +251,7 @@ bool ami_clip(int x0, int y0, int x1, int y1)
if(currp->Layer)
{
+
reg = InstallClipRegion(currp->Layer,NULL);
if(!reg)
@@ -364,7 +366,26 @@ bool ami_bitmap(int x, int y, int width, int height,
if(!tbm) return true;
- BltBitMapTags(BLITA_Width,width,
+ if(GfxBase->lib_Version >= 53) // AutoDoc says v52, but this function isn't in OS4.0, so checking for v53 (OS4.1)
+ {
+ uint32 comptype = COMPOSITE_Src;
+ if(!bitmap->opaque) comptype = COMPOSITE_Src_Over_Dest;
+
+ CompositeTags(comptype,tbm,currp->BitMap,
+ COMPTAG_Flags,COMPFLAG_IgnoreDestAlpha,
+ COMPTAG_DestX,glob.rect.MinX,
+ COMPTAG_DestY,glob.rect.MinY,
+ COMPTAG_DestWidth,glob.rect.MaxX - glob.rect.MinX,
+ COMPTAG_DestHeight,glob.rect.MaxY - glob.rect.MinY,
+ COMPTAG_SrcWidth,width,
+ COMPTAG_SrcHeight,height,
+ COMPTAG_OffsetX,x,
+ COMPTAG_OffsetY,y,
+ TAG_DONE);
+ }
+ else
+ {
+ BltBitMapTags(BLITA_Width,width,
BLITA_Height,height,
BLITA_Source,tbm,
BLITA_Dest,currp,
@@ -372,8 +393,10 @@ bool ami_bitmap(int x, int y, int width, int height,
BLITA_DestY,y,
BLITA_SrcType,BLITT_BITMAP,
BLITA_DestType,BLITT_RASTPORT,
+// BLITA_Mask,0xFF,
BLITA_UseSrcAlpha,!bitmap->opaque,
TAG_DONE);
+ }
if(tbm != bitmap->nativebm)
{
@@ -413,7 +436,26 @@ bool ami_bitmap_tile(int x, int y, int width, int height,
assert(tbm);
- BltBitMapTags(BLITA_Width,width,
+ if(GfxBase->lib_Version >= 53) // AutoDoc says v52, but this function isn't in OS4.0, so checking for v53 (OS4.1)
+ {
+ uint32 comptype = COMPOSITE_Src;
+ if(!bitmap->opaque) comptype = COMPOSITE_Src_Over_Dest;
+
+ CompositeTags(comptype,tbm,currp->BitMap,
+ COMPTAG_Flags,COMPFLAG_IgnoreDestAlpha,
+ COMPTAG_DestX,glob.rect.MinX,
+ COMPTAG_DestY,glob.rect.MinY,
+ COMPTAG_DestWidth,glob.rect.MaxX - glob.rect.MinX,
+ COMPTAG_DestHeight,glob.rect.MaxY - glob.rect.MinY,
+ COMPTAG_SrcWidth,width,
+ COMPTAG_SrcHeight,height,
+ COMPTAG_OffsetX,xf,
+ COMPTAG_OffsetY,yf,
+ TAG_DONE);
+ }
+ else
+ {
+ BltBitMapTags(BLITA_Width,width,
BLITA_Height,height,
BLITA_Source,tbm,
BLITA_Dest,currp,
@@ -421,9 +463,10 @@ bool ami_bitmap_tile(int x, int y, int width, int height,
BLITA_DestY,yf,
BLITA_SrcType,BLITT_BITMAP,
BLITA_DestType,BLITT_RASTPORT,
+// BLITA_Mask,0xFF,
BLITA_UseSrcAlpha,!bitmap->opaque,
TAG_DONE);
-
+ }
if (!repeat_y)
break;
}