Changeset 73328 in vbox for trunk/src/VBox
- Timestamp:
- Jul 23, 2018 2:55:54 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp
r73237 r73328 3796 3796 */ 3797 3797 uint8_t * const pbHstBuf = (uint8_t *)pThis->CTX_SUFF(vram_ptr) + pThis->svga.uScreenOffset; 3798 uint32_t cbHstBuf = pThis->svga.cbScanline * pThis->svga.uHeight; 3798 uint32_t const cbScanline = pThis->svga.cbScanline ? pThis->svga.cbScanline : 3799 width * (RT_ALIGN(pThis->svga.uBpp, 8) / 8); 3800 uint32_t cbHstBuf = cbScanline * pThis->svga.uHeight; 3799 3801 if (cbHstBuf > pThis->vram_size - pThis->svga.uScreenOffset) 3800 3802 cbHstBuf = pThis->vram_size - pThis->svga.uScreenOffset; /* Paranoia. */ 3801 3803 uint32_t const offHst = (clipRect.left * RT_ALIGN(pThis->svga.uBpp, 8)) / 8 3802 + pThis->svga.cbScanline * clipRect.top;3803 int32_t const cbHstPitch = pThis->svga.cbScanline;3804 + cbScanline * clipRect.top; 3805 int32_t const cbHstPitch = cbScanline; 3804 3806 3805 3807 /* Source: GMRFB. vmsvgaGMRTransfer ensures that no memory outside the GMR is read. */ … … 3862 3864 */ 3863 3865 uint8_t * const pbHstBuf = (uint8_t *)pThis->CTX_SUFF(vram_ptr) + pThis->svga.uScreenOffset; 3864 uint32_t cbHstBuf = pThis->svga.cbScanline * pThis->svga.uHeight; 3866 uint32_t const cbScanline = pThis->svga.cbScanline ? pThis->svga.cbScanline : 3867 width * (RT_ALIGN(pThis->svga.uBpp, 8) / 8); 3868 uint32_t cbHstBuf = cbScanline * pThis->svga.uHeight; 3865 3869 if (cbHstBuf > pThis->vram_size - pThis->svga.uScreenOffset) 3866 3870 cbHstBuf = pThis->vram_size - pThis->svga.uScreenOffset; /* Paranoia. */ 3867 3871 uint32_t const offHst = (clipRect.left * RT_ALIGN(pThis->svga.uBpp, 8)) / 8 3868 + pThis->svga.cbScanline * clipRect.top;3869 int32_t const cbHstPitch = pThis->svga.cbScanline;3872 + cbScanline * clipRect.top; 3873 int32_t const cbHstPitch = cbScanline; 3870 3874 3871 3875 /* Destination: GMRFB. vmsvgaGMRTransfer ensures that no memory outside the GMR is read. */
Note:
See TracChangeset
for help on using the changeset viewer.