Changeset 3761 in vbox for trunk/src/VBox/Main
- Timestamp:
- Jul 22, 2007 10:43:14 AM (17 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleVRDPServer.cpp
r3720 r3761 633 633 634 634 ULONG bitsPerPixel = 0; 635 pfb->COMGETTER( ColorDepth) (&bitsPerPixel);635 pfb->COMGETTER(BitsPerPixel) (&bitsPerPixel); 636 636 637 637 BYTE *address = NULL; -
trunk/src/VBox/Main/DisplayImpl.cpp
r3681 r3761 86 86 87 87 mLastAddress = NULL; 88 mLast LineSize = 0;89 mLast ColorDepth= 0,88 mLastBytesPerLine = 0; 89 mLastBitsPerPixel = 0, 90 90 mLastWidth = 0; 91 91 mLastHeight = 0; … … 222 222 * @thread EMT 223 223 */ 224 static int callFramebufferResize (IFramebuffer *pFramebuffer, unsigned uScreenId, FramebufferPixelFormat_T pixelFormat, void *pvVRAM, uint32_t cbLine, int w, int h) 224 static int callFramebufferResize (IFramebuffer *pFramebuffer, unsigned uScreenId, 225 ULONG pixelFormat, void *pvVRAM, 226 uint32_t bpp, uint32_t cbLine, 227 int w, int h) 225 228 { 226 229 Assert (pFramebuffer); … … 229 232 BOOL finished = TRUE; 230 233 231 pFramebuffer->RequestResize (uScreenId, pixelFormat, (BYTE *) pvVRAM, cbLine, w, h, &finished); 234 pFramebuffer->RequestResize (uScreenId, pixelFormat, (BYTE *) pvVRAM, 235 bpp, cbLine, w, h, &finished); 232 236 233 237 if (!finished) … … 252 256 * @thread EMT 253 257 */ 254 int Display::handleDisplayResize (unsigned uScreenId, uint32_t bpp, void *pvVRAM, uint32_t cbLine, int w, int h) 255 { 256 LogRel (("Display::handleDisplayResize(): uScreenId = %d, pvVRAM=%p w=%d h=%d bpp=%d cbLine=0x%X\n", 258 int Display::handleDisplayResize (unsigned uScreenId, uint32_t bpp, void *pvVRAM, 259 uint32_t cbLine, int w, int h) 260 { 261 LogRel (("Display::handleDisplayResize(): uScreenId = %d, pvVRAM=%p " 262 "w=%d h=%d bpp=%d cbLine=0x%X\n", 257 263 uScreenId, pvVRAM, w, h, bpp, cbLine)); 258 264 … … 265 271 266 272 mLastAddress = pvVRAM; 267 mLast LineSize = cbLine;268 mLast ColorDepth= bpp,273 mLastBytesPerLine = cbLine; 274 mLastBitsPerPixel = bpp, 269 275 mLastWidth = w; 270 276 mLastHeight = h; 271 277 272 FramebufferPixelFormat_TpixelFormat;278 ULONG pixelFormat; 273 279 274 280 switch (bpp) 275 281 { 276 case 32: pixelFormat = FramebufferPixelFormat_PixelFormatRGB32; break; 277 case 24: pixelFormat = FramebufferPixelFormat_PixelFormatRGB24; break; 278 case 16: pixelFormat = FramebufferPixelFormat_PixelFormatRGB16; break; 279 default: pixelFormat = FramebufferPixelFormat_PixelFormatOpaque; cbLine = 0; 282 case 32: 283 case 24: 284 case 16: 285 pixelFormat = FramebufferPixelFormat_FOURCC_RGB; 286 break; 287 default: 288 pixelFormat = FramebufferPixelFormat_PixelFormatOpaque; 289 bpp = cbLine = 0; 290 break; 280 291 } 281 292 … … 283 294 * disable access to the VGA device by the EMT thread. 284 295 */ 285 bool f = ASMAtomicCmpXchgU32 (&maFramebuffers[uScreenId].u32ResizeStatus, ResizeStatus_InProgress, ResizeStatus_Void); 296 bool f = ASMAtomicCmpXchgU32 (&maFramebuffers[uScreenId].u32ResizeStatus, 297 ResizeStatus_InProgress, ResizeStatus_Void); 286 298 AssertReleaseMsg(f, ("f = %d\n", f));NOREF(f); 287 299 … … 291 303 maFramebuffers[uScreenId].pFramebuffer->Lock(); 292 304 293 int rc = callFramebufferResize (maFramebuffers[uScreenId].pFramebuffer, uScreenId, pixelFormat, pvVRAM, cbLine, w, h); 305 int rc = callFramebufferResize (maFramebuffers[uScreenId].pFramebuffer, uScreenId, 306 pixelFormat, pvVRAM, bpp, cbLine, w, h); 294 307 if (rc == VINF_VGA_RESIZE_IN_PROGRESS) 295 308 { … … 303 316 304 317 /* Set the status so the 'handleResizeCompleted' would work. */ 305 f = ASMAtomicCmpXchgU32 (&maFramebuffers[uScreenId].u32ResizeStatus, ResizeStatus_UpdateDisplayData, ResizeStatus_InProgress); 318 f = ASMAtomicCmpXchgU32 (&maFramebuffers[uScreenId].u32ResizeStatus, 319 ResizeStatus_UpdateDisplayData, ResizeStatus_InProgress); 306 320 AssertRelease(f);NOREF(f); 307 321 … … 342 356 343 357 /* Check the framebuffer pixel format to setup the rendering in VGA device. */ 344 FramebufferPixelFormat_T newPixelFormat;345 pFBInfo->pFramebuffer->COMGETTER( PixelFormat) (&newPixelFormat);346 347 pFBInfo->fDefaultFormat = ( newPixelFormat == FramebufferPixelFormat_PixelFormatOpaque);358 BOOL usesGuestVRAM = FALSE; 359 pFBInfo->pFramebuffer->COMGETTER(UsesGuestVRAM) (&usesGuestVRAM); 360 361 pFBInfo->fDefaultFormat = (usesGuestVRAM == FALSE); 348 362 349 363 mpDrv->pUpPort->pfnSetRenderVRAM (mpDrv->pUpPort, pFBInfo->fDefaultFormat); … … 1265 1279 * 1266 1280 * @returns COM status code 1267 * @param colorDepthAddress of result variable.1268 */ 1269 STDMETHODIMP Display::COMGETTER( ColorDepth) (ULONG *colorDepth)1270 { 1271 if (! colorDepth)1281 * @param bitsPerPixel Address of result variable. 1282 */ 1283 STDMETHODIMP Display::COMGETTER(BitsPerPixel) (ULONG *bitsPerPixel) 1284 { 1285 if (!bitsPerPixel) 1272 1286 return E_INVALIDARG; 1273 1287 … … 1280 1294 int rc = mpDrv->pUpPort->pfnQueryColorDepth(mpDrv->pUpPort, &cBits); 1281 1295 AssertRC(rc); 1282 * colorDepth= cBits;1296 *bitsPerPixel = cBits; 1283 1297 return S_OK; 1284 1298 } … … 1481 1495 } 1482 1496 1483 STDMETHODIMP Display::SetVideoModeHint(ULONG aWidth, ULONG aHeight, ULONG a ColorDepth, ULONG aDisplay)1497 STDMETHODIMP Display::SetVideoModeHint(ULONG aWidth, ULONG aHeight, ULONG aBitsPerPixel, ULONG aDisplay) 1484 1498 { 1485 1499 AutoLock lock(this); … … 1497 1511 if (!height) 1498 1512 height = mpDrv->Connector.cy; 1499 ULONG bpp = a ColorDepth;1513 ULONG bpp = aBitsPerPixel; 1500 1514 if (!bpp) 1501 1515 { … … 1522 1536 lock.leave (); 1523 1537 if (mParent->getVMMDev()) 1524 mParent->getVMMDev()->getVMMDevPort()->pfnRequestDisplayChange(mParent->getVMMDev()->getVMMDevPort(), aWidth, aHeight, a ColorDepth, aDisplay);1538 mParent->getVMMDev()->getVMMDevPort()->pfnRequestDisplayChange(mParent->getVMMDev()->getVMMDevPort(), aWidth, aHeight, aBitsPerPixel, aDisplay); 1525 1539 return S_OK; 1526 1540 } … … 1805 1819 rc = pFramebuffer->COMGETTER(Address) (&address); 1806 1820 AssertComRC (rc); 1807 ULONG lineSize = 0;1808 rc = pFramebuffer->COMGETTER( LineSize) (&lineSize);1821 ULONG bytesPerLine = 0; 1822 rc = pFramebuffer->COMGETTER(BytesPerLine) (&bytesPerLine); 1809 1823 AssertComRC (rc); 1810 ULONG colorDepth= 0;1811 rc = pFramebuffer->COMGETTER( ColorDepth) (&colorDepth);1824 ULONG bitsPerPixel = 0; 1825 rc = pFramebuffer->COMGETTER(BitsPerPixel) (&bitsPerPixel); 1812 1826 AssertComRC (rc); 1813 1827 ULONG width = 0; … … 1826 1840 if (aCheckParams && 1827 1841 (mLastAddress != address || 1828 mLast LineSize != lineSize ||1829 mLast ColorDepth != colorDepth||1842 mLastBytesPerLine != bytesPerLine || 1843 mLastBitsPerPixel != bitsPerPixel || 1830 1844 mLastWidth != (int) width || 1831 1845 mLastHeight != (int) height)) 1832 1846 { 1833 handleDisplayResize (VBOX_VIDEO_PRIMARY_SCREEN, mLast ColorDepth,1847 handleDisplayResize (VBOX_VIDEO_PRIMARY_SCREEN, mLastBitsPerPixel, 1834 1848 mLastAddress, 1835 mLast LineSize,1849 mLastBytesPerLine, 1836 1850 mLastWidth, 1837 1851 mLastHeight); … … 1840 1854 1841 1855 mpDrv->Connector.pu8Data = (uint8_t *) address; 1842 mpDrv->Connector.cbScanline = lineSize;1843 mpDrv->Connector.cBits = colorDepth;1856 mpDrv->Connector.cbScanline = bytesPerLine; 1857 mpDrv->Connector.cBits = bitsPerPixel; 1844 1858 mpDrv->Connector.cx = width; 1845 1859 mpDrv->Connector.cy = height; … … 2335 2349 pData->pDisplay->mpVMMDev = NULL; 2336 2350 pData->pDisplay->mLastAddress = NULL; 2337 pData->pDisplay->mLast LineSize = 0;2338 pData->pDisplay->mLast ColorDepth= 0,2351 pData->pDisplay->mLastBytesPerLine = 0; 2352 pData->pDisplay->mLastBitsPerPixel = 0, 2339 2353 pData->pDisplay->mLastWidth = 0; 2340 2354 pData->pDisplay->mLastHeight = 0; -
trunk/src/VBox/Main/FramebufferImpl.cpp
r3611 r3761 46 46 mWidth = width; 47 47 mHeight = height; 48 m Depth= depth;49 m LineSize = ((width * depth + 31) / 32) * 4;50 mData = new uint8_t [mLineSize * height];51 memset (mData, 0, mLineSize * height);48 mBitsPerPixel = depth; 49 mBytesPerLine = ((width * depth + 31) / 32) * 4; 50 mData = new uint8_t [mBytesPerLine * height]; 51 memset (mData, 0, mBytesPerLine * height); 52 52 53 53 return S_OK; … … 81 81 } 82 82 83 STDMETHODIMP InternalFramebuffer::COMGETTER( ColorDepth) (ULONG *colorDepth)84 { 85 if (! colorDepth)86 return E_POINTER; 87 * colorDepth = mDepth;88 return S_OK; 89 } 90 91 STDMETHODIMP InternalFramebuffer::COMGETTER( LineSize) (ULONG *lineSize)92 { 93 if (! lineSize)94 return E_POINTER; 95 * lineSize = mLineSize;96 return S_OK; 97 } 98 99 STDMETHODIMP InternalFramebuffer::COMGETTER(PixelFormat) ( FramebufferPixelFormat_T*pixelFormat)83 STDMETHODIMP InternalFramebuffer::COMGETTER(BitsPerPixel) (ULONG *bitsPerPixel) 84 { 85 if (!bitsPerPixel) 86 return E_POINTER; 87 *bitsPerPixel = mBitsPerPixel; 88 return S_OK; 89 } 90 91 STDMETHODIMP InternalFramebuffer::COMGETTER(BytesPerLine) (ULONG *bytesPerLine) 92 { 93 if (!bytesPerLine) 94 return E_POINTER; 95 *bytesPerLine = mBytesPerLine; 96 return S_OK; 97 } 98 99 STDMETHODIMP InternalFramebuffer::COMGETTER(PixelFormat) (ULONG *pixelFormat) 100 100 { 101 101 if (!pixelFormat) 102 102 return E_POINTER; 103 *pixelFormat = FramebufferPixelFormat_PixelFormatOpaque; 103 *pixelFormat = FramebufferPixelFormat_FOURCC_RGB; 104 return S_OK; 105 } 106 107 STDMETHODIMP InternalFramebuffer::COMGETTER(UsesGuestVRAM) (BOOL *usesGuestVRAM) 108 { 109 if (!usesGuestVRAM) 110 return E_POINTER; 111 *usesGuestVRAM = FALSE; 104 112 return S_OK; 105 113 } … … 151 159 152 160 STDMETHODIMP 153 InternalFramebuffer::RequestResize(ULONG iScreenId, FramebufferPixelFormat_TpixelFormat, BYTE *vram,154 ULONG lineSize, ULONG w, ULONG h,161 InternalFramebuffer::RequestResize(ULONG iScreenId, ULONG pixelFormat, BYTE *vram, 162 ULONG bpp, ULONG bpl, ULONG w, ULONG h, 155 163 BOOL *finished) 156 164 { 165 NOREF (bpp); 166 NOREF (bpl); 167 157 168 if (!finished) 158 169 return E_POINTER; … … 164 175 mWidth = w; 165 176 mHeight = h; 166 m LineSize = ((w * mDepth+ 31) / 32) * 4;167 mData = new uint8_t [mLineSize * h];168 memset (mData, 0, mLineSize * h);177 mBytesPerLine = ((w * mBitsPerPixel + 31) / 32) * 4; 178 mData = new uint8_t [mBytesPerLine * h]; 179 memset (mData, 0, mBytesPerLine * h); 169 180 170 181 return S_OK; -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r3652 r3761 3286 3286 refuses to release it for some reason. 3287 3287 3288 <see>IUSBController:: DeviceFilters, USBDeviceState</see>3288 <see>IUSBController::deviceFilters, USBDeviceState</see> 3289 3289 </desc> 3290 3290 <param name="id" type="uuid" dir="in"> … … 3303 3303 a possible automatic reattachment. 3304 3304 3305 <see>IUSBController:: DeviceFilters, USBDeviceState</see>3305 <see>IUSBController::deviceFilters, USBDeviceState</see> 3306 3306 </desc> 3307 3307 <param name="id" type="uuid" dir="in"> … … 3777 3777 Unless the device is ignored by these filters, filters of all 3778 3778 currently running virtual machines 3779 (<link to="IUSBController:: DeviceFilters"/>) are applied to it.3779 (<link to="IUSBController::deviceFilters"/>) are applied to it. 3780 3780 3781 3781 <see>IHostUSBDeviceFilter, USBDeviceState</see> … … 6142 6142 <enum 6143 6143 name="FramebufferPixelFormat" 6144 uuid=" 3bd87520-2b5f-4786-a891-f8c6aeb19a1f"6144 uuid="6b27d1fc-4f2c-4e9c-a166-01d06540305d" 6145 6145 > 6146 6146 <desc> 6147 Format of the virtual video card's memory buffer. See 6148 <link to="IFramebuffer::requestResize()"/> for more information. 6147 Format of the video memory buffer. Constants represented by this enum can 6148 be used to test for particular values of <link 6149 to="IFramebuffer::pixelFormat"/>. See also <link 6150 to="IFramebuffer::requestResize()"/>. 6151 6152 See also www.fourcc.org for more informantion about FOURCC pixel formats. 6149 6153 </desc> 6150 <const name="PixelFormatOpaque" value="0"/> 6151 <const name="PixelFormatRGB16" value="1"/> 6152 <const name="PixelFormatRGB24" value="2"/> 6153 <const name="PixelFormatRGB32" value="3"/> 6154 <const name="PixelFormatOpaque" value="0xFFFFFFFF"> 6155 <desc> 6156 Unknown buffer format. The user may not assume any particular 6157 format of the buffer. 6158 </desc> 6159 </const> 6160 <const name="FOURCC_RGB" value="0x32424752"> 6161 <desc> 6162 Basic RGB format. <link to="IFramebuffer::bitsPerPixel"/> determines 6163 the bit layout. 6164 </desc> 6165 </const> 6154 6166 </enum> 6155 6167 6156 6168 <interface 6157 6169 name="IFramebuffer" extends="$unknown" 6158 uuid=" 450058a4-fef0-4987-81c2-7b89bfc2242f"6170 uuid="af431304-5b09-40e2-94da-3c3cb03822c1" 6159 6171 wsmap="suppress" 6160 6172 > … … 6164 6176 6165 6177 <attribute name="width" type="unsigned long" readonly="yes"> 6166 <desc>Framebuffer width .</desc>6178 <desc>Framebuffer width, in pixels.</desc> 6167 6179 </attribute> 6168 6180 6169 6181 <attribute name="height" type="unsigned long" readonly="yes"> 6170 <desc>Framebuffer height.</desc> 6171 </attribute> 6172 6173 <attribute name="colorDepth" type="unsigned long" readonly="yes"> 6174 <desc>Framebuffer color depth.</desc> 6175 </attribute> 6176 6177 <attribute name="lineSize" type="unsigned long" readonly="yes"> 6178 <desc>framebuffer scan line size in bytes.</desc> 6179 </attribute> 6180 6181 <attribute name="pixelFormat" type="FramebufferPixelFormat" readonly="yes"> 6182 <desc>Framebuffer pixel format.</desc> 6182 <desc>Framebuffer height, in pixels.</desc> 6183 </attribute> 6184 6185 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes"> 6186 <desc> 6187 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link 6188 to="FramebufferPixelFormat::FOURCC_RGB">FOURCC_RGB</link>, valid values 6189 are: 8, 15, 16, 24 and 32. 6190 </desc> 6191 </attribute> 6192 6193 <attribute name="bytesPerLine" type="unsigned long" readonly="yes"> 6194 <desc> 6195 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link 6196 to="FramebufferPixelFormat::FOURCC_RGB">FOURCC_RGB</link>, the 6197 size of the scan line must be aligned to 32 bits. 6198 </desc> 6199 </attribute> 6200 6201 <attribute name="pixelFormat" type="unsigned long" readonly="yes"> 6202 <desc> 6203 Framebuffer pixel format. It's either one of the values defined by <link 6204 to="FramebufferPixelFormat"/> or a raw FOURCC code. 6205 <note> 6206 This attribute must never return <link 6207 to="PixelFormat::PixelFormatOpaque"/> -- the format of the buffer 6208 <link to="#address"/> points to must be always known. 6209 </note> 6210 </desc> 6211 </attribute> 6212 6213 <attribute name="usesGuestVRAM" type="boolean" readonly="yes"> 6214 <desc> 6215 Defines whether this framebuffer uses the virtual video card's memory 6216 buffer (guest VRAM) directly or not. See <link 6217 to="IFramebuffer::requestResize()"/> for more information. 6218 </desc> 6183 6219 </attribute> 6184 6220 … … 6241 6277 Requests a size and pixel format change. 6242 6278 6243 There are two strategies of working with the video buffer of the6244 virtual machine. The first strategyimplies that the IFramebuffer6279 There are two modes of working with the video buffer of the virtual 6280 machine. The <i>indirect</i> mode implies that the IFramebuffer 6245 6281 implementation allocates a memory buffer for the requested display mode 6246 and provides it to the virtual machine. In the second strategy, the6282 and provides it to the virtual machine. In <i>direct</i> mode, the 6247 6283 IFramebuffer implementation uses the memory buffer allocated and owned 6248 by the virtual machine. The second strategy is usually faster because 6249 the implementation gets a pointer to the virtual machine video card's 6250 memory which it can directly use for visualising the contents of the 6251 virtual display, as opposed to the first strategy where the video 6252 card's memory contents are copied to the memory buffer provided by the 6253 implementation every time a display update occurs. 6254 6255 It is important to note that the second strategy is really fast only 6256 when the implementation uses the provided video buffer directly, for 6257 example, by blitting it to the window representing the virtual 6258 machine's display, which saves at least one copy operation comparing 6259 to the first strategy. However, using the video card's memory directly 6260 is not always possible: for example, the format and the color depth of 6261 the window representing the virtual display may differ from the format 6262 or the color depth of the virtual video buffer, or the format of the 6263 latter may be unknown or unsupported. In this case, the first strategy 6264 (that is always available) is used as a fallback: when the virtual 6265 video card's memory contents are copied to the implementation-provided 6266 memory buffer, color and format conversion is done authomatically by 6267 the underlying code. 6268 6269 The @a pixelFormat and @a VRAM parameters define whether the second 6270 strategy is available or not. If @a pixelFormat is 6271 <link to="PixelFormat::PixelFormatOpaque"/> (which usually indicates a 6272 text mode of the virtual display) or if @a VRAM is <tt>null</tt> 6273 (which means a non-linear graphical mode), then direct access to the 6274 virtual card's video memory buffer is not available, the @a VRAM 6275 parameter must be ignored and the implementation must use the first 6276 strategy. In all other cases, @a pixelFormat together with @a lineSize 6277 define the format of the video memory buffer pointed to by the @a VRAM 6278 parameter and the implementation is free to choose which strategy to 6279 use. To indicate that this framebuffer uses the second strategy, its 6280 implementation of the <link to="#address()"/> method must return the 6281 same address as it gets in the @a VRAM parameter of this method; 6282 otherwise it is assumed that the first strategy is chosen. 6284 by the virtual machine. The direct mode is usually faster because the 6285 implementation gets a pointer to the virtual machine video card's memory 6286 which it can directly use for visualising the contents of the virtual 6287 display, as opposed to the indirect mode where the video card's memory 6288 contents are copied to the memory buffer provided by the implementation 6289 every time a display update occurs. 6290 6291 It is important to note that the direct mode is really fast only when 6292 the implementation uses the provided video buffer directly, for example, 6293 by blitting it to the window representing the virtual machine's display, 6294 which saves at least one copy operation comparing to the indirect mode. 6295 However, using the video card's memory directly is not always possible: 6296 for example, the format and the color depth of the window representing 6297 the virtual display may differ from the format or the color depth of the 6298 virtual video buffer, or the format of the latter may be unknown or 6299 unsupported. In this case, the indirect mode (that is always available) 6300 should be used as a fallback: when the virtual video card's memory 6301 contents are copied to the implementation-provided memory buffer, color 6302 and format conversion is done authomatically by the underlying code. 6303 6304 The @a pixelFormat parameter defines whether the direct mode is 6305 available or not. If @a pixelFormat is <link 6306 to="PixelFormat::PixelFormatOpaque"/> (which usually indicates either a 6307 text or a non-linear graphics mode of the virtual display), then direct 6308 access to the virtual card's video memory buffer is not available, the 6309 @a VRAM, @a bitsPerPixel and @a bytesPerLine parameters must be ingored 6310 and the implementation must use the indirect mode when it will provide 6311 its own values for the pixel format, color depth and scan line size. In 6312 all other cases, @a pixelFormat together with @a bitsPerPixel and @a 6313 bytesPerLine define the format of the video memory buffer pointed to by 6314 the @a VRAM parameter and the implementation is free to choose which 6315 mode to use. To indicate that this framebuffer uses the direct mode, the 6316 implementation of the <link to="#usesGuestVRAM"/> attribute must 6317 return <tt>true</tt> and <link to="#address"/> must return exactly the 6318 same address that is passed in the @a VRAM parameter of this method; 6319 otherwise it is assumed that the indirect strategy is chosen. 6283 6320 6284 6321 The @a width and @a height parameters represent the size of the 6285 requested display mode in both cases. In case of the first strategy, 6286 the provided memory buffer should be enough to store data of the given 6287 display mode. In case of the second strategy, it is guaranteed that 6288 the given @a VRAM buffer contains enough space to represent the 6289 display mode of the given size. Note that this framebuffer's 6290 <link to="#width()"/> and <link to="#height()"/> properties must 6291 return exactly the same values as passed to this method after the 6292 resize is completed (see below). 6322 requested display mode in both modes. In case of indirect mode, the 6323 provided memory buffer should be big enough to store data of the given 6324 display mode. In case of direct mode, it is guaranteed that the given @a 6325 VRAM buffer contains enough space to represent the display mode of the 6326 given size. Note that this framebuffer's <link to="#width"/> and <link 6327 to="#height"/> attributes must return exactly the same values as 6328 passed to this method after the resize is completed (see below). 6293 6329 6294 6330 The @a finished output parameter determines if the implementation has … … 6301 6337 <link to="IDisplay::resizeCompleted()"/> is called. 6302 6338 6303 Note that if the second strategy is choosen, the6304 <link to="# colorDepth()"/>, <link to="#lineSize()"/> and6305 <link to="#pixelFormat()"/> properties of this framebuffer must return6306 exactly the same values as specified in the parameters of this method6307 after the resize is completed. In case of the first strategy these6308 properties must return values describing the format of the6309 implementation's own memory buffer <link to="#address()"/> points6310 to. Note also that the <link to="#colorDepth()"/> value must always6311 correlate with <link to="#pixelFormat()"/> when the latter returns any6312 value other than <link to="PixelFormat::PixelFormatOpaque"/>.6339 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>, 6340 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of 6341 this framebuffer must return exactly the same values as specified in the 6342 parameters of this method, after the resize is completed. If the 6343 indirect mode is chosen, these attributes must return values describing 6344 the format of the implementation's own memory buffer <link 6345 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/> 6346 value must always correlate with <link to="#pixelFormat"/>. Note that 6347 the <link to="#pixelFormat"/> attribute must never return <link 6348 to="PixelFormat::PixelFormatOpaque"/> regardless of the selected mode. 6313 6349 6314 6350 <note> … … 6326 6362 </desc> 6327 6363 </param> 6328 <param name="pixelFormat" type="FramebufferPixelFormat" dir="in"> 6329 <desc>Pixel format of the memory buffer pointed to by @a VRAM.</desc> 6364 <param name="pixelFormat" type="unsigned long" dir="in"> 6365 <desc> 6366 Pixel format of the memory buffer pointed to by @a VRAM. 6367 See also <link to="FramebufferPixelFormat"/>. 6368 </desc> 6330 6369 </param> 6331 6370 <param name="VRAM" type="octet" mod="ptr" dir="in"> 6332 6371 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc> 6333 6372 </param> 6334 <param name="lineSize" type="unsigned long" dir="in"> 6373 <param name="bitsPerPixel" type="unsigned long" dir="in"> 6374 <desc>Color depth, bits per pixel.</desc> 6375 </param> 6376 <param name="bytesPerLine" type="unsigned long" dir="in"> 6335 6377 <desc>Size of one scan line, in bytes.</desc> 6336 6378 </param> … … 6512 6554 <interface 6513 6555 name="IDisplay" extends="$unknown" 6514 uuid=" e740a435-88d1-4f14-b9ca-a1b30e2c5038"6556 uuid="010b00f4-9223-4545-9db3-866809da94a0" 6515 6557 wsmap="suppress" 6516 6558 > … … 6523 6565 </attribute> 6524 6566 6525 <attribute name=" colorDepth" type="unsigned long" readonly="yes">6567 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes"> 6526 6568 <desc> 6527 6569 Current guest display color depth. Note that this may differ 6528 from <link to="IFramebuffer:: colorDepth">IFramebuffer::colorDepth</link>.6570 from <link to="IFramebuffer::bitsPerPixel"/>. 6529 6571 </desc> 6530 6572 </attribute> … … 6591 6633 <param name="width" type="unsigned long" dir="in"/> 6592 6634 <param name="height" type="unsigned long" dir="in"/> 6593 <param name=" colorDepth" type="unsigned long" dir="in"/>6635 <param name="bitsPerPixel" type="unsigned long" dir="in"/> 6594 6636 <param name="display" type="unsigned long" dir="in"/> 6595 6637 </method> … … 7011 7053 <link to="#insertDeviceFilter()"/>. 7012 7054 7013 <see># DeviceFilters</see>7055 <see>#deviceFilters</see> 7014 7056 </desc> 7015 7057 <param name="name" type="wstring" dir="in"> … … 7039 7081 </note> 7040 7082 7041 <see># DeviceFilters</see>7083 <see>#deviceFilters</see> 7042 7084 </desc> 7043 7085 <param name="position" type="unsigned long" dir="in"> … … 7058 7100 the list will produce an error. 7059 7101 7060 <see># DeviceFilters</see>7102 <see>#deviceFilters</see> 7061 7103 </desc> 7062 7104 <param name="position" type="unsigned long" dir="in"> … … 7281 7323 </note> 7282 7324 7283 <see>IUSBController:: DeviceFilters, IHostUSBDeviceFilter</see>7325 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see> 7284 7326 </desc> 7285 7327 … … 7385 7427 either ignore the device, or put ot to #USBDeviceHeld state, or do 7386 7428 nothing. Unless the device is ignored by global filters, filters of 7387 all currently running guests (<link to="IUSBController:: DeviceFilters"/>)7429 all currently running guests (<link to="IUSBController::deviceFilters"/>) 7388 7430 are activated that can put it to #USBDeviceCaptured state. 7389 7431 … … 7574 7616 The <link to="#remote"/> attribute is ignored by this type of 7575 7617 filters, because it makes sense only for 7576 <link to="IUSBController:: DeviceFilters">machine USB filters</link>.7618 <link to="IUSBController::deviceFilters">machine USB filters</link>. 7577 7619 </note> 7578 7620 -
trunk/src/VBox/Main/include/DisplayImpl.h
r3576 r3761 166 166 STDMETHOD(COMGETTER(Width)) (ULONG *width); 167 167 STDMETHOD(COMGETTER(Height)) (ULONG *height); 168 STDMETHOD(COMGETTER( ColorDepth)) (ULONG *colorDepth);168 STDMETHOD(COMGETTER(BitsPerPixel)) (ULONG *bitsPerPixel); 169 169 170 170 // IDisplay methods … … 175 175 STDMETHOD(SetFramebuffer)(ULONG aScreenId, IFramebuffer *aFramebuffer); 176 176 STDMETHOD(GetFramebuffer)(ULONG aScreenId, IFramebuffer **aFramebuffer, LONG *aXOrigin, LONG *aYOrigin); 177 STDMETHOD(SetVideoModeHint)(ULONG width, ULONG height, ULONG colorDepth, ULONG display);177 STDMETHOD(SetVideoModeHint)(ULONG width, ULONG height, ULONG bitsPerPixel, ULONG display); 178 178 STDMETHOD(TakeScreenShot)(BYTE *address, ULONG width, ULONG height); 179 179 STDMETHOD(DrawToScreen)(BYTE *address, ULONG x, ULONG y, ULONG width, ULONG height); … … 226 226 /* arguments of the last handleDisplayResize() call */ 227 227 void *mLastAddress; 228 uint32_t mLast LineSize;229 uint32_t mLast ColorDepth;228 uint32_t mLastBytesPerLine; 229 uint32_t mLastBitsPerPixel; 230 230 int mLastWidth; 231 231 int mLastHeight; -
trunk/src/VBox/Main/include/FramebufferImpl.h
r3578 r3761 51 51 STDMETHOD(COMGETTER(Width)) (ULONG *width); 52 52 STDMETHOD(COMGETTER(Height)) (ULONG *height); 53 STDMETHOD(COMGETTER(ColorDepth)) (ULONG *colorDepth); 54 STDMETHOD(COMGETTER(LineSize)) (ULONG *lineSize); 55 STDMETHOD(COMGETTER(PixelFormat)) (FramebufferPixelFormat_T *pixelFormat); 53 STDMETHOD(COMGETTER(BitsPerPixel)) (ULONG *bitsPerPixel); 54 STDMETHOD(COMGETTER(BytesPerLine)) (ULONG *bytesPerLine); 55 STDMETHOD(COMGETTER(PixelFormat)) (ULONG *pixelFormat); 56 STDMETHOD(COMGETTER(UsesGuestVRAM)) (BOOL *usesGuestVRAM); 56 57 STDMETHOD(COMGETTER(HeightReduction)) (ULONG *heightReduction); 57 58 STDMETHOD(COMGETTER(Overlay)) (IFramebufferOverlay **aOverlay); … … 63 64 ULONG w, ULONG h, 64 65 BOOL *finished); 65 STDMETHOD(RequestResize)(ULONG uScreenId, FramebufferPixelFormat_TpixelFormat, BYTE *vram,66 ULONG lineSize, ULONG w, ULONG h,66 STDMETHOD(RequestResize)(ULONG uScreenId, ULONG pixelFormat, BYTE *vram, 67 ULONG bpp, ULONG bpl, ULONG w, ULONG h, 67 68 BOOL *finished); 68 69 STDMETHOD(OperationSupported)(FramebufferAccelerationOperation_T operation, … … 80 81 int mWidth; 81 82 int mHeight; 82 int m Depth;83 int m LineSize;83 int mBitsPerPixel; 84 int mBytesPerLine; 84 85 uint8_t *mData; 85 86 RTSEMMUTEX mMutex;
Note:
See TracChangeset
for help on using the changeset viewer.