VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/xpdm/VBoxDispVrdpBmp.h@ 69498

Last change on this file since 69498 was 69498, checked in by vboxsync, 7 years ago

backed out r118835 as it incorrectly updated the 'This file is based on' file headers.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.1 KB
Line 
1/* $Id: VBoxDispVrdpBmp.h 69498 2017-10-28 15:07:25Z vboxsync $ */
2/** @file
3 * VBox XPDM Display driver
4 */
5
6/*
7 * Copyright (C) 2011-2016 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 VBOXDISPVRDPBMP_H
19#define VBOXDISPVRDPBMP_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
57#define VRDP_BC_ENTRY_STATUS_EMPTY 0
58#define VRDP_BC_ENTRY_STATUS_TEMPORARY 1
59#define VRDP_BC_ENTRY_STATUS_CACHED 2
60
61typedef struct _VRDPBCENTRY
62{
63 struct _VRDPBCENTRY *next;
64 struct _VRDPBCENTRY *prev;
65 VRDPBCHASH hash;
66 uint32_t u32Status;
67} VRDPBCENTRY;
68
69typedef struct _VRDPBC
70{
71 VRDPBCENTRY *headTmp;
72 VRDPBCENTRY *tailTmp;
73 VRDPBCENTRY *headCached;
74 VRDPBCENTRY *tailCached;
75 VRDPBCENTRY aEntries[VRDPBMP_N_CACHED_BITMAPS];
76} VRDPBC;
77
78void vrdpbmpReset (VRDPBC *pCache);
79int vrdpbmpCacheSurface (VRDPBC *pCache, const SURFOBJ *pso, VRDPBCHASH *phash, VRDPBCHASH *phashDeleted, BOOL bForce);
80
81#endif /* !VBOXDISPVRDPBMP_H */
Note: See TracBrowser for help on using the repository browser.

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