Changeset 28602 in vbox for trunk/src/VBox/Main/DisplayImpl.cpp
- Timestamp:
- Apr 22, 2010 3:45:36 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/DisplayImpl.cpp
r28468 r28602 2894 2894 * Helper to update the display information from the framebuffer. 2895 2895 * 2896 * @param aCheckParams true to compare the parameters of the current framebuffer2897 * and the new one and issue handleDisplayResize()2898 * if they differ.2899 2896 * @thread EMT 2900 2897 */ 2901 void Display::updateDisplayData (bool aCheckParams /* = false */) 2902 { 2898 void Display::updateDisplayData(void) 2899 { 2900 LogFlowFunc (("\n")); 2901 2903 2902 /* the driver might not have been constructed yet */ 2904 2903 if (!mpDrv) … … 2941 2940 AssertComRC (rc); 2942 2941 2943 /*2944 * Check current parameters with new ones and issue handleDisplayResize()2945 * to let the new frame buffer adjust itself properly. Note that it will2946 * result into a recursive updateDisplayData() call but with2947 * aCheckOld = false.2948 */2949 if (aCheckParams &&2950 (mLastAddress != address ||2951 mLastBytesPerLine != bytesPerLine ||2952 mLastBitsPerPixel != bitsPerPixel ||2953 mLastWidth != (int) width ||2954 mLastHeight != (int) height))2955 {2956 handleDisplayResize (VBOX_VIDEO_PRIMARY_SCREEN, mLastBitsPerPixel,2957 mLastAddress,2958 mLastBytesPerLine,2959 mLastWidth,2960 mLastHeight);2961 return;2962 }2963 2964 2942 mpDrv->IConnector.pu8Data = (uint8_t *) address; 2965 2943 mpDrv->IConnector.cbScanline = bytesPerLine; … … 2977 2955 mpDrv->IConnector.cy = 0; 2978 2956 } 2957 LogFlowFunc (("leave\n")); 2979 2958 } 2980 2959 … … 3005 2984 that->mParent->consoleVRDPServer()->SendResize (); 3006 2985 3007 that->updateDisplayData (true /* aCheckParams */); 3008 2986 /* The driver might not have been constructed yet */ 2987 if (that->mpDrv) 2988 { 2989 /* Setup the new framebuffer, the resize will lead to an updateDisplayData call. */ 2990 DISPLAYFBINFO *pFBInfo = &that->maFramebuffers[uScreenId]; 2991 2992 if (pFBInfo->fVBVAEnabled && pFBInfo->pu8FramebufferVRAM) 2993 { 2994 /* This display in VBVA mode. Resize it to the last guest resolution, 2995 * if it has been reported. 2996 */ 2997 that->handleDisplayResize(uScreenId, pFBInfo->u16BitsPerPixel, 2998 pFBInfo->pu8FramebufferVRAM, 2999 pFBInfo->u32LineSize, 3000 pFBInfo->w, 3001 pFBInfo->h); 3002 } 3003 else if (uScreenId == VBOX_VIDEO_PRIMARY_SCREEN) 3004 { 3005 /* VGA device mode, only for the primary screen. */ 3006 that->handleDisplayResize(VBOX_VIDEO_PRIMARY_SCREEN, that->mLastBitsPerPixel, 3007 that->mLastAddress, 3008 that->mLastBytesPerLine, 3009 that->mLastWidth, 3010 that->mLastHeight); 3011 } 3012 } 3013 3014 LogFlowFunc (("leave\n")); 3009 3015 return VINF_SUCCESS; 3010 3016 } … … 3557 3563 Display *pThis = pDrv->pDisplay; 3558 3564 3559 pThis->maFramebuffers[uScreenId].fVBVAEnabled = false; 3560 3561 vbvaSetMemoryFlagsHGSMI(uScreenId, 0, false, &pThis->maFramebuffers[uScreenId]); 3562 3563 pThis->maFramebuffers[uScreenId].pVBVAHostFlags = NULL; 3565 DISPLAYFBINFO *pFBInfo = &pThis->maFramebuffers[uScreenId]; 3566 3567 pFBInfo->fVBVAEnabled = false; 3568 3569 vbvaSetMemoryFlagsHGSMI(uScreenId, 0, false, pFBInfo); 3570 3571 pFBInfo->pVBVAHostFlags = NULL; 3572 3573 pFBInfo->u32Offset = 0; /* Not used in HGSMI. */ 3574 pFBInfo->u32MaxFramebufferSize = 0; /* Not used in HGSMI. */ 3575 pFBInfo->u32InformationSize = 0; /* Not used in HGSMI. */ 3576 3577 pFBInfo->xOrigin = 0; 3578 pFBInfo->yOrigin = 0; 3579 3580 pFBInfo->w = 0; 3581 pFBInfo->h = 0; 3582 3583 pFBInfo->u16BitsPerPixel = 0; 3584 pFBInfo->pu8FramebufferVRAM = NULL; 3585 pFBInfo->u32LineSize = 0; 3564 3586 } 3565 3587
Note:
See TracChangeset
for help on using the changeset viewer.