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