VirtualBox

Changeset 50412 in vbox


Ignore:
Timestamp:
Feb 11, 2014 10:21:01 AM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
92180
Message:

crOpenGL: scaling bugfixes; rename stretch -> scale

Location:
trunk/src/VBox
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/include/cr_blitter.h

    r50388 r50412  
    220220    /*dtor*/
    221221    PFNCRTEXDATA_RELEASED pfnTextureReleased;
    222     struct CR_TEXDATA *pStretchedCache;
     222    struct CR_TEXDATA *pScaledCache;
    223223} CR_TEXDATA, *PCR_TEXDATA;
    224224
     
    281281VBOXBLITTERDECL(int) CrTdBltDataAcquire(PCR_TEXDATA pTex, GLenum enmFormat, bool fInverted, const CR_BLITTER_IMG**ppImg);
    282282
    283 VBOXBLITTERDECL(int) CrTdBltDataAcquireStretched(PCR_TEXDATA pTex, GLenum enmFormat, bool fInverted, uint32_t width, uint32_t height, const CR_BLITTER_IMG**ppImg);
    284 
    285 VBOXBLITTERDECL(int) CrTdBltDataReleaseStretched(PCR_TEXDATA pTex, const CR_BLITTER_IMG *pImg);
    286 
    287 VBOXBLITTERDECL(void) CrTdBltStretchCacheMoveTo(PCR_TEXDATA pTex, PCR_TEXDATA pDstTex);
     283VBOXBLITTERDECL(int) CrTdBltDataAcquireScaled(PCR_TEXDATA pTex, GLenum enmFormat, bool fInverted, uint32_t width, uint32_t height, const CR_BLITTER_IMG**ppImg);
     284
     285VBOXBLITTERDECL(int) CrTdBltDataReleaseScaled(PCR_TEXDATA pTex, const CR_BLITTER_IMG *pImg);
     286
     287VBOXBLITTERDECL(void) CrTdBltScaleCacheMoveTo(PCR_TEXDATA pTex, PCR_TEXDATA pDstTex);
    288288
    289289/* release the texture data, the data remains cached in the CR_TEXDATA object until it is discarded with CrTdBltDataFree or CrTdBltDataCleanup */
  • trunk/src/VBox/GuestHost/OpenGL/include/cr_vreg.h

    r50371 r50412  
    5151#define CR_FLOAT_RCAST(_t, _v) ((_t)((float)(_v) + 0.5))
    5252
    53 DECLINLINE(void) VBoxRectStretch(PRTRECT pRect, float xStretch, float yStretch)
    54 {
    55     pRect->xLeft = CR_FLOAT_RCAST(int32_t, pRect->xLeft * xStretch);
    56     pRect->yTop = CR_FLOAT_RCAST(int32_t, pRect->yTop * yStretch);
    57     pRect->xRight = CR_FLOAT_RCAST(int32_t, pRect->xRight * xStretch);
    58     pRect->yBottom = CR_FLOAT_RCAST(int32_t, pRect->yBottom * yStretch);
    59 }
    60 
    61 DECLINLINE(void) VBoxRectStretched(const RTRECT *pRect, float xStretch, float yStretch, PRTRECT pResult)
     53DECLINLINE(void) VBoxRectScale(PRTRECT pRect, float xScale, float yScale)
     54{
     55    pRect->xLeft = CR_FLOAT_RCAST(int32_t, pRect->xLeft * xScale);
     56    pRect->yTop = CR_FLOAT_RCAST(int32_t, pRect->yTop * yScale);
     57    pRect->xRight = CR_FLOAT_RCAST(int32_t, pRect->xRight * xScale);
     58    pRect->yBottom = CR_FLOAT_RCAST(int32_t, pRect->yBottom * yScale);
     59}
     60
     61DECLINLINE(void) VBoxRectScaled(const RTRECT *pRect, float xScale, float yScale, PRTRECT pResult)
    6262{
    6363    *pResult = *pRect;
    64     VBoxRectStretch(pResult, xStretch, yStretch);
     64    VBoxRectScale(pResult, xScale, yScale);
    6565}
    6666#endif
  • trunk/src/VBox/GuestHost/OpenGL/util/blitter.cpp

    r50388 r50412  
    13171317    crTdBltImgFree(pTex);
    13181318
    1319     if (pTex->pStretchedCache)
    1320         CrTdBltDataFreeNe(pTex->pStretchedCache);
     1319    if (pTex->pScaledCache)
     1320        CrTdBltDataFreeNe(pTex->pScaledCache);
    13211321}
    13221322
     
    13401340    crTdBltImgRelease(pTex);
    13411341
    1342     if (pTex->pStretchedCache)
    1343         CrTdBltDataInvalidateNe(pTex->pStretchedCache);
     1342    if (pTex->pScaledCache)
     1343        CrTdBltDataInvalidateNe(pTex->pScaledCache);
    13441344}
    13451345
     
    13721372static void crTdBltSdCleanupCacheNe(PCR_TEXDATA pTex)
    13731373{
    1374     if (pTex->pStretchedCache)
    1375     {
    1376         CrTdBltDataCleanupNe(pTex->pStretchedCache);
    1377         CrTdRelease(pTex->pStretchedCache);
    1378         pTex->pStretchedCache = NULL;
     1374    if (pTex->pScaledCache)
     1375    {
     1376        CrTdBltDataCleanupNe(pTex->pScaledCache);
     1377        CrTdRelease(pTex->pScaledCache);
     1378        pTex->pScaledCache = NULL;
    13791379    }
    13801380}
     
    15401540}
    15411541
    1542 static int ctTdBltSdCreate(PCR_BLITTER pBlitter, uint32_t width, uint32_t height, GLenum enmTarget, PCR_TEXDATA *ppStretchedCache)
    1543 {
    1544     PCR_TEXDATA pStretchedCache;
     1542static int ctTdBltSdCreate(PCR_BLITTER pBlitter, uint32_t width, uint32_t height, GLenum enmTarget, PCR_TEXDATA *ppScaledCache)
     1543{
     1544    PCR_TEXDATA pScaledCache;
    15451545
    15461546    Assert(CrBltIsEntered(pBlitter));
    15471547
    1548     *ppStretchedCache = NULL;
    1549 
    1550     pStretchedCache = (PCR_TEXDATA)RTMemAlloc(sizeof (*pStretchedCache));
    1551     if (!pStretchedCache)
     1548    *ppScaledCache = NULL;
     1549
     1550    pScaledCache = (PCR_TEXDATA)RTMemAlloc(sizeof (*pScaledCache));
     1551    if (!pScaledCache)
    15521552    {
    15531553        WARN(("RTMemAlloc failed"));
     
    15631563    {
    15641564        WARN(("Tex create failed"));
    1565         RTMemFree(pStretchedCache);
     1565        RTMemFree(pScaledCache);
    15661566        return VERR_GENERAL_FAILURE;
    15671567    }
    15681568
    1569     CrTdInit(pStretchedCache, &Tex, pBlitter, ctTdBltSdReleased);
    1570 
    1571     *ppStretchedCache = pStretchedCache;
    1572 
    1573     return VINF_SUCCESS;
    1574 }
    1575 
    1576 static int ctTdBltSdGet(PCR_TEXDATA pTex, uint32_t width, uint32_t height, PCR_TEXDATA *ppStretchedCache)
     1569    CrTdInit(pScaledCache, &Tex, pBlitter, ctTdBltSdReleased);
     1570
     1571    *ppScaledCache = pScaledCache;
     1572
     1573    return VINF_SUCCESS;
     1574}
     1575
     1576static int ctTdBltSdGet(PCR_TEXDATA pTex, uint32_t width, uint32_t height, PCR_TEXDATA *ppScaledCache)
    15771577{
    15781578    Assert(pTex->Flags.Entered);
    15791579
    1580     PCR_TEXDATA pStretchedCache;
    1581 
    1582     *ppStretchedCache = NULL;
    1583 
    1584     if (!pTex->pStretchedCache)
    1585     {
    1586         int rc = ctTdBltSdCreate(pTex->pBlitter, width, height, pTex->Tex.target, &pStretchedCache);
     1580    PCR_TEXDATA pScaledCache;
     1581
     1582    *ppScaledCache = NULL;
     1583
     1584    if (!pTex->pScaledCache)
     1585    {
     1586        int rc = ctTdBltSdCreate(pTex->pBlitter, width, height, pTex->Tex.target, &pScaledCache);
    15871587        if (!RT_SUCCESS(rc))
    15881588        {
     
    15911591        }
    15921592
    1593         pTex->pStretchedCache = pStretchedCache;
     1593        pTex->pScaledCache = pScaledCache;
    15941594    }
    15951595    else
    15961596    {
    1597         int cmp = pTex->pStretchedCache->Tex.width - width;
     1597        int cmp = pTex->pScaledCache->Tex.width - width;
    15981598        if (cmp <= 0)
    1599             cmp = pTex->pStretchedCache->Tex.height - height;
     1599            cmp = pTex->pScaledCache->Tex.height - height;
    16001600
    16011601        if (!cmp)
    1602             pStretchedCache = pTex->pStretchedCache;
     1602            pScaledCache = pTex->pScaledCache;
    16031603        else if (cmp < 0) /* current cache is "less" than the requested */
    16041604        {
    1605             int rc = ctTdBltSdCreate(pTex->pBlitter, width, height, pTex->Tex.target, &pStretchedCache);
     1605            int rc = ctTdBltSdCreate(pTex->pBlitter, width, height, pTex->Tex.target, &pScaledCache);
    16061606            if (!RT_SUCCESS(rc))
    16071607            {
     
    16101610            }
    16111611
    1612             pStretchedCache->pStretchedCache = pTex->pStretchedCache;
    1613             pTex->pStretchedCache = pStretchedCache;
     1612            pScaledCache->pScaledCache = pTex->pScaledCache;
     1613            pTex->pScaledCache = pScaledCache;
    16141614        }
    16151615        else /* cmp > 0 */
    16161616        {
    1617             int rc = ctTdBltSdGet(pTex->pStretchedCache, width, height, &pStretchedCache);
     1617            int rc = ctTdBltSdGet(pTex->pScaledCache, width, height, &pScaledCache);
    16181618            if (!RT_SUCCESS(rc))
    16191619            {
     
    16241624    }
    16251625
    1626     Assert(pStretchedCache);
     1626    Assert(pScaledCache);
    16271627
    16281628#if 0
     
    16391639        }
    16401640
    1641         pTex->pBlitter->pDispatch->DeleteTextures(1, &pTex->pStretchedCache->Tex.hwid);
    1642 
    1643         crTdResize(pTex->pStretchedCache, &Tex);
     1641        pTex->pBlitter->pDispatch->DeleteTextures(1, &pTex->pScaledCache->Tex.hwid);
     1642
     1643        crTdResize(pTex->pScaledCache, &Tex);
    16441644    }
    16451645#endif
    16461646
    1647     *ppStretchedCache = pStretchedCache;
    1648     return VINF_SUCCESS;
    1649 }
    1650 
    1651 static int ctTdBltSdGetUpdated(PCR_TEXDATA pTex, uint32_t width, uint32_t height, PCR_TEXDATA *ppStretchedCache)
    1652 {
    1653     PCR_TEXDATA pStretchedCache;
    1654 
    1655     *ppStretchedCache = NULL;
    1656     int rc = ctTdBltSdGet(pTex, width, height, &pStretchedCache);
     1647    *ppScaledCache = pScaledCache;
     1648    return VINF_SUCCESS;
     1649}
     1650
     1651static int ctTdBltSdGetUpdated(PCR_TEXDATA pTex, uint32_t width, uint32_t height, PCR_TEXDATA *ppScaledCache)
     1652{
     1653    PCR_TEXDATA pScaledCache;
     1654
     1655    *ppScaledCache = NULL;
     1656    int rc = ctTdBltSdGet(pTex, width, height, &pScaledCache);
    16571657    if (!RT_SUCCESS(rc))
    16581658    {
     
    16611661    }
    16621662
    1663     Assert(width == pStretchedCache->Tex.width);
    1664     Assert(height == pStretchedCache->Tex.height);
    1665 
    1666     if (!pStretchedCache->Flags.DataValid)
     1663    Assert(width == pScaledCache->Tex.width);
     1664    Assert(height == pScaledCache->Tex.height);
     1665
     1666    if (!pScaledCache->Flags.DataValid)
    16671667    {
    16681668        RTRECT SrcRect, DstRect;
     
    16781678        DstRect.yBottom = height;
    16791679
    1680         CrBltBlitTexTex(pTex->pBlitter, &pTex->Tex, &SrcRect, &pStretchedCache->Tex, &DstRect, 1, 0);
    1681     }
    1682 
    1683     *ppStretchedCache = pStretchedCache;
    1684 
    1685     return VINF_SUCCESS;
    1686 }
    1687 
    1688 VBOXBLITTERDECL(int) CrTdBltDataAcquireStretched(PCR_TEXDATA pTex, GLenum enmFormat, bool fInverted, uint32_t width, uint32_t height, const CR_BLITTER_IMG**ppImg)
     1680        CrBltBlitTexTex(pTex->pBlitter, &pTex->Tex, &SrcRect, &pScaledCache->Tex, &DstRect, 1, 0);
     1681    }
     1682
     1683    *ppScaledCache = pScaledCache;
     1684
     1685    return VINF_SUCCESS;
     1686}
     1687
     1688VBOXBLITTERDECL(int) CrTdBltDataAcquireScaled(PCR_TEXDATA pTex, GLenum enmFormat, bool fInverted, uint32_t width, uint32_t height, const CR_BLITTER_IMG**ppImg)
    16891689{
    16901690    if (pTex->Tex.width == width && pTex->Tex.height == height)
     
    16971697    }
    16981698
    1699     PCR_TEXDATA pStretchedCache;
    1700 
    1701     int rc = ctTdBltSdGetUpdated(pTex, width, height, &pStretchedCache);
     1699    PCR_TEXDATA pScaledCache;
     1700
     1701    int rc = ctTdBltSdGetUpdated(pTex, width, height, &pScaledCache);
    17021702    if (!RT_SUCCESS(rc))
    17031703    {
     
    17061706    }
    17071707
    1708     rc = CrTdBltEnter(pStretchedCache);
     1708    rc = CrTdBltEnter(pScaledCache);
    17091709    if (!RT_SUCCESS(rc))
    17101710    {
     
    17131713    }
    17141714
    1715     rc = CrTdBltDataAcquire(pStretchedCache, enmFormat, fInverted, ppImg);
     1715    rc = CrTdBltDataAcquire(pScaledCache, enmFormat, fInverted, ppImg);
    17161716    if (!RT_SUCCESS(rc))
    17171717    {
    17181718        WARN(("CrTdBltDataAcquire failed rc %d", rc));
    1719         CrTdBltLeave(pTex->pStretchedCache);
     1719        CrTdBltLeave(pTex->pScaledCache);
    17201720        return rc;
    17211721    }
     
    17241724}
    17251725
    1726 VBOXBLITTERDECL(int) CrTdBltDataReleaseStretched(PCR_TEXDATA pTex, const CR_BLITTER_IMG *pImg)
    1727 {
    1728     PCR_TEXDATA pStretchedCache = RT_FROM_MEMBER(pImg, CR_TEXDATA, Img);
    1729     int rc = CrTdBltDataRelease(pStretchedCache);
     1726VBOXBLITTERDECL(int) CrTdBltDataReleaseScaled(PCR_TEXDATA pTex, const CR_BLITTER_IMG *pImg)
     1727{
     1728    PCR_TEXDATA pScaledCache = RT_FROM_MEMBER(pImg, CR_TEXDATA, Img);
     1729    int rc = CrTdBltDataRelease(pScaledCache);
    17301730    if (!RT_SUCCESS(rc))
    17311731    {
     
    17341734    }
    17351735
    1736     if (pStretchedCache != pTex)
    1737         CrTdBltLeave(pStretchedCache);
    1738 
    1739     return VINF_SUCCESS;
    1740 }
    1741 
    1742 VBOXBLITTERDECL(void) CrTdBltStretchCacheMoveTo(PCR_TEXDATA pTex, PCR_TEXDATA pDstTex)
    1743 {
    1744     if (!pTex->pStretchedCache)
     1736    if (pScaledCache != pTex)
     1737        CrTdBltLeave(pScaledCache);
     1738
     1739    return VINF_SUCCESS;
     1740}
     1741
     1742VBOXBLITTERDECL(void) CrTdBltScaleCacheMoveTo(PCR_TEXDATA pTex, PCR_TEXDATA pDstTex)
     1743{
     1744    if (!pTex->pScaledCache)
    17451745        return;
    17461746
    17471747    crTdBltSdCleanupCacheNe(pDstTex);
    17481748
    1749     pDstTex->pStretchedCache = pTex->pStretchedCache;
    1750     pTex->pStretchedCache = NULL;
    1751 }
     1749    pDstTex->pScaledCache = pTex->pScaledCache;
     1750    pTex->pScaledCache = NULL;
     1751}
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_presenter.cpp

    r50405 r50412  
    262262}
    263263
    264 static void crFbBltImgStretched(const CR_BLITTER_IMG *pSrc, const RTPOINT *pSrcDataPoint, bool fSrcInvert, const RTRECT *pCopyRect, const RTPOINT *pDstDataPoint, float strX, float strY, CR_BLITTER_IMG *pDst)
     264static void crFbBltImgScaled(const CR_BLITTER_IMG *pSrc, const RTPOINT *pSrcDataPoint, bool fSrcInvert, const RTRECT *pCopyRect, const RTPOINT *pDstDataPoint, float strX, float strY, CR_BLITTER_IMG *pDst)
    265265{
    266266    int32_t srcX = pCopyRect->xLeft - pSrcDataPoint->x;
     
    271271    Assert(srcY < pSrc->height);
    272272
    273     int32_t dstX = CR_FLOAT_RCAST(int32_t, strX * (pCopyRect->xLeft - pDstDataPoint->x));
    274     int32_t dstY = CR_FLOAT_RCAST(int32_t, strY * (pCopyRect->yTop - pDstDataPoint->y));
     273    RTPOINT ScaledDtsDataPoint;
     274    RTRECT ScaledCopyRect;
     275
     276    VBoxRectScaled(pCopyRect, strX, strY, &ScaledCopyRect);
     277    ScaledDtsDataPoint.x = CR_FLOAT_RCAST(int32_t, strX * pDstDataPoint->x);
     278    ScaledDtsDataPoint.y = CR_FLOAT_RCAST(int32_t, strY * pDstDataPoint->y);
     279
     280    int32_t dstX = ScaledCopyRect.xLeft - ScaledDtsDataPoint.x;
     281    int32_t dstY = ScaledCopyRect.yTop - ScaledDtsDataPoint.y;
    275282    Assert(dstX >= 0);
    276283    Assert(dstY >= 0);
    277284
     285    int32_t ScaledDstWidth = ScaledCopyRect.xRight - ScaledCopyRect.xLeft;
     286    int32_t delta = (int32_t)pDst->width - dstX - ScaledDstWidth;
     287    if (delta < 0)
     288        ScaledDstWidth += delta;
     289
     290    if (ScaledDstWidth <= 0)
     291    {
     292        WARN(("dst width (%d) <= 0", ScaledDstWidth));
     293        return;
     294    }
     295
     296    int32_t ScaledDstHeight = ScaledCopyRect.yBottom - ScaledCopyRect.yTop;
     297    delta = (int32_t)pDst->height - dstY - ScaledDstHeight;
     298    if (delta < 0)
     299        ScaledDstHeight += delta;
     300
     301    if (ScaledDstHeight <= 0)
     302    {
     303        WARN(("dst height (%d) <= 0", ScaledDstHeight));
     304        return;
     305    }
     306
    278307    uint8_t *pu8Src = ((uint8_t*)pSrc->pvData) + pSrc->pitch * (!fSrcInvert ? srcY : pSrc->height - srcY - 1) + srcX * 4;
    279308    uint8_t *pu8Dst = ((uint8_t*)pDst->pvData) + pDst->pitch * dstY + dstX * 4;
    280309
    281310    CrBmpScale32(pu8Dst, pDst->pitch,
    282                         CR_FLOAT_RCAST(int32_t, strX * (pCopyRect->xRight - pCopyRect->xLeft)),
    283                         CR_FLOAT_RCAST(int32_t, strY * (pCopyRect->yBottom - pCopyRect->yTop)),
     311                        ScaledDstWidth,
     312                        ScaledDstHeight,
    284313                        pu8Src,
    285314                        fSrcInvert ? -pSrc->pitch : pSrc->pitch,
     
    312341    PCR_BLITTER pEnteredBlitter = NULL;
    313342    uint32_t width = 0, height = 0;
    314     RTPOINT StretchedEntryPoint = {0};
     343    RTPOINT ScaledEntryPoint = {0};
    315344
    316345    VBOXVR_SCR_COMPOSITOR_CONST_ITERATOR Iter;
     
    319348    float strY = ((float)pImg->height) / (pSrcRect->yBottom - pSrcRect->yTop);
    320349
    321     RTPOINT StretchedSrcPoint;
    322     StretchedSrcPoint.x = CR_FLOAT_RCAST(int32_t, strX * SrcPoint.x);
    323     StretchedSrcPoint.y = CR_FLOAT_RCAST(int32_t, strY * SrcPoint.y);
     350    RTPOINT ScaledSrcPoint;
     351    ScaledSrcPoint.x = CR_FLOAT_RCAST(int32_t, strX * SrcPoint.x);
     352    ScaledSrcPoint.y = CR_FLOAT_RCAST(int32_t, strY * SrcPoint.y);
    324353
    325354    RTPOINT ZeroPoint = {0, 0};
     
    366395                    continue;
    367396
    368                 VBoxRectStretch(&Intersection, strX, strY);
     397                VBoxRectScale(&Intersection, strX, strY);
    369398                if (VBoxRectIsZero(&Intersection))
    370399                    continue;
     
    422451                    width = CR_FLOAT_RCAST(uint32_t, strX * pVrTex->width);
    423452                    height = CR_FLOAT_RCAST(uint32_t, strY * pVrTex->height);
    424                     StretchedEntryPoint.x = CR_FLOAT_RCAST(int32_t, strX * CrVrScrCompositorEntryRectGet(pEntry)->xLeft);
    425                     StretchedEntryPoint.y = CR_FLOAT_RCAST(int32_t, strY * CrVrScrCompositorEntryRectGet(pEntry)->yTop);
     453                    ScaledEntryPoint.x = CR_FLOAT_RCAST(int32_t, strX * CrVrScrCompositorEntryRectGet(pEntry)->xLeft);
     454                    ScaledEntryPoint.y = CR_FLOAT_RCAST(int32_t, strY * CrVrScrCompositorEntryRectGet(pEntry)->yTop);
    426455                }
    427456
    428                 rc = CrTdBltDataAcquireStretched(pTex, GL_BGRA, false, width, height, &pSrcImg);
     457                rc = CrTdBltDataAcquireScaled(pTex, GL_BGRA, false, width, height, &pSrcImg);
    429458                if (!RT_SUCCESS(rc))
    430459                {
     
    435464                bool fInvert = !(CrVrScrCompositorEntryFlagsGet(pEntry) & CRBLT_F_INVERT_SRC_YCOORDS);
    436465
    437                 crFbBltImg(pSrcImg, &StretchedEntryPoint, fInvert, &Intersection, &StretchedSrcPoint, pImg);
    438 
    439                 CrTdBltDataReleaseStretched(pTex, pSrcImg);
     466                crFbBltImg(pSrcImg, &ScaledEntryPoint, fInvert, &Intersection, &ScaledSrcPoint, pImg);
     467
     468                CrTdBltDataReleaseScaled(pTex, pSrcImg);
    440469            }
    441470        }
     
    481510        CR_BLITTER_IMG FbImg;
    482511
    483         bool fStretch = fbWidth != stretchedWidth || fbHeight != stretchedHeight;
     512        bool fScale = fbWidth != stretchedWidth || fbHeight != stretchedHeight;
    484513
    485514        crFbImgFromFb(hFb, &FbImg);
     
    496525                    continue;
    497526
    498                 if (!fStretch)
     527                if (!fScale)
    499528                    crFbBltImg(&FbImg, &ZeroPoint, false, &Intersection, &SrcPoint, pImg);
    500529                else
    501                     crFbBltImgStretched(&FbImg, &ZeroPoint, false, &Intersection, &SrcPoint, strX, strY, pImg);
     530                    crFbBltImgScaled(&FbImg, &ZeroPoint, false, &Intersection, &SrcPoint, strX, strY, pImg);
    502531            }
    503532        }
     
    517546}
    518547
    519 static int crFbBltGetContentsStretchCPU(HCR_FRAMEBUFFER hFb, const RTRECT *pSrcRect, uint32_t cRects, const RTRECT *pRects, CR_BLITTER_IMG *pImg)
     548static int crFbBltGetContentsScaleCPU(HCR_FRAMEBUFFER hFb, const RTRECT *pSrcRect, uint32_t cRects, const RTRECT *pRects, CR_BLITTER_IMG *pImg)
    520549{
    521550    uint32_t srcWidth = pSrcRect->xRight - pSrcRect->xLeft;
     
    568597    }
    569598
    570     return crFbBltGetContentsStretchCPU(hFb, pSrcRect, cRects, pRects, pImg);
     599    return crFbBltGetContentsScaleCPU(hFb, pSrcRect, cRects, pRects, pImg);
    571600}
    572601
     
    871900        CR_TEXDATA *pReplacingTex = CrVrScrCompositorEntryTexGet(&pFbReplacingEntry->Entry);
    872901
    873         CrTdBltStretchCacheMoveTo(pTex, pReplacingTex);
     902        CrTdBltScaleCacheMoveTo(pTex, pReplacingTex);
    874903
    875904        if (pFb->pDisplay)
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa_helper.m

    r50274 r50412  
    14981498                            VBoxRectTranslate(&DstRect, -RestrictDstRect.xLeft, -RestrictDstRect.yTop);
    14991499                           
    1500                             VBoxRectStretch(&DstRect, m_FBOThumbScaleX, m_FBOThumbScaleY);
     1500                            VBoxRectScale(&DstRect, m_FBOThumbScaleX, m_FBOThumbScaleY);
    15011501                   
    15021502                            if (VBoxRectIsZero(&DstRect))
Note: See TracChangeset for help on using the changeset viewer.

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