diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2009-05-07 18:40:33 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2009-05-07 18:40:33 +0000 |
commit | e7cbf49fb91b6508e2c65c5fbe24d775e5fe7be2 (patch) | |
tree | 51092d631d39dcb6316c009d568e8436adbae765 /amiga/plotters.c | |
parent | c2ecbebd3dff9531e0b46a5d5983f776920935bb (diff) | |
download | netsurf-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/plotters.c')
-rwxr-xr-x | amiga/plotters.c | 49 |
1 files changed, 46 insertions, 3 deletions
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; } |