1 | /******************************Module*Header*******************************\
|
---|
2 | *
|
---|
3 | * Copyright (C) 2006-2007 Sun Microsystems, Inc.
|
---|
4 | *
|
---|
5 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
6 | * available from http://www.virtualbox.org. This file is free software;
|
---|
7 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
8 | * General Public License (GPL) as published by the Free Software
|
---|
9 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
10 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
11 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
12 | *
|
---|
13 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
14 | * Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
15 | * additional information or have any questions.
|
---|
16 | */
|
---|
17 | /*
|
---|
18 | * Based in part on Microsoft DDK sample code
|
---|
19 | *
|
---|
20 | * *******************
|
---|
21 | * * GDI SAMPLE CODE *
|
---|
22 | * *******************
|
---|
23 | *
|
---|
24 | * Module Name: driver.h
|
---|
25 | *
|
---|
26 | * contains prototypes for the frame buffer driver.
|
---|
27 | *
|
---|
28 | * Copyright (c) 1992-1998 Microsoft Corporation
|
---|
29 | \**************************************************************************/
|
---|
30 |
|
---|
31 | #include "stddef.h"
|
---|
32 | #include <stdarg.h>
|
---|
33 | #include "windef.h"
|
---|
34 | #include "wingdi.h"
|
---|
35 | #include "winddi.h"
|
---|
36 | #include "devioctl.h"
|
---|
37 | #include "ntddvdeo.h"
|
---|
38 | #include "debug.h"
|
---|
39 |
|
---|
40 | #include "../Miniport/vboxioctl.h"
|
---|
41 |
|
---|
42 | #include <VBox/VBoxVideo.h>
|
---|
43 |
|
---|
44 | /* Forward declaration. */
|
---|
45 | struct _PDEV;
|
---|
46 | typedef struct _PDEV PDEV;
|
---|
47 | typedef PDEV *PPDEV;
|
---|
48 |
|
---|
49 | typedef struct _VBOXDISPLAYINFO
|
---|
50 | {
|
---|
51 | VBOXVIDEOINFOHDR hdrLink;
|
---|
52 | VBOXVIDEOINFOLINK link;
|
---|
53 | VBOXVIDEOINFOHDR hdrScreen;
|
---|
54 | VBOXVIDEOINFOSCREEN screen;
|
---|
55 | VBOXVIDEOINFOHDR hdrHostEvents;
|
---|
56 | VBOXVIDEOINFOHOSTEVENTS hostEvents;
|
---|
57 | VBOXVIDEOINFOHDR hdrEnd;
|
---|
58 | } VBOXDISPLAYINFO;
|
---|
59 |
|
---|
60 | #include "vbvavrdp.h"
|
---|
61 | #include "vrdpbmp.h"
|
---|
62 |
|
---|
63 | /* Saved screen bits information. */
|
---|
64 | typedef struct _SSB
|
---|
65 | {
|
---|
66 | ULONG ident; /* 1 based index in the stack = the handle returned by DrvSaveScreenBits (SS_SAVE) */
|
---|
67 | BYTE *pBuffer; /* Buffer where screen bits are saved. */
|
---|
68 | } SSB;
|
---|
69 |
|
---|
70 | /* VRAM
|
---|
71 | * | | | | |
|
---|
72 | * 0+framebuffer+ddraw heap+VBVA buffer+displayinfo=cScreenSize
|
---|
73 | */
|
---|
74 | typedef struct _VRAMLAYOUT
|
---|
75 | {
|
---|
76 | ULONG cbVRAM;
|
---|
77 |
|
---|
78 | ULONG offFrameBuffer;
|
---|
79 | ULONG cbFrameBuffer;
|
---|
80 |
|
---|
81 | ULONG offDDRAWHeap; //@todo
|
---|
82 | ULONG cbDDRAWHeap;
|
---|
83 |
|
---|
84 | ULONG offVBVABuffer;
|
---|
85 | ULONG cbVBVABuffer;
|
---|
86 |
|
---|
87 | ULONG offDisplayInformation;
|
---|
88 | ULONG cbDisplayInformation;
|
---|
89 | } VRAMLAYOUT;
|
---|
90 |
|
---|
91 | typedef struct
|
---|
92 | {
|
---|
93 | PPDEV ppdev;
|
---|
94 | } VBOXSURF, *PVBOXSURF;
|
---|
95 |
|
---|
96 | #ifdef VBOX_WITH_VIDEOHWACCEL
|
---|
97 | typedef struct _VBOXVHWASURFDESC
|
---|
98 | {
|
---|
99 | VBOXVHWA_SURFHANDLE hHostHandle;
|
---|
100 | volatile uint32_t cPendingBltsSrc;
|
---|
101 | volatile uint32_t cPendingBltsDst;
|
---|
102 | volatile uint32_t cPendingFlips;
|
---|
103 | uint32_t cBitsPerPixel;
|
---|
104 | }VBOXVHWASURFDESC, *PVBOXVHWASURFDESC;
|
---|
105 |
|
---|
106 | typedef struct _VBOXVHWAINFO
|
---|
107 | {
|
---|
108 | uint32_t caps;
|
---|
109 | uint32_t colorKeyCaps;
|
---|
110 | uint32_t stretchCaps;
|
---|
111 | uint32_t surfaceCaps;
|
---|
112 | uint32_t numOverlays;
|
---|
113 | uint32_t numFourCC;
|
---|
114 | HGSMIOFFSET FourCC;
|
---|
115 | BOOLEAN bVHWAEnabled;
|
---|
116 | } VBOXVHWAINFO;
|
---|
117 | #endif
|
---|
118 |
|
---|
119 | struct _PDEV
|
---|
120 | {
|
---|
121 | HANDLE hDriver; // Handle to \Device\Screen
|
---|
122 | HDEV hdevEng; // Engine's handle to PDEV
|
---|
123 | HSURF hsurfScreenBitmap; // Engine's handle to VRAM screen bitmap surface
|
---|
124 | SURFOBJ *psoScreenBitmap; // VRAM screen bitmap surface
|
---|
125 | HSURF hsurfScreen; // Engine's handle to VRAM screen device surface
|
---|
126 | ULONG ulBitmapType;
|
---|
127 | HPALETTE hpalDefault; // Handle to the default palette for device.
|
---|
128 | PBYTE pjScreen; // This is pointer to base screen address
|
---|
129 | ULONG cxScreen; // Visible screen width
|
---|
130 | ULONG cyScreen; // Visible screen height
|
---|
131 | POINTL ptlOrg; // Where this display is anchored in
|
---|
132 | // the virtual desktop.
|
---|
133 | POINTL ptlDevOrg; // Device origin for DualView (0,0 for primary view).
|
---|
134 | ULONG ulMode; // Mode the mini-port driver is in.
|
---|
135 | LONG lDeltaScreen; // Distance from one scan to the next.
|
---|
136 |
|
---|
137 | PVOID pOffscreenList; // linked list of DCI offscreen surfaces.
|
---|
138 | FLONG flRed; // For bitfields device, Red Mask
|
---|
139 | FLONG flGreen; // For bitfields device, Green Mask
|
---|
140 | FLONG flBlue; // For bitfields device, Blue Mask
|
---|
141 | ULONG cPaletteShift; // number of bits the 8-8-8 palette must
|
---|
142 | // be shifted by to fit in the hardware
|
---|
143 | // palette.
|
---|
144 | ULONG ulBitCount; // # of bits per pel 8,16,24,32 are only supported.
|
---|
145 | POINTL ptlHotSpot; // adjustment for pointer hot spot
|
---|
146 | VIDEO_POINTER_CAPABILITIES PointerCapabilities; // HW pointer abilities
|
---|
147 | PVIDEO_POINTER_ATTRIBUTES pPointerAttributes; // hardware pointer attributes
|
---|
148 | DWORD cjPointerAttributes; // Size of buffer allocated
|
---|
149 | BOOL fHwCursorActive; // Are we currently using the hw cursor
|
---|
150 | PALETTEENTRY *pPal; // If this is pal managed, this is the pal
|
---|
151 | BOOL bSupportDCI; // Does the miniport support DCI?
|
---|
152 | FLONG flHooks;
|
---|
153 |
|
---|
154 | #ifndef VBOX_WITH_HGSMI
|
---|
155 | VBVAENABLERESULT vbva;
|
---|
156 | uint32_t u32VRDPResetFlag;
|
---|
157 | #endif /* !VBOX_WITH_HGSMI */
|
---|
158 | BOOL fHwBufferOverflow;
|
---|
159 | VBVARECORD *pRecord;
|
---|
160 | VRDPBC cache;
|
---|
161 |
|
---|
162 | ULONG cSSB; // Number of active saved screen bits records in the following array.
|
---|
163 | SSB aSSB[4]; // LIFO type stack for saved screen areas.
|
---|
164 |
|
---|
165 | #ifndef VBOX_WITH_HGSMI
|
---|
166 | VBOXDISPLAYINFO *pInfo;
|
---|
167 | BOOLEAN bVBoxVideoSupported;
|
---|
168 | #endif /* !VBOX_WITH_HGSMI */
|
---|
169 | ULONG iDevice;
|
---|
170 | VRAMLAYOUT layout;
|
---|
171 |
|
---|
172 | PVBOXSURF pdsurfScreen;
|
---|
173 |
|
---|
174 | #ifdef VBOX_WITH_DDRAW
|
---|
175 | BOOL bDdExclusiveMode;
|
---|
176 | DWORD dwNewDDSurfaceOffset;
|
---|
177 | DWORD cHeaps;
|
---|
178 | VIDEOMEMORY* pvmList;
|
---|
179 | struct {
|
---|
180 | DWORD bLocked;
|
---|
181 | RECTL rArea;
|
---|
182 | } ddLock;
|
---|
183 | #endif /* VBOX_WITH_DDRAW */
|
---|
184 |
|
---|
185 | #ifdef VBOX_WITH_HGSMI
|
---|
186 | BOOLEAN bHGSMISupported;
|
---|
187 | HGSMIHEAP hgsmiDisplayHeap;
|
---|
188 | VBVABUFFER *pVBVA; /* Pointer to the pjScreen + layout->offVBVABuffer. NULL if VBVA is not enabled. */
|
---|
189 |
|
---|
190 | HVBOXVIDEOHGSMI hMpHGSMI; /* context handler passed to miniport HGSMI callbacks */
|
---|
191 | PFNVBOXVIDEOHGSMICOMPLETION pfnHGSMICommandComplete; /* called to complete the command we receive from the miniport */
|
---|
192 | PFNVBOXVIDEOHGSMICOMMANDS pfnHGSMIRequestCommands; /* called to requests the commands posted to us from the host */
|
---|
193 | #endif /* VBOX_WITH_HGSMI */
|
---|
194 |
|
---|
195 | #ifdef VBOX_WITH_VIDEOHWACCEL
|
---|
196 | VBOXVHWAINFO vhwaInfo;
|
---|
197 | #endif
|
---|
198 | };
|
---|
199 |
|
---|
200 | #ifdef VBOX_WITH_OPENGL
|
---|
201 | typedef struct
|
---|
202 | {
|
---|
203 | DWORD dwVersion;
|
---|
204 | DWORD dwDriverVersion;
|
---|
205 | WCHAR szDriverName[256];
|
---|
206 | } OPENGL_INFO, *POPENGL_INFO;
|
---|
207 | #endif
|
---|
208 |
|
---|
209 | #ifndef VBOX_WITH_HGSMI
|
---|
210 | /* The global semaphore handle for all driver instances. */
|
---|
211 | extern HSEMAPHORE ghsemHwBuffer;
|
---|
212 | #endif /* !VBOX_WITH_HGSMI */
|
---|
213 |
|
---|
214 |
|
---|
215 | #ifdef VBOX_WITH_HGSMI
|
---|
216 | #define VBE_DISPI_IOPORT_INDEX 0x01CE
|
---|
217 | #define VBE_DISPI_IOPORT_DATA 0x01CF
|
---|
218 | #define VBE_DISPI_INDEX_VBVA_GUEST 0xc
|
---|
219 | #endif /* VBOX_WITH_HGSMI */
|
---|
220 |
|
---|
221 | extern BOOL g_bOnNT40;
|
---|
222 |
|
---|
223 | DWORD getAvailableModes(HANDLE, PVIDEO_MODE_INFORMATION *, DWORD *);
|
---|
224 | BOOL bInitPDEV(PPDEV, PDEVMODEW, GDIINFO *, DEVINFO *);
|
---|
225 | BOOL bInitSURF(PPDEV, BOOL);
|
---|
226 | BOOL bInitPaletteInfo(PPDEV, DEVINFO *);
|
---|
227 | BOOL bInitPointer(PPDEV, DEVINFO *);
|
---|
228 | BOOL bInit256ColorPalette(PPDEV);
|
---|
229 | BOOL bInitNotificationThread(PPDEV);
|
---|
230 | VOID vStopNotificationThread (PPDEV);
|
---|
231 | VOID vDisablePalette(PPDEV);
|
---|
232 | VOID vDisableSURF(PPDEV);
|
---|
233 |
|
---|
234 | #define MAX_CLUT_SIZE (sizeof(VIDEO_CLUT) + (sizeof(ULONG) * 256))
|
---|
235 |
|
---|
236 | //
|
---|
237 | // Determines the size of the DriverExtra information in the DEVMODE
|
---|
238 | // structure passed to and from the display driver.
|
---|
239 | //
|
---|
240 |
|
---|
241 | #define DRIVER_EXTRA_SIZE 0
|
---|
242 |
|
---|
243 | #define DLL_NAME L"VBoxDisp" // Name of the DLL in UNICODE
|
---|
244 | #define STANDARD_DEBUG_PREFIX "VBOXDISP: " // All debug output is prefixed
|
---|
245 | #define ALLOC_TAG 'bvDD' // Four byte tag (characters in
|
---|
246 | // reverse order) used for memory
|
---|
247 | // allocations
|
---|
248 |
|
---|
249 | // VBOX
|
---|
250 | typedef struct _CLIPRECTS {
|
---|
251 | ULONG c;
|
---|
252 | RECTL arcl[64];
|
---|
253 | } CLIPRECTS;
|
---|
254 |
|
---|
255 | typedef struct _VRDPCLIPRECTS
|
---|
256 | {
|
---|
257 | RECTL rclDstOrig; /* Original bounding rectancle. */
|
---|
258 | RECTL rclDst; /* Bounding rectangle of all rects. */
|
---|
259 | CLIPRECTS rects; /* Rectangles to update. */
|
---|
260 | } VRDPCLIPRECTS;
|
---|
261 |
|
---|
262 |
|
---|
263 | BOOL vboxVbvaEnable (PPDEV ppdev);
|
---|
264 | void vboxVbvaDisable (PPDEV ppdev);
|
---|
265 |
|
---|
266 | BOOL vboxHwBufferBeginUpdate (PPDEV ppdev);
|
---|
267 | void vboxHwBufferEndUpdate (PPDEV ppdev);
|
---|
268 |
|
---|
269 | BOOL vboxWrite (PPDEV ppdev, const void *pv, uint32_t cb);
|
---|
270 |
|
---|
271 | BOOL vboxOrderSupported (PPDEV ppdev, unsigned code);
|
---|
272 |
|
---|
273 | void VBoxProcessDisplayInfo(PPDEV ppdev);
|
---|
274 | void VBoxUpdateDisplayInfo (PPDEV ppdev);
|
---|
275 |
|
---|
276 | void drvLoadEng (void);
|
---|
277 |
|
---|
278 | #ifdef VBOX_WITH_HGSMI
|
---|
279 | void vboxVBVAHostCommandComplete(PPDEV ppdev, VBVAHOSTCMD * pCmd);
|
---|
280 |
|
---|
281 | #ifdef VBOX_WITH_VIDEOHWACCEL
|
---|
282 |
|
---|
283 | #define VBOXDD_CHECKFLAG(_v, _f) ((_v) & (_f)) == (_f)
|
---|
284 |
|
---|
285 | typedef DECLCALLBACK(void) FNVBOXVHWACMDCOMPLETION(PPDEV ppdev, VBOXVHWACMD * pCmd, void * pContext);
|
---|
286 | typedef FNVBOXVHWACMDCOMPLETION *PFNVBOXVHWACMDCOMPLETION;
|
---|
287 |
|
---|
288 | VBOXVHWACMD* vboxVHWACommandCreate (PPDEV ppdev, VBOXVHWACMD_TYPE enmCmd, VBOXVHWACMD_LENGTH cbCmd);
|
---|
289 | void vboxVHWACommandFree (PPDEV ppdev, VBOXVHWACMD* pCmd);
|
---|
290 | BOOL vboxVHWACommandSubmit (PPDEV ppdev, VBOXVHWACMD* pCmd);
|
---|
291 | void vboxVHWACommandSubmitAsynch (PPDEV ppdev, VBOXVHWACMD* pCmd, PFNVBOXVHWACMDCOMPLETION pfnCompletion, void * pContext);
|
---|
292 | void vboxVHWACommandSubmitAsynchByEvent (PPDEV ppdev, VBOXVHWACMD* pCmd, PEVENT pEvent);
|
---|
293 | void vboxVHWACommandCheckHostCmds(PPDEV ppdev);
|
---|
294 |
|
---|
295 | int vboxVHWAInitHostInfo1(PPDEV ppdev);
|
---|
296 | int vboxVHWAInitHostInfo2(PPDEV ppdev, DWORD *pFourCC);
|
---|
297 |
|
---|
298 | VBOXVHWACMD_QUERYINFO1* vboxVHWAQueryHostInfo1(PPDEV ppdev);
|
---|
299 | void vboxVHWAFreeHostInfo1(PPDEV ppdev, VBOXVHWACMD_QUERYINFO1* pInfo);
|
---|
300 | VBOXVHWACMD_QUERYINFO2* vboxVHWAQueryHostInfo2(PPDEV ppdev, uint32_t numFourCC);
|
---|
301 | void vboxVHWAFreeHostInfo2(PPDEV ppdev, VBOXVHWACMD_QUERYINFO2* pInfo);
|
---|
302 |
|
---|
303 | void vboxVHWAInit();
|
---|
304 | void vboxVHWATerm();
|
---|
305 | uint32_t vboxVHWAUnsupportedDDCAPS(uint32_t caps);
|
---|
306 | uint32_t vboxVHWAUnsupportedDDSCAPS(uint32_t caps);
|
---|
307 | uint32_t vboxVHWAUnsupportedDDPFS(uint32_t caps);
|
---|
308 | uint32_t vboxVHWASupportedDDCAPS(uint32_t caps);
|
---|
309 | uint32_t vboxVHWASupportedDDSCAPS(uint32_t caps);
|
---|
310 | uint32_t vboxVHWASupportedDDPFS(uint32_t caps);
|
---|
311 | uint32_t vboxVHWAFromDDCAPS(uint32_t caps);
|
---|
312 | uint32_t vboxVHWAToDDCAPS(uint32_t caps);
|
---|
313 | uint32_t vboxVHWAFromDDSCAPS(uint32_t caps);
|
---|
314 | uint32_t vboxVHWAToDDSCAPS(uint32_t caps);
|
---|
315 | uint32_t vboxVHWAFromDDPFS(uint32_t caps);
|
---|
316 | uint32_t vboxVHWAToDDPFS(uint32_t caps);
|
---|
317 | void vboxVHWAFromDDPIXELFORMAT(VBOXVHWA_PIXELFORMAT *pVHWAFormat, DDPIXELFORMAT *pDdFormat);
|
---|
318 | void vboxVHWAFromRECTL(VBOXVHWA_RECTL *pDst, RECTL *pSrc);
|
---|
319 | PVBOXVHWASURFDESC vboxVHWASurfDescAlloc();
|
---|
320 | void vboxVHWASurfDescFree(PVBOXVHWASURFDESC pDesc);
|
---|
321 |
|
---|
322 | int vboxVHWAEnable(PPDEV ppdev);
|
---|
323 | int vboxVHWADisable(PPDEV ppdev);
|
---|
324 |
|
---|
325 | #endif
|
---|
326 | #endif
|
---|
327 |
|
---|
328 | BOOL bIsScreenSurface (SURFOBJ *pso);
|
---|
329 |
|
---|
330 | __inline SURFOBJ *getSurfObj (SURFOBJ *pso)
|
---|
331 | {
|
---|
332 | if (pso)
|
---|
333 | {
|
---|
334 | PPDEV ppdev = (PPDEV)pso->dhpdev;
|
---|
335 |
|
---|
336 | if (ppdev)
|
---|
337 | {
|
---|
338 | if (ppdev->psoScreenBitmap && pso->hsurf == ppdev->hsurfScreen)
|
---|
339 | {
|
---|
340 | /* Convert the device PSO to the bitmap PSO which can be passed to Eng*. */
|
---|
341 | pso = ppdev->psoScreenBitmap;
|
---|
342 | }
|
---|
343 | }
|
---|
344 | }
|
---|
345 |
|
---|
346 | return pso;
|
---|
347 | }
|
---|
348 |
|
---|
349 | #define CONV_SURF(_pso) getSurfObj (_pso)
|
---|
350 |
|
---|
351 | __inline int format2BytesPerPixel(const SURFOBJ *pso)
|
---|
352 | {
|
---|
353 | switch (pso->iBitmapFormat)
|
---|
354 | {
|
---|
355 | case BMF_16BPP: return 2;
|
---|
356 | case BMF_24BPP: return 3;
|
---|
357 | case BMF_32BPP: return 4;
|
---|
358 | }
|
---|
359 |
|
---|
360 | return 0;
|
---|
361 | }
|
---|
362 |
|
---|
363 | #ifdef VBOX_VBVA_ADJUST_RECT
|
---|
364 | void vrdpAdjustRect (SURFOBJ *pso, RECTL *prcl);
|
---|
365 | BOOL vbvaFindChangedRect (SURFOBJ *psoDest, SURFOBJ *psoSrc, RECTL *prclDest, POINTL *pptlSrc);
|
---|
366 | #endif /* VBOX_VBVA_ADJUST_RECT */
|
---|
367 |
|
---|
368 | void vrdpReportDirtyRect (PPDEV ppdev, RECTL *prcl);
|
---|
369 | void vbvaReportDirtyRect (PPDEV ppdev, RECTL *prcl);
|
---|
370 |
|
---|
371 | #define VRDP_TEXT_MAX_GLYPH_SIZE 0x100
|
---|
372 | #define VRDP_TEXT_MAX_GLYPHS 0xfe
|
---|
373 |
|
---|
374 | BOOL vboxReportText (PPDEV ppdev,
|
---|
375 | VRDPCLIPRECTS *pClipRects,
|
---|
376 | STROBJ *pstro,
|
---|
377 | FONTOBJ *pfo,
|
---|
378 | RECTL *prclOpaque,
|
---|
379 | ULONG ulForeRGB,
|
---|
380 | ULONG ulBackRGB
|
---|
381 | );
|
---|
382 |
|
---|
383 | BOOL vrdpReportOrderGeneric (PPDEV ppdev,
|
---|
384 | const VRDPCLIPRECTS *pClipRects,
|
---|
385 | const void *pvOrder,
|
---|
386 | unsigned cbOrder,
|
---|
387 | unsigned code);
|
---|
388 |
|
---|
389 |
|
---|
390 | #include <iprt/assert.h>
|
---|
391 |
|
---|
392 | #define VBVA_ASSERT(expr) \
|
---|
393 | do { \
|
---|
394 | if (!(expr)) \
|
---|
395 | { \
|
---|
396 | AssertMsg1(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
|
---|
397 | AssertMsg2("!!!\n"); \
|
---|
398 | } \
|
---|
399 | } while (0)
|
---|
400 |
|
---|
401 | #ifdef STAT_sunlover
|
---|
402 | extern ULONG gStatCopyBitsOffscreenToScreen;
|
---|
403 | extern ULONG gStatCopyBitsScreenToScreen;
|
---|
404 | extern ULONG gStatBitBltOffscreenToScreen;
|
---|
405 | extern ULONG gStatBitBltScreenToScreen;
|
---|
406 | extern ULONG gStatUnchangedOffscreenToScreen;
|
---|
407 | extern ULONG gStatUnchangedOffscreenToScreenCRC;
|
---|
408 | extern ULONG gStatNonTransientEngineBitmaps;
|
---|
409 | extern ULONG gStatTransientEngineBitmaps;
|
---|
410 | extern ULONG gStatUnchangedBitmapsCRC;
|
---|
411 | extern ULONG gStatUnchangedBitmapsDeviceCRC;
|
---|
412 | extern ULONG gStatBitmapsCRC;
|
---|
413 | extern ULONG gStatBitBltScreenPattern;
|
---|
414 | extern ULONG gStatBitBltScreenSquare;
|
---|
415 | extern ULONG gStatBitBltScreenPatternReported;
|
---|
416 | extern ULONG gStatBitBltScreenSquareReported;
|
---|
417 | extern ULONG gStatCopyBitsScreenSquare;
|
---|
418 |
|
---|
419 | extern ULONG gStatEnablePDEV;
|
---|
420 | extern ULONG gStatCompletePDEV;
|
---|
421 | extern ULONG gStatDisablePDEV;
|
---|
422 | extern ULONG gStatEnableSurface;
|
---|
423 | extern ULONG gStatDisableSurface;
|
---|
424 | extern ULONG gStatAssertMode;
|
---|
425 | extern ULONG gStatDisableDriver;
|
---|
426 | extern ULONG gStatCreateDeviceBitmap;
|
---|
427 | extern ULONG gStatDeleteDeviceBitmap;
|
---|
428 | extern ULONG gStatDitherColor;
|
---|
429 | extern ULONG gStatStrokePath;
|
---|
430 | extern ULONG gStatFillPath;
|
---|
431 | extern ULONG gStatStrokeAndFillPath;
|
---|
432 | extern ULONG gStatPaint;
|
---|
433 | extern ULONG gStatBitBlt;
|
---|
434 | extern ULONG gStatCopyBits;
|
---|
435 | extern ULONG gStatStretchBlt;
|
---|
436 | extern ULONG gStatSetPalette;
|
---|
437 | extern ULONG gStatTextOut;
|
---|
438 | extern ULONG gStatSetPointerShape;
|
---|
439 | extern ULONG gStatMovePointer;
|
---|
440 | extern ULONG gStatLineTo;
|
---|
441 | extern ULONG gStatSynchronize;
|
---|
442 | extern ULONG gStatGetModes;
|
---|
443 | extern ULONG gStatGradientFill;
|
---|
444 | extern ULONG gStatStretchBltROP;
|
---|
445 | extern ULONG gStatPlgBlt;
|
---|
446 | extern ULONG gStatAlphaBlend;
|
---|
447 | extern ULONG gStatTransparentBlt;
|
---|
448 |
|
---|
449 | void statPrint (void);
|
---|
450 |
|
---|
451 | #define STATDRVENTRY(a, b) do { if (bIsScreenSurface (b)) gStat##a++; } while (0)
|
---|
452 | #define STATPRINT do { statPrint (); } while (0)
|
---|
453 | #else
|
---|
454 | #define STATDRVENTRY(a, b)
|
---|
455 | #define STATPRINT
|
---|
456 | #endif /* STAT_sunlover */
|
---|