vbox的更動 46065 路徑 trunk/src/VBox/Main/src-client
- 時間撮記:
- 2013-5-14 下午01:15:42 (12 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Main/src-client/DisplayImpl.cpp
r46057 r46065 123 123 int rc = RTCritSectInit(&mVBVALock); 124 124 AssertRC(rc); 125 126 rc = RTCritSectInit(&mSaveSeamlessRectLock); 127 AssertRC(rc); 128 125 129 mfu32PendingVideoAccelDisable = false; 126 130 … … 143 147 RTCritSectDelete (&mVBVALock); 144 148 memset (&mVBVALock, 0, sizeof (mVBVALock)); 149 } 150 151 if (RTCritSectIsInitialized (&mSaveSeamlessRectLock)) 152 { 153 RTCritSectDelete (&mSaveSeamlessRectLock); 154 memset (&mSaveSeamlessRectLock, 0, sizeof (mSaveSeamlessRectLock)); 145 155 } 146 156 BaseFinalRelease(); … … 821 831 } 822 832 LogRelFlow(("[%d]: default format %d\n", uScreenId, pFBInfo->fDefaultFormat)); 833 834 /* Handle the case if there are some saved visible region that needs to be 835 * applied after the resize of the framebuffer is completed 836 */ 837 if (pFBInfo->mcSavedVisibleRegion) 838 { 839 handleSetVisibleRegion(pFBInfo->mcSavedVisibleRegion, 840 pFBInfo->mpSavedVisibleRegion); 841 842 SaveSeamlessRectLock(); 843 if (pFBInfo->mpSavedVisibleRegion) 844 RTMemFree(pFBInfo->mpSavedVisibleRegion); 845 pFBInfo->mpSavedVisibleRegion = NULL; 846 pFBInfo->mcSavedVisibleRegion = 0; 847 SaveSeamlessRectUnLock(); 848 } 849 823 850 824 851 #ifdef DEBUG_sunlover … … 1082 1109 if (!pFBInfo->pFramebuffer.isNull()) 1083 1110 { 1111 if (pFBInfo->u32ResizeStatus != ResizeStatus_Void) 1112 { 1113 /* handle the case where new rectangles are received from the GA 1114 * when framebuffer resizing is in progress. 1115 * Just save the rectangles to be applied for later time when FB resizing is complete 1116 * (from handleResizeCompletedEMT). 1117 * This is done to prevent a race condition where a new rectangles are received 1118 * from the GA after a resize event and framebuffer resizing is still in progress 1119 * As a result the coordinates of the framebuffer are still 1120 * not updated and hence there is no intersection with the new rectangles passed 1121 * for the new region (THis is checked in the above if condition ). With 0 intersection, 1122 * cRectVisibleRegions = 0 is returned to the GUI and if GUI has invalidated its 1123 * earlier region then it draws nothihing and seamless mode doesn't display the 1124 * guest desktop. 1125 */ 1126 SaveSeamlessRectLock(); 1127 if(pFBInfo->mpSavedVisibleRegion) 1128 RTMemFree(pFBInfo->mpSavedVisibleRegion); 1129 1130 pFBInfo->mpSavedVisibleRegion = (RTRECT *)RTMemTmpAlloc( RT_MAX(cRect, 1) 1131 * sizeof (RTRECT)); 1132 if (pFBInfo->mpSavedVisibleRegion) 1133 { 1134 memcpy(pFBInfo->mpSavedVisibleRegion, pRect, cRect * sizeof(RTRECT)); 1135 pFBInfo->mcSavedVisibleRegion = cRect; 1136 } 1137 SaveSeamlessRectUnLock(); 1138 continue; 1139 } 1084 1140 /* Prepare a new array of rectangles which intersect with the framebuffer. 1085 1141 */ … … 1123 1179 } 1124 1180 } 1125 1126 1181 pFBInfo->pFramebuffer->SetVisibleRegion((BYTE *)pVisibleRegion, cRectVisibleRegion); 1127 1182 } … … 1361 1416 RTCritSectLeave(&mVBVALock); 1362 1417 } 1418 1419 int Display::SaveSeamlessRectLock(void) 1420 { 1421 return RTCritSectEnter(&mSaveSeamlessRectLock); 1422 } 1423 1424 void Display::SaveSeamlessRectUnLock(void) 1425 { 1426 RTCritSectLeave(&mSaveSeamlessRectLock); 1427 } 1428 1363 1429 1364 1430 /**
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器