VirtualBox

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/GuestHost/OpenGL/include
Files:
2 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
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