summaryrefslogtreecommitdiff
path: root/amiga/plotters.c
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2015-08-16 12:48:06 +0100
committerChris Young <chris@unsatisfactorysoftware.co.uk>2015-08-16 12:48:06 +0100
commit9c2fbde9173fec32e60e69b5d6f8e0041d6e28f6 (patch)
treeabeba49c0c2f42a811cdec755ed5335f78e4debc /amiga/plotters.c
parent7c14bff469c9d1bd027555b3fb7a820853f0a02e (diff)
downloadnetsurf-9c2fbde9173fec32e60e69b5d6f8e0041d6e28f6.tar.gz
netsurf-9c2fbde9173fec32e60e69b5d6f8e0041d6e28f6.tar.bz2
Put the memory areas, rather than the structures, into chip RAM as required.
Diffstat (limited to 'amiga/plotters.c')
-rw-r--r--amiga/plotters.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/amiga/plotters.c b/amiga/plotters.c
index 26479ad20..bc4babe63 100644
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -119,8 +119,15 @@ void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG height)
gg->height = height;
gg->layerinfo = NewLayerInfo();
+
+#ifdef __amigaos4__
gg->areabuf = AllocVecTagList(AREA_SIZE, NULL);
gg->tmprasbuf = AllocVecTagList(width * height, NULL);
+#else
+ /* OS3/AGA requries these to be in chip mem */
+ gg->areabuf = AllocVec(AREA_SIZE, MEMF_CHIP);
+ gg->tmprasbuf = AllocVec(width * height, MEMF_CHIP);
+#endif
/* Friend BitMaps are weird.
* For OS4, we shouldn't use a friend BitMap here (see below).
@@ -163,17 +170,11 @@ void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG height)
InstallLayerHook(gg->rp->Layer,LAYERS_NOBACKFILL);
gg->rp->AreaInfo = AllocVecTagList(sizeof(struct AreaInfo), NULL);
-
if((!gg->areabuf) || (!gg->rp->AreaInfo)) warn_user("NoMemory","");
InitArea(gg->rp->AreaInfo,gg->areabuf, AREA_SIZE/5);
-#ifdef __amigaos4__
- gg->rp->TmpRas = AllocVecTagList(sizeof(struct TmpRas), NULL);
-#else
- /* TmpRas needs to be in chip mem on OS3 */
- gg->rp->TmpRas = AllocVec(sizeof(struct TmpRas), MEMF_CHIP);
-#endif
+ gg->rp->TmpRas = AllocVecTagList(sizeof(struct TmpRas), NULL);
if((!gg->tmprasbuf) || (!gg->rp->TmpRas)) warn_user("NoMemory","");
InitTmpRas(gg->rp->TmpRas, gg->tmprasbuf, width*height);