Changeset 73097 in vbox for trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter
- Timestamp:
- Jul 12, 2018 9:06:33 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 123672
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/server_presenter.cpp
r71607 r73097 29 29 //#define CR_SERVER_WITH_CLIENT_CALLOUTS 30 30 31 #define PCR_FBTEX_FROM_TEX(_pTex) ((CR_FBTEX*)((uint8_t*)(_pTex) - RT_ OFFSETOF(CR_FBTEX, Tex)))32 #define PCR_FRAMEBUFFER_FROM_COMPOSITOR(_pCompositor) ((CR_FRAMEBUFFER*)((uint8_t*)(_pCompositor) - RT_ OFFSETOF(CR_FRAMEBUFFER, Compositor)))33 #define PCR_FBENTRY_FROM_ENTRY(_pEntry) ((CR_FRAMEBUFFER_ENTRY*)((uint8_t*)(_pEntry) - RT_ OFFSETOF(CR_FRAMEBUFFER_ENTRY, Entry)))31 #define PCR_FBTEX_FROM_TEX(_pTex) ((CR_FBTEX*)((uint8_t*)(_pTex) - RT_UOFFSETOF(CR_FBTEX, Tex))) 32 #define PCR_FRAMEBUFFER_FROM_COMPOSITOR(_pCompositor) ((CR_FRAMEBUFFER*)((uint8_t*)(_pCompositor) - RT_UOFFSETOF(CR_FRAMEBUFFER, Compositor))) 33 #define PCR_FBENTRY_FROM_ENTRY(_pEntry) ((CR_FRAMEBUFFER_ENTRY*)((uint8_t*)(_pEntry) - RT_UOFFSETOF(CR_FRAMEBUFFER_ENTRY, Entry))) 34 34 35 35 … … 3389 3389 uint32_t cRects; 3390 3390 const VBOXCMDVBVA_RECT *pPRects = pCmd->aRects; 3391 if ((cbCmd - RT_ OFFSETOF(VBOXCMDVBVA_BLT_PRIMARY, aRects)) % sizeof (VBOXCMDVBVA_RECT))3391 if ((cbCmd - RT_UOFFSETOF(VBOXCMDVBVA_BLT_PRIMARY, aRects)) % sizeof (VBOXCMDVBVA_RECT)) 3392 3392 { 3393 3393 WARN(("invalid argument size")); … … 3395 3395 } 3396 3396 3397 cRects = (cbCmd - RT_ OFFSETOF(VBOXCMDVBVA_BLT_PRIMARY, aRects)) / sizeof (VBOXCMDVBVA_RECT);3397 cRects = (cbCmd - RT_UOFFSETOF(VBOXCMDVBVA_BLT_PRIMARY, aRects)) / sizeof (VBOXCMDVBVA_RECT); 3398 3398 3399 3399 RTRECT *pRects = crVBoxServerCrCmdBltRecsUnpack(pPRects, cRects); … … 3650 3650 uint32_t cRects; 3651 3651 const VBOXCMDVBVA_RECT *pPRects = pCmd->aRects; 3652 if ((cbCmd - RT_ OFFSETOF(VBOXCMDVBVA_BLT_OFFPRIMSZFMT_OR_ID, aRects)) % sizeof (VBOXCMDVBVA_RECT))3652 if ((cbCmd - RT_UOFFSETOF(VBOXCMDVBVA_BLT_OFFPRIMSZFMT_OR_ID, aRects)) % sizeof (VBOXCMDVBVA_RECT)) 3653 3653 { 3654 3654 WARN(("invalid argument size")); … … 3656 3656 } 3657 3657 3658 cRects = (cbCmd - RT_ OFFSETOF(VBOXCMDVBVA_BLT_OFFPRIMSZFMT_OR_ID, aRects)) / sizeof (VBOXCMDVBVA_RECT);3658 cRects = (cbCmd - RT_UOFFSETOF(VBOXCMDVBVA_BLT_OFFPRIMSZFMT_OR_ID, aRects)) / sizeof (VBOXCMDVBVA_RECT); 3659 3659 3660 3660 RTRECT *pRects = crVBoxServerCrCmdBltRecsUnpack(pPRects, cRects); … … 3698 3698 uint32_t cRects; 3699 3699 const VBOXCMDVBVA_RECT *pPRects = pCmd->aRects; 3700 if ((cbCmd - RT_ OFFSETOF(VBOXCMDVBVA_BLT_SAMEDIM_A8R8G8B8, aRects)) % sizeof (VBOXCMDVBVA_RECT))3700 if ((cbCmd - RT_UOFFSETOF(VBOXCMDVBVA_BLT_SAMEDIM_A8R8G8B8, aRects)) % sizeof (VBOXCMDVBVA_RECT)) 3701 3701 { 3702 3702 WARN(("invalid argument size")); … … 3704 3704 } 3705 3705 3706 cRects = (cbCmd - RT_ OFFSETOF(VBOXCMDVBVA_BLT_SAMEDIM_A8R8G8B8, aRects)) / sizeof (VBOXCMDVBVA_RECT);3706 cRects = (cbCmd - RT_UOFFSETOF(VBOXCMDVBVA_BLT_SAMEDIM_A8R8G8B8, aRects)) / sizeof (VBOXCMDVBVA_RECT); 3707 3707 3708 3708 RTRECT *pRects = crVBoxServerCrCmdBltRecsUnpack(pPRects, cRects); … … 3767 3767 uint32_t cRects; 3768 3768 const VBOXCMDVBVA_RECT *pPRects = pCmd->aRects; 3769 if ((cbCmd - RT_ OFFSETOF(VBOXCMDVBVA_BLT_GENERIC_A8R8G8B8, aRects)) % sizeof (VBOXCMDVBVA_RECT))3769 if ((cbCmd - RT_UOFFSETOF(VBOXCMDVBVA_BLT_GENERIC_A8R8G8B8, aRects)) % sizeof (VBOXCMDVBVA_RECT)) 3770 3770 { 3771 3771 WARN(("invalid argument size")); … … 3773 3773 } 3774 3774 3775 cRects = (cbCmd - RT_ OFFSETOF(VBOXCMDVBVA_BLT_GENERIC_A8R8G8B8, aRects)) / sizeof (VBOXCMDVBVA_RECT);3775 cRects = (cbCmd - RT_UOFFSETOF(VBOXCMDVBVA_BLT_GENERIC_A8R8G8B8, aRects)) / sizeof (VBOXCMDVBVA_RECT); 3776 3776 3777 3777 RTRECT *pRects = crVBoxServerCrCmdBltRecsUnpack(pPRects, cRects); … … 3862 3862 uint32_t cRects; 3863 3863 const VBOXCMDVBVA_RECT *pPRects = pCmd->aRects; 3864 if ((cbCmd - RT_ OFFSETOF(VBOXCMDVBVA_CLRFILL_GENERIC_A8R8G8B8, aRects)) % sizeof (VBOXCMDVBVA_RECT))3864 if ((cbCmd - RT_UOFFSETOF(VBOXCMDVBVA_CLRFILL_GENERIC_A8R8G8B8, aRects)) % sizeof (VBOXCMDVBVA_RECT)) 3865 3865 { 3866 3866 WARN(("invalid argument size")); … … 3868 3868 } 3869 3869 3870 cRects = (cbCmd - RT_ OFFSETOF(VBOXCMDVBVA_CLRFILL_GENERIC_A8R8G8B8, aRects)) / sizeof (VBOXCMDVBVA_RECT);3870 cRects = (cbCmd - RT_UOFFSETOF(VBOXCMDVBVA_CLRFILL_GENERIC_A8R8G8B8, aRects)) / sizeof (VBOXCMDVBVA_RECT); 3871 3871 3872 3872 RTRECT *pRects = crVBoxServerCrCmdBltRecsUnpack(pPRects, cRects);
Note:
See TracChangeset
for help on using the changeset viewer.