Changeset 47566 in vbox for trunk/src/VBox/GuestHost
- Timestamp:
- Aug 6, 2013 10:20:23 PM (11 years ago)
- Location:
- trunk/src/VBox/GuestHost/OpenGL
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/include/cr_server.h
r47485 r47566 209 209 VBOXVR_SCR_COMPOSITOR_ENTRY CEntry; 210 210 VBOXVR_SCR_COMPOSITOR_ENTRY RootVrCEntry; 211 void *pvUserData1;212 void *pvUserData2;213 211 } CR_DISPLAY_ENTRY, *PCR_DISPLAY_ENTRY; 214 212 /**/ … … 349 347 /* DISPLAY */ 350 348 349 #define CR_DENTRY_FROM_CENTRY(_pCentry) ((CR_DISPLAY_ENTRY*)((uint8_t*)(_pCentry) - RT_OFFSETOF(CR_DISPLAY_ENTRY, CEntry))) 350 351 351 352 /* @todo: 352 353 * 1. use compositor stored inside mural to use current MuralFBO and window-related API … … 359 360 } CR_DISPLAY, *PCR_DISPLAY; 360 361 361 int CrDpInit(PCR_DISPLAY pDisplay);362 void CrDpTerm(PCR_DISPLAY pDisplay);363 void CrDpResize(PCR_DISPLAY pDisplay, int32_t xPos, int32_t yPos, uint32_t width, uint32_t height);364 void CrDpEntryInit(PCR_DISPLAY_ENTRY pEntry, const VBOXVR_TEXTURE *pTextureData, void *pvUserData);365 void CrDpEntryCleanup(PCR_DISPLAY pDisplay, PCR_DISPLAY_ENTRY pEntry);366 int CrDpEntryRegionsSet(PCR_DISPLAY pDisplay, PCR_DISPLAY_ENTRY pEntry, const RTPOINT *pPos, uint32_t cRegions, const RTRECT *paRegions);367 int CrDpEntryRegionsAdd(PCR_DISPLAY pDisplay, PCR_DISPLAY_ENTRY pEntry, const RTPOINT *pPos, uint32_t cRegions, const RTRECT *paRegions);368 void CrDpEntryRegionsClear(PCR_DISPLAY pDisplay);369 DECLINLINE(bool) CrDpEntryIsUsed(PCR_DISPLAY_ENTRY pEntry)370 {371 return CrVrScrCompositorEntryIsInList(&pEntry->CEntry);372 }373 374 DECLINLINE(CRMuralInfo*) CrDpGetMural(PCR_DISPLAY pDisplay)375 {376 return &pDisplay->Mural;377 }378 362 379 363 typedef struct CR_DISPLAY_ENTRY_MAP 380 364 { 381 CRHashTable * pTex tureMap;365 CRHashTable * pTexIdToDemInfoMap; 382 366 } CR_DISPLAY_ENTRY_MAP, *PCR_DISPLAY_ENTRY_MAP; 383 367 384 int CrDemInit(PCR_DISPLAY_ENTRY_MAP pMap);385 void CrDemTerm(PCR_DISPLAY_ENTRY_MAP pMap);386 PCR_DISPLAY_ENTRY CrDemEntryAcquire(PCR_DISPLAY_ENTRY_MAP pMap, GLuint idTexture);387 void CrDemEntryRelease(PCR_DISPLAY_ENTRY pEntry);388 //void CrDemEntryDestroy(PCR_DISPLAY_ENTRY_MAP pMap, GLuint idTexture);389 368 390 369 /* */ -
trunk/src/VBox/GuestHost/OpenGL/include/cr_version.h
r47116 r47566 37 37 /* dummy windows and contexts have 0 external IDs, so never get stored to the state */ 38 38 #define SHCROGL_SSM_VERSION_WITH_FIXED_DUMMYIDS 39 39 #define SHCROGL_SSM_VERSION 39 39 #define SHCROGL_SSM_VERSION_WITH_SCREEN_INFO 40 40 #define SHCROGL_SSM_VERSION 40 40 41 41 42 /* These define the Chromium release number. -
trunk/src/VBox/GuestHost/OpenGL/include/cr_vreg.h
r46966 r47566 400 400 VBOXVREGDECL(int) CrVrScrCompositorEntryRemove(PVBOXVR_SCR_COMPOSITOR pCompositor, PVBOXVR_SCR_COMPOSITOR_ENTRY pEntry); 401 401 VBOXVREGDECL(void) CrVrScrCompositorEntryFlagsSet(PVBOXVR_SCR_COMPOSITOR_ENTRY pEntry, uint32_t fFlags); 402 VBOXVREGDECL(uint32_t) CrVrScrCompositorEntryFlagsGet(PVBOXVR_SCR_COMPOSITOR pCompositor, PVBOXVR_SCR_COMPOSITOR_ENTRY pEntry); 402 VBOXVREGDECL(uint32_t) CrVrScrCompositorEntryFlagsCombinedGet(PVBOXVR_SCR_COMPOSITOR pCompositor, PVBOXVR_SCR_COMPOSITOR_ENTRY pEntry); 403 DECLINLINE(uint32_t) CrVrScrCompositorEntryFlagsGet(PVBOXVR_SCR_COMPOSITOR_ENTRY pEntry) 404 { 405 return pEntry->fFlags; 406 } 407 403 408 VBOXVREGDECL(void) CrVrScrCompositorInit(PVBOXVR_SCR_COMPOSITOR pCompositor); 404 409 VBOXVREGDECL(void) CrVrScrCompositorClear(PVBOXVR_SCR_COMPOSITOR pCompositor); -
trunk/src/VBox/GuestHost/OpenGL/util/vreg.cpp
r46966 r47566 1749 1749 Assert(cRects); 1750 1750 Assert(cRects <= pData->cRects); 1751 int rc = VBoxVrListRectsGet(&pCEntry->Vr, cRects, pEntry->paDst Rects);1751 int rc = VBoxVrListRectsGet(&pCEntry->Vr, cRects, pEntry->paDstUnstretchedRects); 1752 1752 AssertRC(rc); 1753 1753 1754 memcpy(pEntry->paDstUnstretchedRects, pEntry->paDstRects, cRects * sizeof (*pEntry->paDstUnstretchedRects));1755 1756 1754 if (!pEntry->Pos.x && !pEntry->Pos.y) 1757 1755 { 1758 memcpy(pEntry->paSrcRects, pEntry->paDst Rects, cRects * sizeof (*pEntry->paSrcRects));1756 memcpy(pEntry->paSrcRects, pEntry->paDstUnstretchedRects, cRects * sizeof (*pEntry->paSrcRects)); 1759 1757 } 1760 1758 else … … 1762 1760 for (uint32_t i = 0; i < cRects; ++i) 1763 1761 { 1764 pEntry->paSrcRects[i].xLeft = (int32_t)((pEntry->paDst Rects[i].xLeft - pEntry->Pos.x));1765 pEntry->paSrcRects[i].yTop = (int32_t)((pEntry->paDst Rects[i].yTop - pEntry->Pos.y));1766 pEntry->paSrcRects[i].xRight = (int32_t)((pEntry->paDst Rects[i].xRight - pEntry->Pos.x));1767 pEntry->paSrcRects[i].yBottom = (int32_t)((pEntry->paDst Rects[i].yBottom - pEntry->Pos.y));1762 pEntry->paSrcRects[i].xLeft = (int32_t)((pEntry->paDstUnstretchedRects[i].xLeft - pEntry->Pos.x)); 1763 pEntry->paSrcRects[i].yTop = (int32_t)((pEntry->paDstUnstretchedRects[i].yTop - pEntry->Pos.y)); 1764 pEntry->paSrcRects[i].xRight = (int32_t)((pEntry->paDstUnstretchedRects[i].xRight - pEntry->Pos.x)); 1765 pEntry->paSrcRects[i].yBottom = (int32_t)((pEntry->paDstUnstretchedRects[i].yBottom - pEntry->Pos.y)); 1768 1766 } 1769 1767 } … … 1776 1774 if (pCompositor->StretchX != 1.) 1777 1775 { 1778 pEntry->paDstRects[i].xLeft = (int32_t)(pEntry->paDst Rects[i].xLeft * pCompositor->StretchX);1779 pEntry->paDstRects[i].xRight = (int32_t)(pEntry->paDst Rects[i].xRight * pCompositor->StretchX);1776 pEntry->paDstRects[i].xLeft = (int32_t)(pEntry->paDstUnstretchedRects[i].xLeft * pCompositor->StretchX); 1777 pEntry->paDstRects[i].xRight = (int32_t)(pEntry->paDstUnstretchedRects[i].xRight * pCompositor->StretchX); 1780 1778 } 1781 1779 if (pCompositor->StretchY != 1.) 1782 1780 { 1783 pEntry->paDstRects[i].yTop = (int32_t)(pEntry->paDstRects[i].yTop * pCompositor->StretchY); 1784 pEntry->paDstRects[i].yBottom = (int32_t)(pEntry->paDstRects[i].yBottom * pCompositor->StretchY); 1785 } 1786 } 1787 } 1788 1781 pEntry->paDstRects[i].yTop = (int32_t)(pEntry->paDstUnstretchedRects[i].yTop * pCompositor->StretchY); 1782 pEntry->paDstRects[i].yBottom = (int32_t)(pEntry->paDstUnstretchedRects[i].yBottom * pCompositor->StretchY); 1783 } 1784 } 1785 } 1786 else 1787 #endif 1788 { 1789 memcpy(pEntry->paDstRects, pEntry->paDstUnstretchedRects, cRects * sizeof (*pEntry->paDstUnstretchedRects)); 1790 } 1791 1792 #if 0//ndef IN_RING0 1789 1793 bool canZeroX = (pCompositor->StretchX < 1.); 1790 1794 bool canZeroY = (pCompositor->StretchY < 1.); … … 1795 1799 for (iOrig = 0, iNew = 0; iOrig < cRects; ++iOrig) 1796 1800 { 1797 PRTRECT pOrigRect = &pEntry->pa SrcRects[iOrig];1798 if (pOrigRect->xLeft == pOrigRect->xRight1799 || pOrigRect->yTop == pOrigRect->yBottom)1801 PRTRECT pOrigRect = &pEntry->paDstRects[iOrig]; 1802 if (pOrigRect->xLeft != pOrigRect->xRight 1803 && pOrigRect->yTop != pOrigRect->yBottom) 1800 1804 continue; 1801 1805 … … 2294 2298 } 2295 2299 2296 VBOXVREGDECL(uint32_t) CrVrScrCompositorEntryFlags Get(PVBOXVR_SCR_COMPOSITOR pCompositor, PVBOXVR_SCR_COMPOSITOR_ENTRY pEntry)2300 VBOXVREGDECL(uint32_t) CrVrScrCompositorEntryFlagsCombinedGet(PVBOXVR_SCR_COMPOSITOR pCompositor, PVBOXVR_SCR_COMPOSITOR_ENTRY pEntry) 2297 2301 { 2298 2302 return CRBLT_FOP_COMBINE(pCompositor->fFlags, pEntry->fFlags);
Note:
See TracChangeset
for help on using the changeset viewer.