VirtualBox

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

Last change on this file since 35319 was 28800, checked in by vboxsync, 15 years ago

Automated rebranding to Oracle copyright/license strings via filemuncher

  • Property svn:eol-style set to native
File size: 2.0 KB
Line 
1/** @file
2 *
3 * VBoxGuest -- VirtualBox Win 2000/XP guest display driver
4 *
5 * VRDP bitmap cache.
6 *
7 * Copyright (C) 2006-2007 Oracle Corporation
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 (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef __DISPLAY_VRDPBMP__H
19#define __DISPLAY_VRDPBMP__H
20
21/* RDP cache holds about 350 tiles 64x64. Therefore
22 * the driver does not have to cache more then the
23 * RDP capacity. Most of bitmaps will be tiled, so
24 * number of RDP tiles will be greater than number of
25 * bitmaps. Also the number of bitmaps must be a power
26 * of 2. So the 256 is a good number.
27 */
28#define VRDPBMP_N_CACHED_BITMAPS (256)
29
30#define VRDPBMP_RC_NOT_CACHED (0x0000)
31#define VRDPBMP_RC_CACHED (0x0001)
32#define VRDPBMP_RC_ALREADY_CACHED (0x0002)
33
34#define VRDPBMP_RC_F_DELETED (0x10000)
35
36/* Bitmap hash. */
37#pragma pack (1)
38typedef struct _VRDPBCHASH
39{
40 /* A 64 bit hash value of pixels. */
41 uint64_t hash64;
42
43 /* Bitmap width. */
44 uint16_t cx;
45
46 /* Bitmap height. */
47 uint16_t cy;
48
49 /* Bytes per pixel at the bitmap. */
50 uint8_t bytesPerPixel;
51
52 /* Padding to 16 bytes. */
53 uint8_t padding[3];
54} VRDPBCHASH;
55#pragma pack ()
56
57typedef struct _VRDPBCENTRY
58{
59 bool fUsed;
60 struct _VRDPBCENTRY *next;
61 struct _VRDPBCENTRY *prev;
62 VRDPBCHASH hash;
63} VRDPBCENTRY;
64
65typedef struct _VRDPBC
66{
67 VRDPBCENTRY *head;
68 VRDPBCENTRY *tail;
69 VRDPBCENTRY aEntries[VRDPBMP_N_CACHED_BITMAPS];
70} VRDPBC;
71
72void vrdpbmpReset (VRDPBC *pCache);
73
74int vrdpbmpCacheSurface (VRDPBC *pCache, const SURFOBJ *pso, VRDPBCHASH *phash, VRDPBCHASH *phashDeleted);
75
76#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