VirtualBox

vbox的更動 34916 路徑 trunk/src/VBox/Additions/common


忽略:
時間撮記:
2010-12-9 下午05:29:43 (14 年 以前)
作者:
vboxsync
訊息:

crOgl/wddm: visible regions handling fix

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Additions/common/crOpenGL/load.c

    r34912 r34916  
    798798    }
    799799
    800     if (pRegions->pRegions->fFlags.bSetVisibleRects && pRegions->pRegions->fFlags.bSetViewRect)
    801     {
    802         int winX, winY;
    803         unsigned int winW, winH;
    804 
    805         winX = pRegions->pRegions->RectsInfo.aRects[0].left;
    806         winY = pRegions->pRegions->RectsInfo.aRects[0].top;
    807         winW = pRegions->pRegions->RectsInfo.aRects[0].right - winX;
    808         winH = pRegions->pRegions->RectsInfo.aRects[0].bottom - winY;
    809 
    810         if (stub.trackWindowPos && (winX!=pWindow->x || winY!=pWindow->y))
    811         {
    812             crDebug("Dispatched WindowPosition (%i)", pWindow->spuWindow);
    813             stub.spuDispatch.WindowPosition(pWindow->spuWindow, winX, winY);
    814             pWindow->x = winX;
    815             pWindow->y = winY;
    816             bChanged = true;
    817         }
    818 
    819         if (stub.trackWindowSize && (winW!=pWindow->width || winH!=pWindow->height))
    820         {
    821             crDebug("Dispatched WindowSize (%i)", pWindow->spuWindow);
    822             stub.spuDispatch.WindowSize(pWindow->spuWindow, winW, winH);
    823             pWindow->width = winW;
    824             pWindow->height = winH;
    825             bChanged = true;
    826         }
    827 
    828         hNewRgn = stubMakeRegionFromRects(pRegions->pRegions, 1);
    829 
    830         /* ensure the window is in sync to avoid possible incorrect host notifications  */
    831         {
    832             BOOL bRc = MoveWindow(pRegions->hWnd, winX, winY, winW, winH, FALSE /*BOOL bRepaint*/);
     800    if (pRegions->pRegions->fFlags.bSetVisibleRects || pRegions->pRegions->fFlags.bSetViewRect)
     801    {
     802        /* ensure data integrity */
     803        Assert(!pRegions->pRegions->fFlags.bAddHiddenRects);
     804
     805        if (pRegions->pRegions->fFlags.bSetViewRect)
     806        {
     807            int winX, winY;
     808            unsigned int winW, winH;
     809            BOOL bRc;
     810
     811            winX = pRegions->pRegions->RectsInfo.aRects[0].left;
     812            winY = pRegions->pRegions->RectsInfo.aRects[0].top;
     813            winW = pRegions->pRegions->RectsInfo.aRects[0].right - winX;
     814            winH = pRegions->pRegions->RectsInfo.aRects[0].bottom - winY;
     815
     816            if (stub.trackWindowPos && (winX!=pWindow->x || winY!=pWindow->y))
     817            {
     818                crDebug("Dispatched WindowPosition (%i)", pWindow->spuWindow);
     819                stub.spuDispatch.WindowPosition(pWindow->spuWindow, winX, winY);
     820                pWindow->x = winX;
     821                pWindow->y = winY;
     822                bChanged = true;
     823            }
     824
     825            if (stub.trackWindowSize && (winW!=pWindow->width || winH!=pWindow->height))
     826            {
     827                crDebug("Dispatched WindowSize (%i)", pWindow->spuWindow);
     828                stub.spuDispatch.WindowSize(pWindow->spuWindow, winW, winH);
     829                pWindow->width = winW;
     830                pWindow->height = winH;
     831                bChanged = true;
     832            }
     833
     834            bRc = MoveWindow(pRegions->hWnd, winX, winY, winW, winH, FALSE /*BOOL bRepaint*/);
    833835            if (!bRc)
    834836            {
     
    836838                crWarning("stubSyncTrUpdateWindowCB: MoveWindow failed winEr(%d)", winEr);
    837839            }
     840        }
     841
     842        if (pRegions->pRegions->fFlags.bSetVisibleRects)
     843        {
     844            hNewRgn = stubMakeRegionFromRects(pRegions->pRegions, pRegions->pRegions->fFlags.bSetViewRect ? 1 : 0);
    838845        }
    839846    }
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette