VirtualBox

source: vbox/trunk/src/VBox/Main/include/DisplayImpl.h@ 52064

最後變更 在這個檔案從52064是 52064,由 vboxsync 提交於 11 年 前

Main: IDisplay converted to use API wrappers.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 20.9 KB
 
1/* $Id: DisplayImpl.h 52064 2014-07-16 21:23:55Z vboxsync $ */
2/** @file
3 * VirtualBox COM class implementation
4 */
5
6/*
7 * Copyright (C) 2006-2014 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.alldomusa.eu.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 ____H_DISPLAYIMPL
19#define ____H_DISPLAYIMPL
20
21#include "SchemaDefs.h"
22
23#include <iprt/semaphore.h>
24#include <VBox/vmm/pdmdrv.h>
25#include <VBox/VMMDev.h>
26#include <VBox/VBoxVideo.h>
27#include <VBox/vmm/pdmifs.h>
28#include "DisplayWrap.h"
29
30#ifdef VBOX_WITH_CROGL
31# include <VBox/HostServices/VBoxCrOpenGLSvc.h>
32#endif
33
34#include "DisplaySourceBitmapWrap.h"
35
36class Console;
37struct VIDEORECCONTEXT;
38
39typedef struct _DISPLAYFBINFO
40{
41 uint32_t u32Offset;
42 uint32_t u32MaxFramebufferSize;
43 uint32_t u32InformationSize;
44
45 ComPtr<IFramebuffer> pFramebuffer;
46 ComPtr<IDisplaySourceBitmap> pSourceBitmap;
47 bool fDisabled;
48
49 FramebufferUpdateMode_T enmFramebufferUpdateMode;
50
51 struct
52 {
53 ComPtr<IDisplaySourceBitmap> pSourceBitmap;
54 uint8_t *pu8Address;
55 uint32_t cbLine;
56 } updateImage;
57
58 LONG xOrigin;
59 LONG yOrigin;
60
61 ULONG w;
62 ULONG h;
63
64 uint16_t u16BitsPerPixel;
65 uint8_t *pu8FramebufferVRAM;
66 uint32_t u32LineSize;
67
68 uint16_t flags;
69
70 VBOXVIDEOINFOHOSTEVENTS *pHostEvents;
71
72 /** The framebuffer has default format and must be updates immediately. */
73 bool fDefaultFormat;
74
75 struct
76 {
77 /* The rectangle that includes all dirty rectangles. */
78 int32_t xLeft;
79 int32_t xRight;
80 int32_t yTop;
81 int32_t yBottom;
82 } dirtyRect;
83
84#ifdef VBOX_WITH_HGSMI
85 bool fVBVAEnabled;
86 bool fVBVAForceResize;
87 bool fRenderThreadMode;
88 PVBVAHOSTFLAGS pVBVAHostFlags;
89#endif /* VBOX_WITH_HGSMI */
90
91#ifdef VBOX_WITH_CROGL
92 struct
93 {
94 bool fPending;
95 ULONG x;
96 ULONG y;
97 ULONG width;
98 ULONG height;
99 } pendingViewportInfo;
100#endif /* VBOX_WITH_CROGL */
101} DISPLAYFBINFO;
102
103class DisplayMouseInterface
104{
105public:
106 virtual HRESULT i_getScreenResolution(ULONG cScreen, ULONG *pcx,
107 ULONG *pcy, ULONG *pcBPP, LONG *pXOrigin, LONG *pYOrigin) = 0;
108 virtual void i_getFramebufferDimensions(int32_t *px1, int32_t *py1,
109 int32_t *px2, int32_t *py2) = 0;
110};
111
112class VMMDev;
113
114class ATL_NO_VTABLE Display :
115 public DisplayWrap,
116 public DisplayMouseInterface
117{
118public:
119
120 DECLARE_EMPTY_CTOR_DTOR(Display)
121
122 HRESULT FinalConstruct();
123 void FinalRelease();
124
125 // public initializer/uninitializer for internal purposes only
126 HRESULT init(Console *aParent);
127 void uninit();
128 int i_registerSSM(PUVM pUVM);
129
130 // public methods only for internal purposes
131 int i_handleDisplayResize(unsigned uScreenId, uint32_t bpp, void *pvVRAM, uint32_t cbLine,
132 uint32_t w, uint32_t h, uint16_t flags);
133 void i_handleDisplayUpdateLegacy(int x, int y, int cx, int cy);
134 void i_handleDisplayUpdate(unsigned uScreenId, int x, int y, int w, int h);
135#ifdef VBOX_WITH_VIDEOHWACCEL
136 int i_handleVHWACommandProcess(PVBOXVHWACMD pCommand);
137#endif
138#ifdef VBOX_WITH_CRHGSMI
139 void i_handleCrHgsmiCommandCompletion(int32_t result, uint32_t u32Function, PVBOXHGCMSVCPARM pParam);
140 void i_handleCrHgsmiControlCompletion(int32_t result, uint32_t u32Function, PVBOXHGCMSVCPARM pParam);
141 void i_handleCrHgsmiCommandProcess(PVBOXVDMACMD_CHROMIUM_CMD pCmd, uint32_t cbCmd);
142 void i_handleCrHgsmiControlProcess(PVBOXVDMACMD_CHROMIUM_CTL pCtl, uint32_t cbCtl);
143#endif
144#if defined(VBOX_WITH_HGCM) && defined(VBOX_WITH_CROGL)
145 int i_handleCrHgcmCtlSubmit(struct VBOXCRCMDCTL* pCmd, uint32_t cbCmd,
146 PFNCRCTLCOMPLETION pfnCompletion,
147 void *pvCompletion);
148 void i_handleCrVRecScreenshotPerform(uint32_t uScreen,
149 uint32_t x, uint32_t y, uint32_t uPixelFormat, uint32_t uBitsPerPixel,
150 uint32_t uBytesPerLine, uint32_t uGuestWidth, uint32_t uGuestHeight,
151 uint8_t *pu8BufferAddress, uint64_t u64TimeStamp);
152 bool i_handleCrVRecScreenshotBegin(uint32_t uScreen, uint64_t u64TimeStamp);
153 void i_handleCrVRecScreenshotEnd(uint32_t uScreen, uint64_t u64TimeStamp);
154 void i_handleVRecCompletion(int32_t result, uint32_t u32Function, PVBOXHGCMSVCPARM pParam, void *pvContext);
155#endif
156
157 int i_notifyCroglResize(const PVBVAINFOVIEW pView, const PVBVAINFOSCREEN pScreen, void *pvVRAM);
158
159 int i_handleSetVisibleRegion(uint32_t cRect, PRTRECT pRect);
160 int i_handleQueryVisibleRegion(uint32_t *pcRect, PRTRECT pRect);
161
162 int i_VideoAccelEnable(bool fEnable, VBVAMEMORY *pVbvaMemory);
163 void i_VideoAccelFlush(void);
164 bool i_VideoAccelAllowed(void);
165 void i_VideoAccelVRDP(bool fEnable);
166
167 int i_VideoCaptureStart();
168 void i_VideoCaptureStop();
169 int i_VideoCaptureEnableScreens(ComSafeArrayIn(BOOL, aScreens));
170
171 void i_notifyPowerDown(void);
172
173 // DisplayMouseInterface methods
174 virtual HRESULT i_getScreenResolution(ULONG cScreen, ULONG *pcx,
175 ULONG *pcy, ULONG *pcBPP, LONG *pXOrigin, LONG *pYOrigin)
176 {
177 return getScreenResolution(cScreen, pcx, pcy, pcBPP, pXOrigin, pYOrigin);
178 }
179 virtual void i_getFramebufferDimensions(int32_t *px1, int32_t *py1,
180 int32_t *px2, int32_t *py2);
181
182 static const PDMDRVREG DrvReg;
183
184private:
185 // Wrapped IDisplay properties
186
187 // Wrapped IDisplay methods
188 virtual HRESULT getScreenResolution(ULONG aScreenId,
189 ULONG *aWidth,
190 ULONG *aHeight,
191 ULONG *aBitsPerPixel,
192 LONG *aXOrigin,
193 LONG *aYOrigin);
194 virtual HRESULT attachFramebuffer(ULONG aScreenId,
195 const ComPtr<IFramebuffer> &aFramebuffer);
196 virtual HRESULT detachFramebuffer(ULONG aScreenId);
197 virtual HRESULT queryFramebuffer(ULONG aScreenId,
198 ComPtr<IFramebuffer> &aFramebuffer);
199 virtual HRESULT setVideoModeHint(ULONG aDisplay,
200 BOOL aEnabled,
201 BOOL aChangeOrigin,
202 LONG aOriginX,
203 LONG aOriginY,
204 ULONG aWidth,
205 ULONG aHeight,
206 ULONG aBitsPerPixel);
207 virtual HRESULT setSeamlessMode(BOOL aEnabled);
208 virtual HRESULT takeScreenShot(ULONG aScreenId,
209 BYTE *aAddress,
210 ULONG aWidth,
211 ULONG aHeight);
212 virtual HRESULT takeScreenShotToArray(ULONG aScreenId,
213 ULONG aWidth,
214 ULONG aHeight,
215 std::vector<BYTE> &aScreenData);
216 virtual HRESULT takeScreenShotPNGToArray(ULONG aScreenId,
217 ULONG aWidth,
218 ULONG aHeight,
219 std::vector<BYTE> &aScreenData);
220 virtual HRESULT drawToScreen(ULONG aScreenId,
221 BYTE *aAddress,
222 ULONG aX,
223 ULONG aY,
224 ULONG aWidth,
225 ULONG aHeight);
226 virtual HRESULT invalidateAndUpdate();
227 virtual HRESULT completeVHWACommand(BYTE *aCommand);
228 virtual HRESULT viewportChanged(ULONG aScreenId,
229 ULONG aX,
230 ULONG aY,
231 ULONG aWidth,
232 ULONG aHeight);
233 virtual HRESULT querySourceBitmap(ULONG aScreenId,
234 ComPtr<IDisplaySourceBitmap> &aDisplaySourceBitmap);
235 virtual HRESULT setFramebufferUpdateMode(ULONG aScreenId,
236 FramebufferUpdateMode_T aFramebufferUpdateMode);
237
238 // Wrapped IEventListener properties
239
240 // Wrapped IEventListener methods
241 virtual HRESULT handleEvent(const ComPtr<IEvent> &aEvent);
242
243 // other internal methods
244#ifdef VBOX_WITH_CRHGSMI
245 void i_setupCrHgsmiData(void);
246 void i_destructCrHgsmiData(void);
247#endif
248
249#if defined(VBOX_WITH_HGCM) && defined(VBOX_WITH_CROGL)
250 int i_crViewportNotify(ULONG aScreenId, ULONG x, ULONG y, ULONG width, ULONG height);
251#endif
252
253 static DECLCALLBACK(void*) i_drvQueryInterface(PPDMIBASE pInterface, const char *pszIID);
254 static DECLCALLBACK(int) i_drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags);
255 static DECLCALLBACK(void) i_drvDestruct(PPDMDRVINS pDrvIns);
256 static DECLCALLBACK(int) i_displayResizeCallback(PPDMIDISPLAYCONNECTOR pInterface, uint32_t bpp, void *pvVRAM,
257 uint32_t cbLine, uint32_t cx, uint32_t cy);
258 static DECLCALLBACK(void) i_displayUpdateCallback(PPDMIDISPLAYCONNECTOR pInterface,
259 uint32_t x, uint32_t y, uint32_t cx, uint32_t cy);
260 static DECLCALLBACK(void) i_displayRefreshCallback(PPDMIDISPLAYCONNECTOR pInterface);
261 static DECLCALLBACK(void) i_displayResetCallback(PPDMIDISPLAYCONNECTOR pInterface);
262 static DECLCALLBACK(void) i_displayLFBModeChangeCallback(PPDMIDISPLAYCONNECTOR pInterface, bool fEnabled);
263 static DECLCALLBACK(void) i_displayProcessAdapterDataCallback(PPDMIDISPLAYCONNECTOR pInterface,
264 void *pvVRAM, uint32_t u32VRAMSize);
265 static DECLCALLBACK(void) i_displayProcessDisplayDataCallback(PPDMIDISPLAYCONNECTOR pInterface,
266 void *pvVRAM, unsigned uScreenId);
267
268#ifdef VBOX_WITH_VIDEOHWACCEL
269 static DECLCALLBACK(int) i_displayVHWACommandProcess(PPDMIDISPLAYCONNECTOR pInterface, PVBOXVHWACMD pCommand);
270#endif
271
272#ifdef VBOX_WITH_CRHGSMI
273 static DECLCALLBACK(void) i_displayCrHgsmiCommandProcess(PPDMIDISPLAYCONNECTOR pInterface,
274 PVBOXVDMACMD_CHROMIUM_CMD pCmd, uint32_t cbCmd);
275 static DECLCALLBACK(void) i_displayCrHgsmiControlProcess(PPDMIDISPLAYCONNECTOR pInterface, PVBOXVDMACMD_CHROMIUM_CTL pCtl,
276 uint32_t cbCtl);
277
278 static DECLCALLBACK(void) i_displayCrHgsmiCommandCompletion(int32_t result, uint32_t u32Function, PVBOXHGCMSVCPARM pParam,
279 void *pvContext);
280 static DECLCALLBACK(void) i_displayCrHgsmiControlCompletion(int32_t result, uint32_t u32Function, PVBOXHGCMSVCPARM pParam,
281 void *pvContext);
282#endif
283#if defined(VBOX_WITH_HGCM) && defined(VBOX_WITH_CROGL)
284 static DECLCALLBACK(int) i_displayCrHgcmCtlSubmit(PPDMIDISPLAYCONNECTOR pInterface,
285 struct VBOXCRCMDCTL* pCmd, uint32_t cbCmd,
286 PFNCRCTLCOMPLETION pfnCompletion,
287 void *pvCompletion);
288 static DECLCALLBACK(void) i_displayCrHgcmCtlSubmitCompletion(int32_t result, uint32_t u32Function, PVBOXHGCMSVCPARM pParam,
289 void *pvContext);
290#endif
291#ifdef VBOX_WITH_HGSMI
292 static DECLCALLBACK(int) i_displayVBVAEnable(PPDMIDISPLAYCONNECTOR pInterface, unsigned uScreenId,
293 PVBVAHOSTFLAGS pHostFlags, bool fRenderThreadMode);
294 static DECLCALLBACK(void) i_displayVBVADisable(PPDMIDISPLAYCONNECTOR pInterface, unsigned uScreenId);
295 static DECLCALLBACK(void) i_displayVBVAUpdateBegin(PPDMIDISPLAYCONNECTOR pInterface, unsigned uScreenId);
296 static DECLCALLBACK(void) i_displayVBVAUpdateProcess(PPDMIDISPLAYCONNECTOR pInterface, unsigned uScreenId,
297 const PVBVACMDHDR pCmd, size_t cbCmd);
298 static DECLCALLBACK(void) i_displayVBVAUpdateEnd(PPDMIDISPLAYCONNECTOR pInterface, unsigned uScreenId, int32_t x, int32_t y,
299 uint32_t cx, uint32_t cy);
300 static DECLCALLBACK(int) i_displayVBVAResize(PPDMIDISPLAYCONNECTOR pInterface, const PVBVAINFOVIEW pView,
301 const PVBVAINFOSCREEN pScreen, void *pvVRAM);
302 static DECLCALLBACK(int) i_displayVBVAMousePointerShape(PPDMIDISPLAYCONNECTOR pInterface, bool fVisible, bool fAlpha,
303 uint32_t xHot, uint32_t yHot, uint32_t cx, uint32_t cy,
304 const void *pvShape);
305#endif
306
307#if defined(VBOX_WITH_HGCM) && defined(VBOX_WITH_CROGL)
308 static DECLCALLBACK(void) i_displayCrVRecScreenshotPerform(void *pvCtx, uint32_t uScreen,
309 uint32_t x, uint32_t y,
310 uint32_t uBitsPerPixel, uint32_t uBytesPerLine,
311 uint32_t uGuestWidth, uint32_t uGuestHeight,
312 uint8_t *pu8BufferAddress, uint64_t u64TimeStamp);
313 static DECLCALLBACK(bool) i_displayCrVRecScreenshotBegin(void *pvCtx, uint32_t uScreen, uint64_t u64TimeStamp);
314 static DECLCALLBACK(void) i_displayCrVRecScreenshotEnd(void *pvCtx, uint32_t uScreen, uint64_t u64TimeStamp);
315
316 static DECLCALLBACK(void) i_displayVRecCompletion(int32_t result, uint32_t u32Function, PVBOXHGCMSVCPARM pParam,
317 void *pvContext);
318#endif
319 static DECLCALLBACK(void) i_displayCrCmdFree(struct VBOXCRCMDCTL* pCmd, uint32_t cbCmd, int rc, void *pvCompletion);
320
321 static DECLCALLBACK(void) i_displaySSMSaveScreenshot(PSSMHANDLE pSSM, void *pvUser);
322 static DECLCALLBACK(int) i_displaySSMLoadScreenshot(PSSMHANDLE pSSM, void *pvUser, uint32_t uVersion, uint32_t uPass);
323 static DECLCALLBACK(void) i_displaySSMSave(PSSMHANDLE pSSM, void *pvUser);
324 static DECLCALLBACK(int) i_displaySSMLoad(PSSMHANDLE pSSM, void *pvUser, uint32_t uVersion, uint32_t uPass);
325
326 Console * const mParent;
327 /** Pointer to the associated display driver. */
328 struct DRVMAINDISPLAY *mpDrv;
329 /** Pointer to the device instance for the VMM Device. */
330 PPDMDEVINS mpVMMDev;
331 /** Set after the first attempt to find the VMM Device. */
332 bool mfVMMDevInited;
333
334 unsigned mcMonitors;
335 DISPLAYFBINFO maFramebuffers[SchemaDefs::MaxGuestMonitors];
336
337 bool mfSourceBitmapEnabled;
338 bool volatile fVGAResizing;
339
340 VBVAMEMORY *mpVbvaMemory;
341 bool mfVideoAccelEnabled;
342 bool mfVideoAccelVRDP;
343 uint32_t mfu32SupportedOrders;
344
345 int32_t volatile mcVideoAccelVRDPRefs;
346
347 VBVAMEMORY *mpPendingVbvaMemory;
348 bool mfPendingVideoAccelEnable;
349 bool mfMachineRunning;
350#ifdef VBOX_WITH_CROGL
351 bool mfCrOglDataHidden;
352#endif
353
354 uint8_t *mpu8VbvaPartial;
355 uint32_t mcbVbvaPartial;
356
357#ifdef VBOX_WITH_CRHGSMI
358 /* for fast host hgcm calls */
359 HGCMCVSHANDLE mhCrOglSvc;
360 RTCRITSECTRW mCrOglLock;
361#endif
362#ifdef VBOX_WITH_CROGL
363 CR_MAIN_INTERFACE mCrOglCallbacks;
364 volatile uint32_t mfCrOglVideoRecState;
365 CRVBOXHGCMTAKESCREENSHOT mCrOglScreenshotData;
366 VBOXCRCMDCTL_HGCM mCrOglScreenshotCtl;
367#endif
368
369 bool i_vbvaFetchCmd(VBVACMDHDR **ppHdr, uint32_t *pcbCmd);
370 void i_vbvaReleaseCmd(VBVACMDHDR *pHdr, int32_t cbCmd);
371
372 void i_handleResizeCompletedEMT(unsigned uScreenId, BOOL fResizeContext);
373
374 /* Old guest additions (3.x?) use VMMDev for VBVA and the host VBVA code (VideoAccel*)
375 * can be executed concurrently by VGA refresh timer and the guest VMMDev request
376 * in SMP VMs. The lock serialized this.
377 */
378 RTCRITSECT mVBVALock;
379 volatile uint32_t mfu32PendingVideoAccelDisable;
380
381 int i_vbvaLock(void);
382 void i_vbvaUnlock(void);
383
384public:
385
386 bool i_vbvaLockIsOwner(void);
387
388 static int i_displayTakeScreenshotEMT(Display *pDisplay, ULONG aScreenId, uint8_t **ppu8Data, size_t *pcbData,
389 uint32_t *pu32Width, uint32_t *pu32Height);
390
391#if defined(VBOX_WITH_HGCM) && defined(VBOX_WITH_CROGL)
392 static BOOL i_displayCheckTakeScreenshotCrOgl(Display *pDisplay, ULONG aScreenId, uint8_t *pu8Data,
393 uint32_t u32Width, uint32_t u32Height);
394 int i_crCtlSubmit(struct VBOXCRCMDCTL* pCmd, uint32_t cbCmd, PFNCRCTLCOMPLETION pfnCompletion, void *pvCompletion);
395 int i_crCtlSubmitSync(struct VBOXCRCMDCTL* pCmd, uint32_t cbCmd);
396 /* copies the given command and submits it asynchronously,
397 * i.e. the pCmd data may be discarded right after the call returns */
398 int i_crCtlSubmitAsyncCmdCopy(struct VBOXCRCMDCTL* pCmd, uint32_t cbCmd);
399 /* performs synchronous request processing if 3D backend has something to display
400 * this is primarily to work-around 3d<->main thread deadlocks on OSX
401 * in case of async completion, the command is coppied to the allocated buffer,
402 * freeded on command completion
403 * can be used for "notification" commands, when client is not interested in command result,
404 * that must synchronize with 3D backend only when some 3D data is displayed.
405 * The routine does NOT provide any info on whether command is processed asynchronously or not */
406 int i_crCtlSubmitSyncIfHasDataForScreen(uint32_t u32ScreenID, struct VBOXCRCMDCTL* pCmd, uint32_t cbCmd);
407#endif
408
409private:
410 static void i_InvalidateAndUpdateEMT(Display *pDisplay, unsigned uId, bool fUpdateAll);
411 static int i_drawToScreenEMT(Display *pDisplay, ULONG aScreenId, BYTE *address, ULONG x, ULONG y, ULONG width, ULONG height);
412
413 int i_videoAccelRefreshProcess(void);
414
415 /* Functions run under VBVA lock. */
416 int i_videoAccelEnable(bool fEnable, VBVAMEMORY *pVbvaMemory);
417 int i_videoAccelFlush(void);
418
419#if defined(VBOX_WITH_HGCM) && defined(VBOX_WITH_CROGL)
420 int i_crOglWindowsShow(bool fShow);
421#endif
422
423#ifdef VBOX_WITH_HGSMI
424 volatile uint32_t mu32UpdateVBVAFlags;
425#endif
426
427#ifdef VBOX_WITH_VPX
428 VIDEORECCONTEXT *mpVideoRecCtx;
429 bool maVideoRecEnabled[SchemaDefs::MaxGuestMonitors];
430#endif
431};
432
433/* helper function, code in DisplayResampleImage.cpp */
434void gdImageCopyResampled(uint8_t *dst, uint8_t *src,
435 int dstX, int dstY, int srcX, int srcY,
436 int dstW, int dstH, int srcW, int srcH);
437
438void BitmapScale32(uint8_t *dst, int dstW, int dstH,
439 const uint8_t *src, int iDeltaLine, int srcW, int srcH);
440
441/* helper function, code in DisplayPNGUtul.cpp */
442int DisplayMakePNG(uint8_t *pu8Data, uint32_t cx, uint32_t cy,
443 uint8_t **ppu8PNG, uint32_t *pcbPNG, uint32_t *pcxPNG, uint32_t *pcyPNG,
444 uint8_t fLimitSize);
445
446class ATL_NO_VTABLE DisplaySourceBitmap:
447 public DisplaySourceBitmapWrap
448{
449public:
450
451 DECLARE_EMPTY_CTOR_DTOR(DisplaySourceBitmap)
452
453 HRESULT FinalConstruct();
454 void FinalRelease();
455
456 /* Public initializer/uninitializer for internal purposes only. */
457 HRESULT init(ComObjPtr<Display> pDisplay, unsigned uScreenId, DISPLAYFBINFO *pFBInfo);
458 void uninit();
459
460 bool i_usesVRAM(void) { return m.pu8Allocated == NULL; }
461
462private:
463 // wrapped IDisplaySourceBitmap properties
464 virtual HRESULT getScreenId(ULONG *aScreenId);
465
466 // wrapped IDisplaySourceBitmap methods
467 virtual HRESULT queryBitmapInfo(BYTE **aAddress,
468 ULONG *aWidth,
469 ULONG *aHeight,
470 ULONG *aBitsPerPixel,
471 ULONG *aBytesPerLine,
472 ULONG *aPixelFormat);
473
474 int initSourceBitmap(unsigned aScreenId, DISPLAYFBINFO *pFBInfo);
475
476 struct Data
477 {
478 ComObjPtr<Display> pDisplay;
479 unsigned uScreenId;
480 DISPLAYFBINFO *pFBInfo;
481
482 uint8_t *pu8Allocated;
483
484 uint8_t *pu8Address;
485 ULONG ulWidth;
486 ULONG ulHeight;
487 ULONG ulBitsPerPixel;
488 ULONG ulBytesPerLine;
489 ULONG ulPixelFormat;
490 };
491
492 Data m;
493};
494
495#endif // ____H_DISPLAYIMPL
496/* vi: set tabstop=4 shiftwidth=4 expandtab: */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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