- Timestamp:
- Jun 14, 2009 4:25:49 PM (16 years ago)
- Location:
- trunk/src/VBox/Additions/x11/vboxvideo
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.h
r17451 r20550 253 253 extern Bool VBOXDRIScreenInit(int scrnIndex, ScreenPtr pScreen, VBOXPtr pVBox); 254 254 extern Bool VBOXDRIFinishScreenInit(ScreenPtr pScreen); 255 extern void VBOXDRIUpdateStride(ScrnInfoPtr pScrn, VBOXPtr pVBox); 255 256 extern void VBOXDRICloseScreen(ScreenPtr pScreen, VBOXPtr pVBox); 256 257 -
trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo_15.c
r17318 r20550 245 245 scrn->virtualY = height; 246 246 scrn->displayWidth = width; 247 VBOXDRIUpdateStride(scrn, pVBox); 247 248 } 248 249 TRACE_LOG("returning %s\n", rc ? "TRUE" : "FALSE"); … … 986 987 return (FALSE); 987 988 989 /* Needed before we initialise DRI. */ 990 pScrn->displayWidth = pScrn->virtualX; 991 988 992 #ifdef VBOX_DRI 989 993 pVBox->useDRI = VBOXDRIScreenInit(scrnIndex, pScreen, pVBox); -
trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo_dri.c
r17451 r20550 173 173 xf86DrvMsg(pScrn->scrnIndex, X_ERROR, 174 174 "DRI is only available in 16bpp or 32bpp graphics modes.\n"); 175 rc = FALSE; 176 } 177 /* Assertion */ 178 if ( (pScrn->displayWidth == 0) 179 || (pVBox->pciInfo == NULL) 180 || (pVBox->base == NULL) 181 || (pVBox->mapSize == 0)) 182 { 183 xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "%s: preconditions failed\n", 184 __PRETTY_FUNCTION__); 175 185 rc = FALSE; 176 186 } … … 251 261 pDRIInfo->frameBufferPhysicalAddress = pVBox->base; 252 262 pDRIInfo->frameBufferSize = pVBox->mapSize; 253 pDRIInfo->frameBufferStride = pScrn->displayWidth; 263 pDRIInfo->frameBufferStride = pScrn->displayWidth 264 * pScrn->bitsPerPixel / 8; 254 265 pDRIInfo->SAREASize = SAREA_MAX; /* we have no private bits yet. */ 255 266 /* This can't be zero, as the server callocs this size and checks for … … 305 316 } 306 317 318 void VBOXDRIUpdateStride(ScrnInfoPtr pScrn, VBOXPtr pVBox) 319 { 320 DRIInfoPtr pDRIInfo = pVBox->pDRIInfo; 321 pDRIInfo->frameBufferStride = pScrn->displayWidth 322 * pScrn->bitsPerPixel / 8; 323 } 324 307 325 void 308 326 VBOXDRICloseScreen(ScreenPtr pScreen, VBOXPtr pVBox)
Note:
See TracChangeset
for help on using the changeset viewer.