VirtualBox

Changeset 73328 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jul 23, 2018 2:55:54 PM (6 years ago)
Author:
vboxsync
Message:

DevVGA-SVGA: SVGA_CMD_BLIT_GMRFB_TO_SCREEN and SVGA_CMD_BLIT_SCREEN_TO_GMRFB updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp

    r73237 r73328  
    37963796                 */
    37973797                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;
    37993801                if (cbHstBuf > pThis->vram_size - pThis->svga.uScreenOffset)
    38003802                   cbHstBuf = pThis->vram_size - pThis->svga.uScreenOffset; /* Paranoia. */
    38013803                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;
    38043806
    38053807                /* Source: GMRFB. vmsvgaGMRTransfer ensures that no memory outside the GMR is read. */
     
    38623864                 */
    38633865                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;
    38653869                if (cbHstBuf > pThis->vram_size - pThis->svga.uScreenOffset)
    38663870                   cbHstBuf = pThis->vram_size - pThis->svga.uScreenOffset; /* Paranoia. */
    38673871                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;
    38703874
    38713875                /* Destination: GMRFB. vmsvgaGMRTransfer ensures that no memory outside the GMR is read. */
Note: See TracChangeset for help on using the changeset viewer.

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