Belarusian
[AROS.git] / rom / graphics / changevpbitmap.c
blobba5540e9ab16e42eb40b549c4ca9edcf4e0b139c
1 /*
2 Copyright © 1995-2010, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Graphics function ChangeVPBitMap()
6 Lang: english
7 */
9 #include <aros/debug.h>
10 #include <graphics/gfx.h>
11 #include <graphics/gfxbase.h>
12 #include <graphics/view.h>
14 #include "graphics_intern.h"
16 /*****************************************************************************
18 NAME */
19 #include <proto/graphics.h>
21 AROS_LH3(void, ChangeVPBitMap,
23 /* SYNOPSIS */
24 AROS_LHA(struct ViewPort *, vp, A0),
25 AROS_LHA(struct BitMap *, bm, A1),
26 AROS_LHA(struct DBufInfo *, db, A2),
28 /* LOCATION */
29 struct GfxBase *, GfxBase, 157, Graphics)
31 /* FUNCTION
33 INPUTS
34 vp - pointer to a viewport
35 bm - pointer to a BitMap structure. This BitMap structure must be of
36 the same layout as the one attached to the viewport
37 (same depth, alignment and BytesPerRow)
38 db - pointer to a DBufInfo
40 RESULT
42 NOTES
44 EXAMPLE
46 BUGS
48 SEE ALSO
50 INTERNALS
52 HISTORY
55 ******************************************************************************/
57 AROS_LIBFUNC_INIT
59 /* This is a very basic implementation. Screen refresh is completely not in sync with VBlank.
60 The main problem here is that AROS completely misses VBlank interrupt. */
62 /* Insert a new bitmap, rebuild the viewport and reload current view */
63 vp->RasInfo->BitMap = bm;
64 MakeVPort(NULL, vp);
65 driver_LoadView(GfxBase->ActiView, GfxBase);
67 /* Reply both messages - the displayed bitmap has been swapped */
68 ReplyMsg(&db->dbi_SafeMessage);
69 ReplyMsg(&db->dbi_DispMessage);
71 AROS_LIBFUNC_EXIT
72 } /* ChangeVPBitMap */