2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: Try to own the blitter for private usage
10 #include <aros/debug.h>
12 #include <proto/exec.h>
13 #include <graphics/gfxbase.h>
14 #include <exec/execbase.h>
15 #include <exec/tasks.h>
17 #include "graphics_intern.h"
18 #include "gfxfuncsupport.h"
20 /*****************************************************************************
23 #include <proto/graphics.h>
25 AROS_LH0(void, OwnBlitter
,
31 struct GfxBase
*, GfxBase
, 76, Graphics
)
34 The blitter is allocated for exclusive use by the calling task.
35 This function returns immediately if no other task is using
36 the blitter right now or if no blits are in the queues (QBlit(),
37 QBSBlit()). Otherwise the function will block until the blitter
39 It is good practice to start the blitter immediately after calling
40 this function and then call DisownBlitter() so other tasks can
60 ******************************************************************************/
64 struct BlitWaitQNode node
;
69 D(bug("OwnBlitter: Request by Task %p)\n", me
));
73 if (GfxBase
->BlitOwner
== NULL
) {
74 GfxBase
->BlitOwner
= me
;
76 D(bug("OwnBlitter: Now owned by Task %p\n", me
));
80 AddTail(&GfxBase
->BlitWaitQ
, (struct Node
*)&node
);
81 SetSignal(0, 1 << SIGB_BLIT
);
83 Remove((struct Node
*)&node
);