x11gfx.hidd: support 32 bit modes
[AROS.git] / rom / hyperlayers / endupdate.c
blobc4361f068f38de78613aabc17e503976e30251af
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
8 #include <aros/libcall.h>
9 #include <graphics/clip.h>
10 #include <exec/types.h>
11 #include <proto/exec.h>
12 #include <graphics/layers.h>
13 #include <proto/graphics.h>
14 #include <proto/layers.h>
15 #include "layers_intern.h"
16 #include "basicfuncs.h"
18 /*****************************************************************************
20 NAME */
22 AROS_LH2(void, EndUpdate,
24 /* SYNOPSIS */
25 AROS_LHA(struct Layer *, l , A0),
26 AROS_LHA(UWORD , flag , D0),
28 /* LOCATION */
29 struct LayersBase *, LayersBase, 14, Layers)
31 /* FUNCTION
32 After the damaged areas are updated, this routine should be
33 called so the regular cliprects of the layer can be installed.
35 INPUTS
36 l - pointer to layer
37 flag - TRUE if the update was complete. The damage list is disposed.
38 FALSE it the update was partial. The damage list is kept.
40 RESULT
42 NOTES
44 EXAMPLE
46 BUGS
47 not tested
49 SEE ALSO
50 BeginUpdate()
52 INTERNALS
54 *****************************************************************************/
56 AROS_LIBFUNC_INIT
59 ** must reset the flag NOW !! Keep this order!!
61 l->Flags &= ~LAYERUPDATING;
63 if (NULL != l->ClipRect)
65 if (IS_SMARTREFRESH(l))
66 _CopyClipRectsToClipRects(l,
67 l->ClipRect,
68 l->cr2,
71 FALSE,
72 TRUE,
73 FALSE,
74 LayersBase);
75 else
76 _FreeClipRectListBM(l,l->ClipRect, LayersBase);
79 l->ClipRect = l->cr2;
80 l->cr2 = NULL;
82 if (FALSE != flag)
84 /* the update was complete so I free the damage list */
85 ClearRegion(l->DamageList);
86 l->Flags &= ~LAYERREFRESH;
89 UnlockLayer(l);
91 AROS_LIBFUNC_EXIT
92 } /* EndUpdate */