INTB_VERTB100 -> INTB_TIMERTICK
[tangerine.git] / rom / hyperlayers / endupdate.c
blob35692e9958d2014861a5767e265d6d42775e05b7
1 /*
2 Copyright © 1995-2001, 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 update this routine should be
33 called so the regular cliprects of the layer can be installed.
36 INPUTS
37 l - pointer to layer
38 flag - TRUE if the update was complete. The damage list is disposed.
39 FALSE it the update was partial. The damage list is kept.
41 RESULT
43 NOTES
45 EXAMPLE
47 BUGS
48 not tested
50 SEE ALSO
51 BeginUpdate()
53 INTERNALS
55 HISTORY
56 27-11-96 digulla automatically created from
57 layers_lib.fd and clib/layers_protos.h
59 *****************************************************************************/
61 AROS_LIBFUNC_INIT
62 AROS_LIBBASE_EXT_DECL(struct LayersBase *,LayersBase)
65 ** must reset the flag NOW !! Keep this order!!
67 l->Flags &= ~LAYERUPDATING;
69 if (NULL != l->ClipRect)
71 if (IS_SMARTREFRESH(l))
72 _CopyClipRectsToClipRects(l,
73 l->ClipRect,
74 l->cr2,
77 FALSE,
78 TRUE,
79 FALSE,
80 LayersBase);
81 else
82 _FreeClipRectListBM(l,l->ClipRect, LayersBase);
85 l->ClipRect = l->cr2;
86 l->cr2 = NULL;
88 if (FALSE != flag)
90 /* the update was complete so I free the damage list */
91 ClearRegion(l->DamageList);
92 l->Flags &= ~LAYERREFRESH;
95 UnlockLayer(l);
97 AROS_LIBFUNC_EXIT
98 } /* EndUpdate */