VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Display/vrdpbmp.h@ 1207

Last change on this file since 1207 was 1207, checked in by vboxsync, 18 years ago

Cleaned up EOL style and uppercase names

  • Property svn:eol-style set to native
File size: 2.2 KB
Line 
1/** @file
2 *
3 * VBoxGuest -- VirtualBox Win 2000/XP guest display driver
4 *
5 * VRDP bitmap cache.
6 *
7 * Copyright (C) 2006 InnoTek Systemberatung GmbH
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License as published by the Free Software Foundation,
13 * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
14 * distribution. VirtualBox OSE is distributed in the hope that it will
15 * be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * If you received this file as part of a commercial VirtualBox
18 * distribution, then only the terms of your commercial VirtualBox
19 * license agreement apply instead of the previous paragraph.
20 *
21 */
22
23#ifndef __DISPLAY_VRDPBMP__H
24#define __DISPLAY_VRDPBMP__H
25
26/* RDP cache holds about 350 tiles 64x64. Therefore
27 * the driver does not have to cache more then the
28 * RDP capacity. Most of bitmaps will be tiled, so
29 * number of RDP tiles will be greater than number of
30 * bitmaps. Also the number of bitmaps must be a power
31 * of 2. So the 256 is a good number.
32 */
33#define VRDPBMP_N_CACHED_BITMAPS (256)
34
35#define VRDPBMP_RC_NOT_CACHED (0x0000)
36#define VRDPBMP_RC_CACHED (0x0001)
37#define VRDPBMP_RC_ALREADY_CACHED (0x0002)
38
39#define VRDPBMP_RC_F_DELETED (0x10000)
40
41/* Bitmap hash. */
42#pragma pack (1)
43typedef struct _VRDPBCHASH
44{
45 /* A 64 bit hash value of pixels. */
46 uint64_t hash64;
47
48 /* Bitmap width. */
49 uint16_t cx;
50
51 /* Bitmap height. */
52 uint16_t cy;
53
54 /* Bytes per pixel at the bitmap. */
55 uint8_t bytesPerPixel;
56
57 /* Padding to 16 bytes. */
58 uint8_t padding[3];
59} VRDPBCHASH;
60#pragma pack ()
61
62typedef struct _VRDPBCENTRY
63{
64 bool fUsed;
65 struct _VRDPBCENTRY *next;
66 struct _VRDPBCENTRY *prev;
67 VRDPBCHASH hash;
68} VRDPBCENTRY;
69
70typedef struct _VRDPBC
71{
72 VRDPBCENTRY *head;
73 VRDPBCENTRY *tail;
74 VRDPBCENTRY aEntries[VRDPBMP_N_CACHED_BITMAPS];
75} VRDPBC;
76
77void vrdpbmpReset (VRDPBC *pCache);
78
79int vrdpbmpCacheSurface (VRDPBC *pCache, const SURFOBJ *pso, VRDPBCHASH *phash, VRDPBCHASH *phashDeleted);
80
81#endif /* __DISPLAY_VRDPBMP__H */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette