Changeset 50371 in vbox for trunk/src/VBox/GuestHost/OpenGL
- Timestamp:
- Feb 7, 2014 9:59:02 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 92126
- Location:
- trunk/src/VBox/GuestHost/OpenGL
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/include/cr_vreg.h
r50316 r50371 49 49 50 50 #ifndef IN_RING0 51 #define CR_FLOAT_RCAST(_t, _v) ((_t)((float)(_v) + 0.5)) 52 51 53 DECLINLINE(void) VBoxRectStretch(PRTRECT pRect, float xStretch, float yStretch) 52 54 { 53 pRect->xLeft = (int32_t)(pRect->xLeft * xStretch);54 pRect->yTop = (int32_t)(pRect->yTop * yStretch);55 pRect->xRight = (int32_t)(pRect->xRight * xStretch);56 pRect->yBottom = (int32_t)(pRect->yBottom * yStretch);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); 57 59 } 58 60 -
trunk/src/VBox/GuestHost/OpenGL/util/bmpscale.cpp
r50365 r50371 61 61 } 62 62 63 DECLINLINE(void) gdImageSetPixel (gdImagePtr im, int x, int y, int color, int w)63 DECLINLINE(void) gdImageSetPixel (gdImagePtr im, int x, int y, int color, int cbLine) 64 64 { 65 *(int32_t *)(im + y * w * 4+ x * 4) = color;65 *(int32_t *)(im + y * cbLine + x * 4) = color; 66 66 } 67 67 … … 190 190 gdTrueColorAlpha ((int) red, 191 191 (int) green, 192 (int) blue, (int) alpha), dstW );192 (int) blue, (int) alpha), dstW * 4); 193 193 } 194 194 }
Note:
See TracChangeset
for help on using the changeset viewer.