2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
5 Desc: Graphics function FreeVPortCopLists()
9 #include <aros/debug.h>
10 #include <graphics/copper.h>
11 #include <graphics/view.h>
12 #include <hidd/graphics.h>
13 #include <proto/exec.h>
14 #include <proto/oop.h>
16 #include "graphics_intern.h"
17 #include "gfxfuncsupport.h"
19 /*****************************************************************************
22 #include <proto/graphics.h>
24 AROS_LH1(void, FreeVPortCopLists
,
27 AROS_LHA(struct ViewPort
*, vp
, A0
),
30 struct GfxBase
*, GfxBase
, 90, Graphics
)
33 Deallocate all memory associated with the CopList structures
34 for display, color, sprite and the user copper list. The
35 corresponding fields in this structure will be set to NULL.
38 vp - pointer to a ViewPort structure
55 *****************************************************************************/
59 struct ViewPortExtra
*vpe
;
61 vpe
= (struct ViewPortExtra
*)GfxLookUp(vp
);
62 D(bug("[FreeVPortCopLists] ViewPort 0x%p, ViewPortExtra 0x%p\n", vp
, vpe
));
65 /* Free the associated DriverData */
66 struct HIDD_ViewPortData
*vpd
= VPE_DATA(vpe
);
70 /* Do driver-specific cleanup */
71 HIDD_Gfx_CleanViewPort(VPE_DRIVER(vpe
)->gfxhidd
, vpd
);
73 FreeMem(vpd
, sizeof(struct HIDD_ViewPortData
));
75 vpe
->DriverData
[0] = NULL
;
78 if (vpe
->Flags
& VPXF_FREE_ME
)
80 D(bug("[FreeVPortCopLists] Freeing temporary ViewPortExtra\n"));
86 } /* FreeVPortCopLists */