2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
7 #include <proto/graphics.h>
8 #include <proto/layers.h>
9 #include "intuition_intern.h"
11 /*****************************************************************************
14 #include <graphics/rastport.h>
15 #include <proto/intuition.h>
17 AROS_LH1(void, ReleaseGIRPort
,
20 AROS_LHA(struct RastPort
*, rp
, A0
),
23 struct IntuitionBase
*, IntuitionBase
, 94, Intuition
)
26 Release a RastPort previously obtained by ObtainGIRPort().
29 rp - The result of ObtainGIRPort()
44 *****************************************************************************/
48 struct LayersBase
*LayersBase
= GetPrivIBase(IntuitionBase
)->LayersBase
;
49 DEBUG_RELEASEGIRPORT(dprintf("ReleaseGIRPort: RPort 0x%lx\n", rp
));
55 if ((--(GetPrivIBase(IntuitionBase
)->BackupLayerContext
.nestcount
)) == 0)
57 InstallClipRegion(rp
->Layer
,GetPrivIBase(IntuitionBase
)->BackupLayerContext
.clipregion
);
59 rp
->Layer
->Scroll_X
= GetPrivIBase(IntuitionBase
)->BackupLayerContext
.scroll_x
;
60 rp
->Layer
->Scroll_Y
= GetPrivIBase(IntuitionBase
)->BackupLayerContext
.scroll_y
;
63 /* bug("----------- RELEASE: %x\n",rp->Layer);*/
64 UnlockLayer(rp
->Layer
);
67 UNLOCKGADGET(IntuitionBase
)
73 } /* ReleaseGIRPort */