summaryrefslogtreecommitdiff
path: root/amiga/plotters.c
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2009-02-07 10:45:58 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2009-02-07 10:45:58 +0000
commita588aa92c915a6da4ad01269a615318cf3c66442 (patch)
tree1011de55af3fd193478f208a07fcc1aca784d9a5 /amiga/plotters.c
parent19321017a92e81d246e435f4295b17c373982a40 (diff)
downloadnetsurf-a588aa92c915a6da4ad01269a615318cf3c66442.tar.gz
netsurf-a588aa92c915a6da4ad01269a615318cf3c66442.tar.bz2
Enable/disable caching of native bitmaps in gfx board mem
svn path=/trunk/netsurf/; revision=6393
Diffstat (limited to 'amiga/plotters.c')
-rwxr-xr-xamiga/plotters.c47
1 files changed, 38 insertions, 9 deletions
diff --git a/amiga/plotters.c b/amiga/plotters.c
index b19ee394c..3a55772d0 100755
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -477,9 +477,21 @@ bool ami_bitmap(int x, int y, int width, int height,
BLITA_UseSrcAlpha,!bitmap->opaque,
TAG_DONE);
- bitmap->nativebm = scaledbm;
- //p96FreeBitMap(scaledbm);
+ if(option_cache_bitmaps >= 1)
+ {
+ if(bitmap->nativebm)
+ {
+ p96FreeBitMap(bitmap->nativebm);
+ }
+
+ bitmap->nativebm = scaledbm;
+ }
+ else
+ {
+ p96FreeBitMap(scaledbm);
+ }
+ p96FreeBitMap(tbm);
}
else
{
@@ -494,7 +506,19 @@ bool ami_bitmap(int x, int y, int width, int height,
BLITA_UseSrcAlpha,!bitmap->opaque,
TAG_DONE);
- bitmap->nativebm = tbm;
+ if(option_cache_bitmaps == 2)
+ {
+ if(bitmap->nativebm)
+ {
+ p96FreeBitMap(bitmap->nativebm);
+ }
+
+ bitmap->nativebm = tbm;
+ }
+ else
+ {
+ p96FreeBitMap(tbm);
+ }
}
bitmap->nativebmwidth = width;
@@ -514,8 +538,6 @@ bool ami_bitmap(int x, int y, int width, int height,
TAG_DONE);
}
-// p96FreeBitMap(tbm);
-
return true;
}
@@ -557,9 +579,13 @@ bool ami_bitmap_tile(int x, int y, int width, int height,
InitRastPort(&trp);
trp.BitMap = tbm;
p96WritePixelArray((struct RenderInfo *)&ri,0,0,&trp,0,0,bitmap->width,bitmap->height);
- bitmap->nativebm = tbm;
- bitmap->nativebmwidth = bitmap->width;
- bitmap->nativebmheight = bitmap->height;
+
+ if(option_cache_bitmaps == 2)
+ {
+ bitmap->nativebm = tbm;
+ bitmap->nativebmwidth = bitmap->width;
+ bitmap->nativebmheight = bitmap->height;
+ }
}
max_width = (repeat_x ? scrn->Width : width);
@@ -603,7 +629,10 @@ bool ami_bitmap_tile(int x, int y, int width, int height,
}
}
-// p96FreeBitMap(tbm);
+ if(option_cache_bitmaps != 2)
+ {
+ p96FreeBitMap(tbm);
+ }
return true;
}