Changeset 52429 in vbox for trunk/src/VBox/HostServices/SharedOpenGL/crserverlib
- Timestamp:
- Aug 20, 2014 11:58:38 AM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 95613
- Location:
- trunk/src/VBox/HostServices/SharedOpenGL/crserverlib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_main.c
r52260 r52429 282 282 283 283 VBoxVrTerm(); 284 285 RTSemEventDestroy(cr_server.hCalloutCompletionEvent); 284 286 } 285 287 … … 513 515 514 516 cr_server.pCleanupClient = NULL; 517 518 rc = RTSemEventCreate(&cr_server.hCalloutCompletionEvent); 519 if (!RT_SUCCESS(rc)) 520 { 521 WARN(("RTSemEventCreate failed %d", rc)); 522 return GL_FALSE; 523 } 515 524 516 525 /* … … 4232 4241 g_pLed = pSetup->pLed; 4233 4242 4243 cr_server.ClientInfo = pSetup->CrClientInfo; 4244 4234 4245 pSetup->CrCmdServerInfo.hSvr = NULL; 4235 4246 pSetup->CrCmdServerInfo.pfnEnable = crVBoxCrCmdEnable; -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_presenter.cpp
r52384 r52429 46 46 #include "render/renderspu.h" 47 47 48 //#define CR_SERVER_WITH_CLIENT_CALLOUTS 49 48 50 class ICrFbDisplay 49 51 { … … 72 74 class CrFbDisplayWindowRootVr; 73 75 class CrFbDisplayVrdp; 76 class CrFbWindow; 74 77 75 78 typedef struct CR_FRAMEBUFFER … … 126 129 CrFbDisplayWindowRootVr *pDpWinRootVr; 127 130 CrFbDisplayVrdp *pDpVrdp; 131 CrFbWindow *pWindow; 132 uint32_t u32DisplayMode; 128 133 uint32_t u32Id; 129 134 int32_t iFb; … … 152 157 } CR_PRESENTER_GLOBALS; 153 158 159 static int crPMgrFbConnectTargetDisplays(HCR_FRAMEBUFFER hFb, CR_FBDISPLAY_INFO *pDpInfo, uint32_t u32ModeAdd); 160 154 161 static CR_PRESENTER_GLOBALS g_CrPresenter; 155 162 … … 2656 2663 virtual int UpdateBegin(struct CR_FRAMEBUFFER *pFb) 2657 2664 { 2658 int rc = mpWindow ->UpdateBegin();2665 int rc = mpWindow ? mpWindow->UpdateBegin() : VINF_SUCCESS; 2659 2666 if (RT_SUCCESS(rc)) 2660 2667 { … … 2663 2670 return VINF_SUCCESS; 2664 2671 else 2672 { 2665 2673 WARN(("err")); 2674 if (mpWindow) 2675 mpWindow->UpdateEnd(); 2676 } 2666 2677 } 2667 2678 else … … 2675 2686 CrFbDisplayBase::UpdateEnd(pFb); 2676 2687 2677 mpWindow->UpdateEnd(); 2688 if (mpWindow) 2689 mpWindow->UpdateEnd(); 2678 2690 } 2679 2691 … … 2687 2699 } 2688 2700 2689 if (mpWindow ->GetParentId())2701 if (mpWindow && mpWindow->GetParentId()) 2690 2702 { 2691 2703 rc = mpWindow->Create(); … … 2709 2721 } 2710 2722 2711 if (mpWindow ->GetParentId())2723 if (mpWindow && mpWindow->GetParentId()) 2712 2724 { 2713 2725 rc = mpWindow->Create(); … … 2731 2743 } 2732 2744 2733 if (mpWindow ->GetParentId())2745 if (mpWindow && mpWindow->GetParentId()) 2734 2746 { 2735 2747 rc = mpWindow->Create(); … … 2753 2765 } 2754 2766 2755 if (mpWindow ->GetParentId())2767 if (mpWindow && mpWindow->GetParentId()) 2756 2768 { 2757 2769 rc = mpWindow->Create(); … … 2793 2805 // always call SetPosition to ensure window is adjustep properly 2794 2806 // if (pViewportRect->xLeft != mViewportRect.xLeft || pViewportRect->yTop != mViewportRect.yTop) 2807 if (mpWindow) 2795 2808 { 2796 2809 const RTRECT* pRect = getRect(); … … 2808 2821 } 2809 2822 2810 virtual CrFbWindow * windowDetach( )2823 virtual CrFbWindow * windowDetach(bool fCleanup = true) 2811 2824 { 2812 2825 if (isUpdating()) … … 2819 2832 if (mpWindow) 2820 2833 { 2821 windowCleanup(); 2834 if (fCleanup) 2835 windowCleanup(); 2822 2836 mpWindow = NULL; 2823 2837 } … … 2848 2862 mDefaultParentId = parentId; 2849 2863 2850 if (!isActive() )2864 if (!isActive() && mpWindow) 2851 2865 { 2852 2866 int rc = mpWindow->Reparent(parentId); … … 2872 2886 int rc = VINF_SUCCESS; 2873 2887 2874 if (isActive() )2888 if (isActive() && mpWindow) 2875 2889 { 2876 2890 rc = mpWindow->Reparent(parentId); … … 2898 2912 if (!hFb || !CrFbIsEnabled(hFb)) 2899 2913 { 2900 Assert(!mpWindow ->IsVisivle());2914 Assert(!mpWindow || !mpWindow->IsVisivle()); 2901 2915 return VINF_SUCCESS; 2902 2916 } 2903 2917 2904 int rc = mpWindow->UpdateBegin(); 2905 if (RT_SUCCESS(rc)) 2906 { 2907 rc = mpWindow->SetVisible(!g_CrPresenter.fWindowsForceHidden); 2908 if (!RT_SUCCESS(rc)) 2909 WARN(("SetVisible failed, rc %d", rc)); 2910 2911 mpWindow->UpdateEnd(); 2912 } 2913 else 2914 WARN(("UpdateBegin failed, rc %d", rc)); 2918 int rc = VINF_SUCCESS; 2919 2920 if (mpWindow) 2921 { 2922 rc = mpWindow->UpdateBegin(); 2923 if (RT_SUCCESS(rc)) 2924 { 2925 rc = mpWindow->SetVisible(!g_CrPresenter.fWindowsForceHidden); 2926 if (!RT_SUCCESS(rc)) 2927 WARN(("SetVisible failed, rc %d", rc)); 2928 2929 mpWindow->UpdateEnd(); 2930 } 2931 else 2932 WARN(("UpdateBegin failed, rc %d", rc)); 2933 } 2915 2934 2916 2935 return rc; 2917 2936 } 2918 2937 2938 CrFbWindow* getWindow() {return mpWindow;} 2919 2939 protected: 2920 2940 virtual void onUpdateEnd() … … 2932 2952 virtual void ueRegions() 2933 2953 { 2934 mpWindow->SetVisibleRegionsChanged(); 2954 if (mpWindow) 2955 mpWindow->SetVisibleRegionsChanged(); 2935 2956 } 2936 2957 … … 2955 2976 virtual int windowSetCompositor(bool fSet) 2956 2977 { 2978 if (!mpWindow) 2979 return VINF_SUCCESS; 2980 2957 2981 if (fSet) 2958 2982 { … … 2965 2989 virtual int windowCleanup() 2966 2990 { 2991 if (!mpWindow) 2992 return VINF_SUCCESS; 2993 2967 2994 int rc = mpWindow->UpdateBegin(); 2968 2995 if (!RT_SUCCESS(rc)) … … 3013 3040 { 3014 3041 int rc = VINF_SUCCESS; 3042 3043 if (!mpWindow) 3044 return VINF_SUCCESS; 3015 3045 3016 3046 // HCR_FRAMEBUFFER hFb = getFramebuffer(); … … 3061 3091 } 3062 3092 3093 #if 0 3063 3094 rc = mpWindow->Reparent(mDefaultParentId); 3064 3095 if (!RT_SUCCESS(rc)) … … 3067 3098 return rc; 3068 3099 } 3100 #endif 3069 3101 } 3070 3102 … … 3074 3106 virtual int windowSync() 3075 3107 { 3108 if (!mpWindow) 3109 return VINF_SUCCESS; 3110 3076 3111 int rc = mpWindow->UpdateBegin(); 3077 3112 if (!RT_SUCCESS(rc)) … … 3124 3159 if (CrFbHas3DData(hFb)) 3125 3160 { 3126 if (mpWindow ->GetParentId())3161 if (mpWindow && mpWindow->GetParentId()) 3127 3162 { 3128 3163 rc = mpWindow->Create(); … … 3144 3179 } 3145 3180 3146 CrFbWindow* getWindow() {return mpWindow;}3147 3181 private: 3148 3182 CrFbWindow *mpWindow; … … 4166 4200 } 4167 4201 4202 static int crPMgrCheckInitWindowDisplays(uint32_t idScreen) 4203 { 4204 #ifdef CR_SERVER_WITH_CLIENT_CALLOUTS 4205 CR_FBDISPLAY_INFO *pDpInfo = &g_CrPresenter.aDisplayInfos[idScreen]; 4206 if (pDpInfo->iFb >= 0) 4207 { 4208 uint32_t u32ModeAdd = g_CrPresenter.u32DisplayMode & (CR_PMGR_MODE_WINDOW | CR_PMGR_MODE_ROOTVR); 4209 int rc = crPMgrFbConnectTargetDisplays(&g_CrPresenter.aFramebuffers[pDpInfo->iFb], pDpInfo, u32ModeAdd); 4210 if (RT_FAILURE(rc)) 4211 { 4212 WARN(("crPMgrFbConnectTargetDisplays failed %d", rc)); 4213 return rc; 4214 } 4215 } 4216 #endif 4217 return VINF_SUCCESS; 4218 } 4219 4168 4220 int CrPMgrScreenChanged(uint32_t idScreen) 4169 4221 { … … 4176 4228 int rc = VINF_SUCCESS; 4177 4229 CR_FBDISPLAY_INFO *pDpInfo; 4230 #if 0 4178 4231 bool fDefaultParentChange = (idScreen == 0); 4179 4232 if (fDefaultParentChange) … … 4217 4270 } 4218 4271 } 4272 #endif 4219 4273 4220 4274 pDpInfo = &g_CrPresenter.aDisplayInfos[idScreen]; 4275 4276 HCR_FRAMEBUFFER hFb = pDpInfo->iFb >= 0 ? CrPMgrFbGet(pDpInfo->iFb) : NULL; 4277 if (hFb && CrFbIsUpdating(hFb)) 4278 { 4279 WARN(("trying to update viewport while framebuffer is being updated")); 4280 rc = VERR_INVALID_STATE; 4281 goto end; 4282 } 4283 4221 4284 if (pDpInfo->pDpWin) 4222 4285 { 4223 HCR_FRAMEBUFFER hFb = pDpInfo->iFb >= 0 ? CrPMgrFbGet(pDpInfo->iFb) : NULL; 4224 if (hFb && CrFbIsUpdating(hFb)) 4225 { 4226 WARN(("trying to update viewport while framebuffer is being updated")); 4227 rc = VERR_INVALID_STATE; 4228 goto end; 4229 } 4286 CRASSERT(pDpInfo->pDpWin->getWindow()); 4230 4287 4231 4288 rc = pDpInfo->pDpWin->UpdateBegin(hFb); … … 4239 4296 WARN(("UpdateBegin failed %d", rc)); 4240 4297 } 4241 4298 else 4299 { 4300 if (pDpInfo->pWindow) 4301 { 4302 rc = pDpInfo->pWindow->UpdateBegin(); 4303 if (RT_FAILURE(rc)) 4304 { 4305 WARN(("UpdateBegin failed %d", rc)); 4306 goto end; 4307 } 4308 4309 rc = pDpInfo->pWindow->SetVisible(false); 4310 if (RT_FAILURE(rc)) 4311 { 4312 WARN(("SetVisible failed %d", rc)); 4313 pDpInfo->pWindow->UpdateEnd(); 4314 goto end; 4315 } 4316 4317 rc = pDpInfo->pWindow->Reparent(cr_server.screen[idScreen].winID); 4318 if (RT_FAILURE(rc)) 4319 { 4320 WARN(("Reparent failed %d", rc)); 4321 pDpInfo->pWindow->UpdateEnd(); 4322 goto end; 4323 } 4324 4325 pDpInfo->pWindow->UpdateEnd(); 4326 } 4327 4328 rc = crPMgrCheckInitWindowDisplays(idScreen); 4329 if (RT_FAILURE(rc)) 4330 { 4331 WARN(("crPMgrFbConnectTargetDisplays failed %d", rc)); 4332 goto end; 4333 } 4334 } 4242 4335 end: 4243 4336 #if 0 4244 4337 if (fDefaultParentChange) 4245 4338 { … … 4254 4347 } 4255 4348 } 4256 4349 #endif 4257 4350 return rc; 4258 4351 } … … 4276 4369 } 4277 4370 4278 int rc = pDpInfo->pDpWin->UpdateBegin(hFb); 4279 if (RT_SUCCESS(rc)) 4280 { 4281 pDpInfo->pDpWin->setViewportRect(&cr_server.screenVieport[idScreen].Rect); 4282 pDpInfo->pDpWin->UpdateEnd(hFb); 4283 } 4284 else 4285 WARN(("UpdateBegin failed %d", rc)); 4371 if (pDpInfo->pDpWin) 4372 { 4373 CRASSERT(pDpInfo->pDpWin->getWindow()); 4374 int rc = pDpInfo->pDpWin->UpdateBegin(hFb); 4375 if (RT_SUCCESS(rc)) 4376 { 4377 pDpInfo->pDpWin->setViewportRect(&cr_server.screenVieport[idScreen].Rect); 4378 pDpInfo->pDpWin->UpdateEnd(hFb); 4379 } 4380 else 4381 WARN(("UpdateBegin failed %d", rc)); 4382 } 4286 4383 } 4287 4384 … … 4399 4496 if (pDpInfo->pDpWinRootVr) 4400 4497 { 4498 #ifdef CR_SERVER_WITH_CLIENT_CALLOUTS 4499 CrFbWindow *pWindow = pDpInfo->pDpWinRootVr->windowDetach(false); 4500 Assert(pWindow == pDpInfo->pWindow); 4501 #endif 4401 4502 rc = crPMgrFbDisconnectDisplay(hFb, pDpInfo->pDpWinRootVr); 4402 4503 if (RT_FAILURE(rc)) … … 4406 4507 } 4407 4508 } 4408 4409 if (pDpInfo->pDpWin) 4410 { 4509 else if (pDpInfo->pDpWin) 4510 { 4511 #ifdef CR_SERVER_WITH_CLIENT_CALLOUTS 4512 CrFbWindow *pWindow = pDpInfo->pDpWin->windowDetach(false); 4513 Assert(pWindow == pDpInfo->pWindow); 4514 #endif 4411 4515 rc = crPMgrFbDisconnectDisplay(hFb, pDpInfo->pDpWin); 4412 4516 if (RT_FAILURE(rc)) … … 4427 4531 if (!pDpInfo->pDpWinRootVr) 4428 4532 { 4429 CrFbWindow *pWin = NULL;4430 4533 if (pDpInfo->pDpWin) 4431 4534 { 4432 pWin = pDpInfo->pDpWin->windowDetach();4535 CrFbWindow *pWin = pDpInfo->pDpWin->windowDetach(); 4433 4536 CRASSERT(pWin); 4537 Assert(pWin == pDpInfo->pWindow); 4434 4538 delete pDpInfo->pDpWin; 4435 4539 pDpInfo->pDpWin = NULL; 4436 4540 } 4437 else 4438 pWin = new CrFbWindow(0); 4439 4440 pDpInfo->pDpWinRootVr = new CrFbDisplayWindowRootVr(&cr_server.screenVieport[pDpInfo->u32Id].Rect, cr_server.screen[pDpInfo->u32Id].winID, cr_server.screen[0].winID); 4541 else if (!pDpInfo->pWindow) 4542 { 4543 pDpInfo->pWindow = new CrFbWindow(0); 4544 } 4545 4546 pDpInfo->pDpWinRootVr = new CrFbDisplayWindowRootVr(&cr_server.screenVieport[pDpInfo->u32Id].Rect, cr_server.screen[pDpInfo->u32Id].winID, /*cr_server.screen[0].winID*/ 0); 4441 4547 pDpInfo->pDpWin = pDpInfo->pDpWinRootVr; 4442 pDpInfo->pDpWinRootVr->windowAttach(p Win);4548 pDpInfo->pDpWinRootVr->windowAttach(pDpInfo->pWindow); 4443 4549 } 4444 4550 } … … 4446 4552 static void crPMgrDpWinCreate(CR_FBDISPLAY_INFO *pDpInfo) 4447 4553 { 4448 CrFbWindow *pWin = NULL;4449 4554 if (pDpInfo->pDpWinRootVr) 4450 4555 { 4451 4556 CRASSERT(pDpInfo->pDpWinRootVr == pDpInfo->pDpWin); 4452 pWin = pDpInfo->pDpWin->windowDetach();4557 CrFbWindow *pWin = pDpInfo->pDpWin->windowDetach(); 4453 4558 CRASSERT(pWin); 4559 Assert(pWin == pDpInfo->pWindow); 4454 4560 delete pDpInfo->pDpWinRootVr; 4455 4561 pDpInfo->pDpWinRootVr = NULL; … … 4459 4565 if (!pDpInfo->pDpWin) 4460 4566 { 4461 if (!p Win)4462 p Win= new CrFbWindow(0);4463 4464 pDpInfo->pDpWin = new CrFbDisplayWindow(&cr_server.screenVieport[pDpInfo->u32Id].Rect, cr_server.screen[pDpInfo->u32Id].winID, cr_server.screen[0].winID);4465 pDpInfo->pDpWin->windowAttach(p Win);4567 if (!pDpInfo->pWindow) 4568 pDpInfo->pWindow = new CrFbWindow(0); 4569 4570 pDpInfo->pDpWin = new CrFbDisplayWindow(&cr_server.screenVieport[pDpInfo->u32Id].Rect, cr_server.screen[pDpInfo->u32Id].winID, /*cr_server.screen[0].winID*/ 0); 4571 pDpInfo->pDpWin->windowAttach(pDpInfo->pWindow); 4466 4572 } 4467 4573 } … … 4472 4578 if (u32ModeRemove & CR_PMGR_MODE_ROOTVR) 4473 4579 { 4474 CRASSERT(pDpInfo->pDpWinRootVr); 4475 CRASSERT(pDpInfo->pDpWin == pDpInfo->pDpWinRootVr); 4476 rc = crPMgrFbDisconnectDisplay(hFb, pDpInfo->pDpWinRootVr); 4477 if (RT_FAILURE(rc)) 4478 { 4479 WARN(("crPMgrFbDisconnectDisplay pDpWinRootVr failed %d", rc)); 4480 return rc; 4580 if (pDpInfo->pDpWinRootVr) 4581 { 4582 #ifdef CR_SERVER_WITH_CLIENT_CALLOUTS 4583 CrFbWindow *pWindow = pDpInfo->pDpWinRootVr->windowDetach(false); 4584 Assert(pWindow == pDpInfo->pWindow); 4585 #endif 4586 CRASSERT(pDpInfo->pDpWin == pDpInfo->pDpWinRootVr); 4587 rc = crPMgrFbDisconnectDisplay(hFb, pDpInfo->pDpWinRootVr); 4588 if (RT_FAILURE(rc)) 4589 { 4590 WARN(("crPMgrFbDisconnectDisplay pDpWinRootVr failed %d", rc)); 4591 return rc; 4592 } 4481 4593 } 4482 4594 } … … 4484 4596 { 4485 4597 CRASSERT(!pDpInfo->pDpWinRootVr); 4486 CRASSERT(pDpInfo->pDpWin); 4487 rc = crPMgrFbDisconnectDisplay(hFb, pDpInfo->pDpWin); 4488 if (RT_FAILURE(rc)) 4489 { 4490 WARN(("crPMgrFbDisconnectDisplay pDpWin failed %d", rc)); 4491 return rc; 4598 if (pDpInfo->pDpWin) 4599 { 4600 #ifdef CR_SERVER_WITH_CLIENT_CALLOUTS 4601 CrFbWindow *pWindow = pDpInfo->pDpWin->windowDetach(false); 4602 Assert(pWindow == pDpInfo->pWindow); 4603 #endif 4604 rc = crPMgrFbDisconnectDisplay(hFb, pDpInfo->pDpWin); 4605 if (RT_FAILURE(rc)) 4606 { 4607 WARN(("crPMgrFbDisconnectDisplay pDpWin failed %d", rc)); 4608 return rc; 4609 } 4492 4610 } 4493 4611 } … … 4495 4613 if (u32ModeRemove & CR_PMGR_MODE_VRDP) 4496 4614 { 4497 CRASSERT(pDpInfo->pDpVrdp); 4498 rc = crPMgrFbDisconnectDisplay(hFb, pDpInfo->pDpVrdp); 4499 if (RT_FAILURE(rc)) 4500 { 4501 WARN(("crPMgrFbDisconnectDisplay pDpVrdp failed %d", rc)); 4502 return rc; 4503 } 4504 } 4615 if (pDpInfo->pDpVrdp) 4616 { 4617 rc = crPMgrFbDisconnectDisplay(hFb, pDpInfo->pDpVrdp); 4618 if (RT_FAILURE(rc)) 4619 { 4620 WARN(("crPMgrFbDisconnectDisplay pDpVrdp failed %d", rc)); 4621 return rc; 4622 } 4623 } 4624 } 4625 4626 pDpInfo->u32DisplayMode &= ~u32ModeRemove; 4505 4627 4506 4628 return VINF_SUCCESS; … … 4546 4668 } 4547 4669 } 4670 4671 pDpInfo->u32DisplayMode |= u32ModeAdd; 4548 4672 4549 4673 return VINF_SUCCESS; … … 4579 4703 } 4580 4704 4581 rc = crPMgrFbConnectTargetDisplays(hFb, pDpInfo, g_CrPresenter.u32DisplayMode); 4705 rc = crPMgrFbConnectTargetDisplays(hFb, pDpInfo, g_CrPresenter.u32DisplayMode 4706 #ifdef CR_SERVER_WITH_CLIENT_CALLOUTS 4707 & ~(CR_PMGR_MODE_WINDOW | CR_PMGR_MODE_ROOTVR) 4708 #endif 4709 ); 4582 4710 if (RT_FAILURE(rc)) 4583 4711 { … … 4678 4806 if (!pDpInfo->pDpWinRootVr->getFramebuffer()) 4679 4807 { 4808 pDpInfo->pDpWinRootVr->windowDetach(false); 4680 4809 delete pDpInfo->pDpWinRootVr; 4681 4810 pDpInfo->pDpWinRootVr = NULL; 4682 4811 pDpInfo->pDpWin = NULL; 4812 if (pDpInfo->pWindow) 4813 { 4814 delete pDpInfo->pWindow; 4815 pDpInfo->pWindow = NULL; 4816 } 4683 4817 } 4684 4818 else … … 4689 4823 if (!pDpInfo->pDpWin->getFramebuffer()) 4690 4824 { 4825 pDpInfo->pDpWin->windowDetach(false); 4691 4826 delete pDpInfo->pDpWin; 4692 4827 pDpInfo->pDpWin = NULL; 4828 if (pDpInfo->pWindow) 4829 { 4830 delete pDpInfo->pWindow; 4831 pDpInfo->pWindow = NULL; 4832 } 4693 4833 } 4694 4834 else … … 4981 5121 if (fFbInfoChanged) 4982 5122 { 5123 #ifdef CR_SERVER_WITH_CLIENT_CALLOUTS 5124 rc = crPMgrModeModify(hFb, 0, CR_PMGR_MODE_WINDOW | CR_PMGR_MODE_ROOTVR); 5125 if (!RT_SUCCESS(rc)) 5126 { 5127 WARN(("crPMgrModeModifyTarget failed %d", rc)); 5128 return rc; 5129 } 5130 #endif 4983 5131 rc = CrFbUpdateBegin(hFb); 4984 5132 if (!RT_SUCCESS(rc)) … … 6206 6354 return 0; 6207 6355 } 6356 6357 typedef struct CRSERVER_CLIENT_CALLOUT 6358 { 6359 VBOXCRCMDCTL_CALLOUT_LISTENTRY Entry; 6360 PFNVCRSERVER_CLIENT_CALLOUT_CB pfnCb; 6361 void*pvCb; 6362 } CRSERVER_CLIENT_CALLOUT; 6363 6364 static DECLCALLBACK(void) crServerClientCalloutCb(struct VBOXCRCMDCTL_CALLOUT_LISTENTRY *pEntry) 6365 { 6366 CRSERVER_CLIENT_CALLOUT *pCallout = RT_FROM_MEMBER(pEntry, CRSERVER_CLIENT_CALLOUT, Entry); 6367 pCallout->pfnCb(pCallout->pvCb); 6368 int rc = RTSemEventSignal(cr_server.hCalloutCompletionEvent); 6369 if (RT_FAILURE(rc)) 6370 WARN(("RTSemEventSignal failed rc %d", rc)); 6371 } 6372 6373 static DECLCALLBACK(void) crServerClientCallout(PFNVCRSERVER_CLIENT_CALLOUT_CB pfnCb, void*pvCb) 6374 { 6375 Assert(cr_server.pCurrentCalloutCtl); 6376 CRSERVER_CLIENT_CALLOUT Callout; 6377 Callout.pfnCb = pfnCb; 6378 Callout.pvCb = pvCb; 6379 cr_server.ClientInfo.pfnCallout(cr_server.ClientInfo.hClient, cr_server.pCurrentCalloutCtl, &Callout.Entry, crServerClientCalloutCb); 6380 6381 int rc = RTSemEventWait(cr_server.hCalloutCompletionEvent, RT_INDEFINITE_WAIT); 6382 if (RT_FAILURE(rc)) 6383 WARN(("RTSemEventWait failed %d", rc)); 6384 } 6385 6386 6387 DECLEXPORT(void) crVBoxServerCalloutEnable(VBOXCRCMDCTL *pCtl) 6388 { 6389 #ifdef CR_SERVER_WITH_CLIENT_CALLOUTS 6390 Assert(!cr_server.pCurrentCalloutCtl); 6391 cr_server.pCurrentCalloutCtl = pCtl; 6392 6393 cr_server.head_spu->dispatch_table.ChromiumParametervCR(GL_HH_SET_CLIENT_CALLOUT, 0, 0, (void*)crServerClientCallout); 6394 #endif 6395 } 6396 6397 extern DECLEXPORT(void) crVBoxServerCalloutDisable() 6398 { 6399 #ifdef CR_SERVER_WITH_CLIENT_CALLOUTS 6400 Assert(cr_server.pCurrentCalloutCtl); 6401 6402 cr_server.head_spu->dispatch_table.ChromiumParametervCR(GL_HH_SET_CLIENT_CALLOUT, 0, 0, NULL); 6403 6404 cr_server.pCurrentCalloutCtl = NULL; 6405 #endif 6406 } -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_window.c
r51064 r52429 36 36 if (fGuestWindow) 37 37 { 38 CRMuralInfo *dummy = crServerGetDummyMural( visBits);38 CRMuralInfo *dummy = crServerGetDummyMural(realVisBits); 39 39 if (!dummy) 40 40 { … … 44 44 spuWindow = dummy->spuWindow; 45 45 mural->fIsDummyRefference = GL_TRUE; 46 47 dims[0] = dummy->width; 48 dims[1] = dummy->height; 46 49 } 47 50 else … … 56 59 } 57 60 mural->fIsDummyRefference = GL_FALSE; 58 } 59 60 /* get initial window size */61 cr_server.head_spu->dispatch_table.GetChromiumParametervCR(GL_WINDOW_SIZE_CR, spuWindow, GL_INT, 2, dims);61 62 /* get initial window size */ 63 cr_server.head_spu->dispatch_table.GetChromiumParametervCR(GL_WINDOW_SIZE_CR, spuWindow, GL_INT, 2, dims); 64 } 62 65 63 66 defaultMural = (CRMuralInfo *) crHashtableSearch(cr_server.muralTable, 0);
Note:
See TracChangeset
for help on using the changeset viewer.