2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
8 #include "graphics_intern.h"
9 #include <exec/types.h>
10 #include <exec/memory.h>
11 #include <graphics/regions.h>
12 #include <proto/exec.h>
13 #include "intregions.h"
15 /*****************************************************************************
18 #include <proto/graphics.h>
20 AROS_LH0(struct Region
*, NewRegion
,
26 struct GfxBase
*, GfxBase
, 86, Graphics
)
29 Allocates memory for a new Region and initializes it
35 region - pointer to a newly created Region structure that
36 should be freed by a call to DisposeRegion()
50 27-11-96 digulla automatically created from
51 graphics_lib.fd and clib/graphics_protos.h
52 15-01-97 mreckt initial version
54 *****************************************************************************/
60 #if REGIONS_USE_MEMPOOL
61 ObtainSemaphore(&PrivGBase(GfxBase
)->regionsem
);
62 new = AllocPooled(PrivGBase(GfxBase
)->regionpool
, sizeof(struct Region
));
63 ReleaseSemaphore(&PrivGBase(GfxBase
)->regionsem
);
65 new = AllocMem(sizeof(struct Region
), MEMF_ANY
);
68 if (new) InitRegion(new);