VirtualBox

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

Last change on this file since 51576 was 51553, checked in by vboxsync, 11 years ago

Main: removed obsolete SetFramebuffer method.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 18.9 KB
Line 
1/* $Id: DisplayImpl.h 51553 2014-06-05 13:17:41Z 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.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 ____H_DISPLAYIMPL
19#define ____H_DISPLAYIMPL
20
21#include "VirtualBoxBase.h"
22#include "SchemaDefs.h"
23
24#include <iprt/semaphore.h>
25#include <VBox/vmm/pdmdrv.h>
26#include <VBox/VMMDev.h>
27#include <VBox/VBoxVideo.h>
28#include <VBox/vmm/pdmifs.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
39enum
40{
41 ResizeStatus_Void,
42 ResizeStatus_InProgress,
43 ResizeStatus_UpdateDisplayData
44};
45
46typedef struct _DISPLAYFBINFO
47{
48 uint32_t u32Offset;
49 uint32_t u32MaxFramebufferSize;
50 uint32_t u32InformationSize;
51
52 ComPtr<IFramebuffer> pFramebuffer;
53 ComPtr<IDisplaySourceBitmap> pSourceBitmap;
54 bool fDisabled;
55
56 LONG xOrigin;
57 LONG yOrigin;
58
59 ULONG w;
60 ULONG h;
61
62 uint16_t u16BitsPerPixel;
63 uint8_t *pu8FramebufferVRAM;
64 uint32_t u32LineSize;
65
66 uint16_t flags;
67
68 /** For saving the rectangles arrived during fb resize is in progress. */
69 PRTRECT mpSavedVisibleRegion;
70 uint32_t mcSavedVisibleRegion;
71
72 VBOXVIDEOINFOHOSTEVENTS *pHostEvents;
73
74 volatile uint32_t u32ResizeStatus;
75
76 /** The framebuffer has default format and must be updates immediately. */
77 bool fDefaultFormat;
78
79 struct
80 {
81 /* The rectangle that includes all dirty rectangles. */
82 int32_t xLeft;
83 int32_t xRight;
84 int32_t yTop;
85 int32_t yBottom;
86 } dirtyRect;
87
88 struct
89 {
90 bool fPending;
91 ULONG pixelFormat;
92 void *pvVRAM;
93 uint32_t bpp;
94 uint32_t cbLine;
95 uint32_t w;
96 uint32_t h;
97 uint16_t flags;
98 } pendingResize;
99
100#ifdef VBOX_WITH_HGSMI
101 bool fVBVAEnabled;
102 bool fVBVAForceResize;
103 bool fRenderThreadMode;
104 uint32_t cVBVASkipUpdate;
105 struct
106 {
107 int32_t xLeft;
108 int32_t yTop;
109 int32_t xRight;
110 int32_t yBottom;
111 } vbvaSkippedRect;
112 PVBVAHOSTFLAGS pVBVAHostFlags;
113#endif /* VBOX_WITH_HGSMI */
114
115#ifdef VBOX_WITH_CROGL
116 struct
117 {
118 bool fPending;
119 ULONG x;
120 ULONG y;
121 ULONG width;
122 ULONG height;
123 } pendingViewportInfo;
124#endif /* VBOX_WITH_CROGL */
125} DISPLAYFBINFO;
126
127class DisplayMouseInterface
128{
129public:
130 virtual int getScreenResolution(uint32_t cScreen, ULONG *pcx,
131 ULONG *pcy, ULONG *pcBPP, LONG *pXOrigin, LONG *pYOrigin) = 0;
132 virtual void getFramebufferDimensions(int32_t *px1, int32_t *py1,
133 int32_t *px2, int32_t *py2) = 0;
134};
135
136class VMMDev;
137
138class ATL_NO_VTABLE Display :
139 public VirtualBoxBase,
140 VBOX_SCRIPTABLE_IMPL(IEventListener),
141 VBOX_SCRIPTABLE_IMPL(IDisplay),
142 public DisplayMouseInterface
143{
144public:
145
146 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(Display, IDisplay)
147
148 DECLARE_NOT_AGGREGATABLE(Display)
149
150 DECLARE_PROTECT_FINAL_CONSTRUCT()
151
152 BEGIN_COM_MAP(Display)
153 VBOX_DEFAULT_INTERFACE_ENTRIES(IDisplay)
154 COM_INTERFACE_ENTRY(IEventListener)
155 END_COM_MAP()
156
157 DECLARE_EMPTY_CTOR_DTOR(Display)
158
159 HRESULT FinalConstruct();
160 void FinalRelease();
161
162 // public initializer/uninitializer for internal purposes only
163 HRESULT init(Console *aParent);
164 void uninit();
165 int registerSSM(PUVM pUVM);
166
167 // public methods only for internal purposes
168 int handleDisplayResize(unsigned uScreenId, uint32_t bpp, void *pvVRAM, uint32_t cbLine, uint32_t w, uint32_t h, uint16_t flags);
169 void handleDisplayUpdateLegacy(int x, int y, int cx, int cy);
170 void handleDisplayUpdate(unsigned uScreenId, int x, int y, int w, int h);
171#ifdef VBOX_WITH_VIDEOHWACCEL
172 int handleVHWACommandProcess(PVBOXVHWACMD pCommand);
173#endif
174#ifdef VBOX_WITH_CRHGSMI
175 void handleCrHgsmiCommandCompletion(int32_t result, uint32_t u32Function, PVBOXHGCMSVCPARM pParam);
176 void handleCrHgsmiControlCompletion(int32_t result, uint32_t u32Function, PVBOXHGCMSVCPARM pParam);
177 void handleCrHgsmiCommandProcess(PVBOXVDMACMD_CHROMIUM_CMD pCmd, uint32_t cbCmd);
178 void handleCrHgsmiControlProcess(PVBOXVDMACMD_CHROMIUM_CTL pCtl, uint32_t cbCtl);
179#endif
180#if defined(VBOX_WITH_HGCM) && defined(VBOX_WITH_CROGL)
181 int handleCrHgcmCtlSubmit(struct VBOXCRCMDCTL* pCmd, uint32_t cbCmd,
182 PFNCRCTLCOMPLETION pfnCompletion,
183 void *pvCompletion);
184 void handleCrVRecScreenshotPerform(uint32_t uScreen,
185 uint32_t x, uint32_t y, uint32_t uPixelFormat, uint32_t uBitsPerPixel,
186 uint32_t uBytesPerLine, uint32_t uGuestWidth, uint32_t uGuestHeight,
187 uint8_t *pu8BufferAddress, uint64_t u64TimeStamp);
188 bool handleCrVRecScreenshotBegin(uint32_t uScreen, uint64_t u64TimeStamp);
189 void handleCrVRecScreenshotEnd(uint32_t uScreen, uint64_t u64TimeStamp);
190 void handleVRecCompletion(int32_t result, uint32_t u32Function, PVBOXHGCMSVCPARM pParam, void *pvContext);
191#endif
192
193 int notifyCroglResize(const PVBVAINFOVIEW pView, const PVBVAINFOSCREEN pScreen, void *pvVRAM);
194
195 void getFramebufferDimensions(int32_t *px1, int32_t *py1, int32_t *px2, int32_t *py2);
196 int getScreenResolution(uint32_t cScreen, ULONG *pcx, ULONG *pcy,
197 ULONG *pcBPP, LONG *pXOrigin, LONG *pYOrigin)
198 {
199 return GetScreenResolution(cScreen, pcx, pcy, pcBPP, pXOrigin, pYOrigin);
200 }
201
202 int handleSetVisibleRegion(uint32_t cRect, PRTRECT pRect);
203 int handleQueryVisibleRegion(uint32_t *pcRect, PRTRECT pRect);
204
205 int VideoAccelEnable(bool fEnable, VBVAMEMORY *pVbvaMemory);
206 void VideoAccelFlush(void);
207 bool VideoAccelAllowed(void);
208 void VideoAccelVRDP(bool fEnable);
209
210 int VideoCaptureStart();
211 void VideoCaptureStop();
212 int VideoCaptureEnableScreens(ComSafeArrayIn(BOOL, aScreens));
213
214 void notifyPowerDown(void);
215
216 // IEventListener methods
217 STDMETHOD(HandleEvent)(IEvent * aEvent);
218
219 // IDisplay methods
220 STDMETHOD(GetScreenResolution)(ULONG aScreenId, ULONG *aWidth, ULONG *aHeight, ULONG *aBitsPerPixel, LONG *aXOrigin, LONG *aYOrigin);
221 STDMETHOD(AttachFramebuffer)(ULONG aScreenId,
222 IFramebuffer *aFramebuffer);
223 STDMETHOD(DetachFramebuffer)(ULONG aScreenId);
224 STDMETHOD(QueryFramebuffer)(ULONG aScreenId,
225 IFramebuffer **aFramebuffer);
226 STDMETHOD(SetVideoModeHint)(ULONG aDisplay, BOOL aEnabled, BOOL aChangeOrigin, LONG aOriginX, LONG aOriginY, ULONG aWidth, ULONG aHeight, ULONG aBitsPerPixel);
227 STDMETHOD(TakeScreenShot)(ULONG aScreenId, BYTE *address, ULONG width, ULONG height);
228 STDMETHOD(TakeScreenShotToArray)(ULONG aScreenId, ULONG width, ULONG height, ComSafeArrayOut(BYTE, aScreenData));
229 STDMETHOD(TakeScreenShotPNGToArray)(ULONG aScreenId, ULONG width, ULONG height, ComSafeArrayOut(BYTE, aScreenData));
230 STDMETHOD(DrawToScreen)(ULONG aScreenId, BYTE *address, ULONG x, ULONG y, ULONG width, ULONG height);
231 STDMETHOD(InvalidateAndUpdate)();
232 STDMETHOD(SetSeamlessMode)(BOOL enabled);
233
234 STDMETHOD(CompleteVHWACommand)(BYTE *pCommand);
235
236 STDMETHOD(ViewportChanged)(ULONG aScreenId, ULONG x, ULONG y, ULONG width, ULONG height);
237 STDMETHOD(QuerySourceBitmap)(ULONG aScreenId,
238 IDisplaySourceBitmap **aDisplaySourceBitmap);
239
240 static const PDMDRVREG DrvReg;
241
242private:
243
244 HRESULT querySourceBitmap(ULONG aScreenId,
245 IDisplaySourceBitmap **ppDisplaySourceBitmap);
246
247#ifdef VBOX_WITH_CRHGSMI
248 void setupCrHgsmiData(void);
249 void destructCrHgsmiData(void);
250#endif
251
252#if defined(VBOX_WITH_HGCM) && defined(VBOX_WITH_CROGL)
253 int crViewportNotify(ULONG aScreenId, ULONG x, ULONG y, ULONG width, ULONG height);
254#endif
255
256 static DECLCALLBACK(void*) drvQueryInterface(PPDMIBASE pInterface, const char *pszIID);
257 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags);
258 static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns);
259 static DECLCALLBACK(int) displayResizeCallback(PPDMIDISPLAYCONNECTOR pInterface, uint32_t bpp, void *pvVRAM, uint32_t cbLine, uint32_t cx, uint32_t cy);
260 static DECLCALLBACK(void) displayUpdateCallback(PPDMIDISPLAYCONNECTOR pInterface,
261 uint32_t x, uint32_t y, uint32_t cx, uint32_t cy);
262 static DECLCALLBACK(void) displayRefreshCallback(PPDMIDISPLAYCONNECTOR pInterface);
263 static DECLCALLBACK(void) displayResetCallback(PPDMIDISPLAYCONNECTOR pInterface);
264 static DECLCALLBACK(void) displayLFBModeChangeCallback(PPDMIDISPLAYCONNECTOR pInterface, bool fEnabled);
265 static DECLCALLBACK(void) displayProcessAdapterDataCallback(PPDMIDISPLAYCONNECTOR pInterface, void *pvVRAM, uint32_t u32VRAMSize);
266 static DECLCALLBACK(void) displayProcessDisplayDataCallback(PPDMIDISPLAYCONNECTOR pInterface, void *pvVRAM, unsigned uScreenId);
267
268#ifdef VBOX_WITH_VIDEOHWACCEL
269 static DECLCALLBACK(int) displayVHWACommandProcess(PPDMIDISPLAYCONNECTOR pInterface, PVBOXVHWACMD pCommand);
270#endif
271
272#ifdef VBOX_WITH_CRHGSMI
273 static DECLCALLBACK(void) displayCrHgsmiCommandProcess(PPDMIDISPLAYCONNECTOR pInterface, PVBOXVDMACMD_CHROMIUM_CMD pCmd, uint32_t cbCmd);
274 static DECLCALLBACK(void) displayCrHgsmiControlProcess(PPDMIDISPLAYCONNECTOR pInterface, PVBOXVDMACMD_CHROMIUM_CTL pCtl, uint32_t cbCtl);
275
276 static DECLCALLBACK(void) displayCrHgsmiCommandCompletion(int32_t result, uint32_t u32Function, PVBOXHGCMSVCPARM pParam, void *pvContext);
277 static DECLCALLBACK(void) displayCrHgsmiControlCompletion(int32_t result, uint32_t u32Function, PVBOXHGCMSVCPARM pParam, void *pvContext);
278#endif
279#if defined(VBOX_WITH_HGCM) && defined(VBOX_WITH_CROGL)
280 static DECLCALLBACK(int) displayCrHgcmCtlSubmit(PPDMIDISPLAYCONNECTOR pInterface,
281 struct VBOXCRCMDCTL* pCmd, uint32_t cbCmd,
282 PFNCRCTLCOMPLETION pfnCompletion,
283 void *pvCompletion);
284 static DECLCALLBACK(void) displayCrHgcmCtlSubmitCompletion(int32_t result, uint32_t u32Function, PVBOXHGCMSVCPARM pParam, void *pvContext);
285#endif
286#ifdef VBOX_WITH_HGSMI
287 static DECLCALLBACK(int) displayVBVAEnable(PPDMIDISPLAYCONNECTOR pInterface, unsigned uScreenId, PVBVAHOSTFLAGS pHostFlags, bool fRenderThreadMode);
288 static DECLCALLBACK(void) displayVBVADisable(PPDMIDISPLAYCONNECTOR pInterface, unsigned uScreenId);
289 static DECLCALLBACK(void) displayVBVAUpdateBegin(PPDMIDISPLAYCONNECTOR pInterface, unsigned uScreenId);
290 static DECLCALLBACK(void) displayVBVAUpdateProcess(PPDMIDISPLAYCONNECTOR pInterface, unsigned uScreenId, const PVBVACMDHDR pCmd, size_t cbCmd);
291 static DECLCALLBACK(void) displayVBVAUpdateEnd(PPDMIDISPLAYCONNECTOR pInterface, unsigned uScreenId, int32_t x, int32_t y, uint32_t cx, uint32_t cy);
292 static DECLCALLBACK(int) displayVBVAResize(PPDMIDISPLAYCONNECTOR pInterface, const PVBVAINFOVIEW pView, const PVBVAINFOSCREEN pScreen, void *pvVRAM);
293 static DECLCALLBACK(int) displayVBVAMousePointerShape(PPDMIDISPLAYCONNECTOR pInterface, bool fVisible, bool fAlpha, uint32_t xHot, uint32_t yHot, uint32_t cx, uint32_t cy, const void *pvShape);
294#endif
295
296#if defined(VBOX_WITH_HGCM) && defined(VBOX_WITH_CROGL)
297 static DECLCALLBACK(void) displayCrVRecScreenshotPerform(void *pvCtx, uint32_t uScreen,
298 uint32_t x, uint32_t y,
299 uint32_t uBitsPerPixel, uint32_t uBytesPerLine,
300 uint32_t uGuestWidth, uint32_t uGuestHeight,
301 uint8_t *pu8BufferAddress, uint64_t u64TimeStamp);
302 static DECLCALLBACK(bool) displayCrVRecScreenshotBegin(void *pvCtx, uint32_t uScreen, uint64_t u64TimeStamp);
303 static DECLCALLBACK(void) displayCrVRecScreenshotEnd(void *pvCtx, uint32_t uScreen, uint64_t u64TimeStamp);
304
305 static DECLCALLBACK(void) displayVRecCompletion(int32_t result, uint32_t u32Function, PVBOXHGCMSVCPARM pParam, void *pvContext);
306#endif
307 static DECLCALLBACK(void) displayCrCmdFree(struct VBOXCRCMDCTL* pCmd, uint32_t cbCmd, int rc, void *pvCompletion);
308
309 static DECLCALLBACK(void) displaySSMSaveScreenshot(PSSMHANDLE pSSM, void *pvUser);
310 static DECLCALLBACK(int) displaySSMLoadScreenshot(PSSMHANDLE pSSM, void *pvUser, uint32_t uVersion, uint32_t uPass);
311 static DECLCALLBACK(void) displaySSMSave(PSSMHANDLE pSSM, void *pvUser);
312 static DECLCALLBACK(int) displaySSMLoad(PSSMHANDLE pSSM, void *pvUser, uint32_t uVersion, uint32_t uPass);
313
314 Console * const mParent;
315 /** Pointer to the associated display driver. */
316 struct DRVMAINDISPLAY *mpDrv;
317 /** Pointer to the device instance for the VMM Device. */
318 PPDMDEVINS mpVMMDev;
319 /** Set after the first attempt to find the VMM Device. */
320 bool mfVMMDevInited;
321
322 unsigned mcMonitors;
323 DISPLAYFBINFO maFramebuffers[SchemaDefs::MaxGuestMonitors];
324
325 bool mfSourceBitmapEnabled;
326
327 /* arguments of the last handleDisplayResize() call */
328 void *mLastAddress;
329 uint32_t mLastBytesPerLine;
330 uint32_t mLastBitsPerPixel;
331 uint32_t mLastWidth;
332 uint32_t mLastHeight;
333 uint16_t mLastFlags;
334
335 VBVAMEMORY *mpVbvaMemory;
336 bool mfVideoAccelEnabled;
337 bool mfVideoAccelVRDP;
338 uint32_t mfu32SupportedOrders;
339
340 int32_t volatile mcVideoAccelVRDPRefs;
341
342 VBVAMEMORY *mpPendingVbvaMemory;
343 bool mfPendingVideoAccelEnable;
344 bool mfMachineRunning;
345#ifdef VBOX_WITH_CROGL
346 bool mfCrOglDataHidden;
347#endif
348
349 uint8_t *mpu8VbvaPartial;
350 uint32_t mcbVbvaPartial;
351
352#ifdef VBOX_WITH_CRHGSMI
353 /* for fast host hgcm calls */
354 HGCMCVSHANDLE mhCrOglSvc;
355 RTCRITSECTRW mCrOglLock;
356#endif
357#ifdef VBOX_WITH_CROGL
358 CR_MAIN_INTERFACE mCrOglCallbacks;
359 volatile uint32_t mfCrOglVideoRecState;
360 CRVBOXHGCMTAKESCREENSHOT mCrOglScreenshotData;
361 VBOXCRCMDCTL_HGCM mCrOglScreenshotCtl;
362#endif
363
364 bool vbvaFetchCmd(VBVACMDHDR **ppHdr, uint32_t *pcbCmd);
365 void vbvaReleaseCmd(VBVACMDHDR *pHdr, int32_t cbCmd);
366
367 void handleResizeCompletedEMT(unsigned uScreenId, BOOL fResizeContext);
368
369 RTCRITSECT mVBVALock;
370 volatile uint32_t mfu32PendingVideoAccelDisable;
371
372 int vbvaLock(void);
373 void vbvaUnlock(void);
374
375 RTCRITSECT mSaveSeamlessRectLock;
376 int SaveSeamlessRectLock(void);
377 void SaveSeamlessRectUnLock(void);
378
379public:
380 static int displayTakeScreenshotEMT(Display *pDisplay, ULONG aScreenId, uint8_t **ppu8Data, size_t *pcbData, uint32_t *pu32Width, uint32_t *pu32Height);
381
382#if defined(VBOX_WITH_HGCM) && defined(VBOX_WITH_CROGL)
383 static BOOL displayCheckTakeScreenshotCrOgl(Display *pDisplay, ULONG aScreenId, uint8_t *pu8Data, uint32_t u32Width, uint32_t u32Height);
384 int crCtlSubmit(struct VBOXCRCMDCTL* pCmd, uint32_t cbCmd, PFNCRCTLCOMPLETION pfnCompletion, void *pvCompletion);
385 int crCtlSubmitSync(struct VBOXCRCMDCTL* pCmd, uint32_t cbCmd);
386 /* copies the given command and submits it asynchronously,
387 * i.e. the pCmd data may be discarded right after the call returns */
388 int crCtlSubmitAsyncCmdCopy(struct VBOXCRCMDCTL* pCmd, uint32_t cbCmd);
389 /* performs synchronous request processing if 3D backend has something to display
390 * this is primarily to work-around 3d<->main thread deadlocks on OSX
391 * in case of async completion, the command is coppied to the allocated buffer,
392 * freeded on command completion
393 * can be used for "notification" commands, when client is not interested in command result,
394 * that must synchronize with 3D backend only when some 3D data is displayed.
395 * The routine does NOT provide any info on whether command is processed asynchronously or not */
396 int crCtlSubmitSyncIfHasDataForScreen(uint32_t u32ScreenID, struct VBOXCRCMDCTL* pCmd, uint32_t cbCmd);
397#endif
398
399private:
400 static void InvalidateAndUpdateEMT(Display *pDisplay, unsigned uId, bool fUpdateAll);
401 static int drawToScreenEMT(Display *pDisplay, ULONG aScreenId, BYTE *address, ULONG x, ULONG y, ULONG width, ULONG height);
402
403 int videoAccelRefreshProcess(void);
404
405 /* Functions run under VBVA lock. */
406 int videoAccelEnable(bool fEnable, VBVAMEMORY *pVbvaMemory);
407 void videoAccelFlush(void);
408
409#if defined(VBOX_WITH_HGCM) && defined(VBOX_WITH_CROGL)
410 int crOglWindowsShow(bool fShow);
411#endif
412
413#ifdef VBOX_WITH_HGSMI
414 volatile uint32_t mu32UpdateVBVAFlags;
415#endif
416
417#ifdef VBOX_WITH_VPX
418 VIDEORECCONTEXT *mpVideoRecCtx;
419 bool maVideoRecEnabled[SchemaDefs::MaxGuestMonitors];
420#endif
421};
422
423void gdImageCopyResampled(uint8_t *dst, uint8_t *src,
424 int dstX, int dstY, int srcX, int srcY,
425 int dstW, int dstH, int srcW, int srcH);
426
427void BitmapScale32(uint8_t *dst, int dstW, int dstH,
428 const uint8_t *src, int iDeltaLine, int srcW, int srcH);
429
430int DisplayMakePNG(uint8_t *pu8Data, uint32_t cx, uint32_t cy,
431 uint8_t **ppu8PNG, uint32_t *pcbPNG, uint32_t *pcxPNG, uint32_t *pcyPNG,
432 uint8_t fLimitSize);
433
434class ATL_NO_VTABLE DisplaySourceBitmap:
435 public DisplaySourceBitmapWrap
436{
437public:
438
439 DECLARE_EMPTY_CTOR_DTOR(DisplaySourceBitmap)
440
441 HRESULT FinalConstruct();
442 void FinalRelease();
443
444 /* Public initializer/uninitializer for internal purposes only. */
445 HRESULT init(ComObjPtr<Display> pDisplay, unsigned uScreenId, DISPLAYFBINFO *pFBInfo);
446 void uninit();
447
448 bool usesVRAM(void) { return m.pu8Allocated == NULL; }
449
450private:
451 // wrapped IDisplaySourceBitmap properties
452 virtual HRESULT getScreenId(ULONG *aScreenId);
453
454 // wrapped IDisplaySourceBitmap methods
455 virtual HRESULT queryBitmapInfo(BYTE **aAddress,
456 ULONG *aWidth,
457 ULONG *aHeight,
458 ULONG *aBitsPerPixel,
459 ULONG *aBytesPerLine,
460 ULONG *aPixelFormat);
461
462 int initSourceBitmap(unsigned aScreenId, DISPLAYFBINFO *pFBInfo);
463
464 struct Data
465 {
466 ComObjPtr<Display> pDisplay;
467 unsigned uScreenId;
468 DISPLAYFBINFO *pFBInfo;
469
470 uint8_t *pu8Allocated;
471
472 uint8_t *pu8Address;
473 ULONG ulWidth;
474 ULONG ulHeight;
475 ULONG ulBitsPerPixel;
476 ULONG ulBytesPerLine;
477 ULONG ulPixelFormat;
478 };
479
480 Data m;
481};
482
483#endif // ____H_DISPLAYIMPL
484/* vi: set tabstop=4 shiftwidth=4 expandtab: */
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