Changeset 45940 in vbox
- Timestamp:
- May 7, 2013 8:16:31 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 85580
- Location:
- trunk
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxVideo3D.h
r44529 r45940 134 134 } while (0) 135 135 136 137 /* host 3D->Fe[/Qt] notification mechanism defines */ 138 #define VBOX3D_NOTIFY_EVENT_TYPE_VISIBLE_WINDOW 1 139 136 140 #endif /* #ifndef ___VBox_VBoxVideo3D_h */ -
trunk/src/VBox/Frontends/VBoxFB/Framebuffer.cpp
r44528 r45940 353 353 } 354 354 355 NS_IMETHODIMP VBoxDirectFB::Notify3DEvent(PRUint32 type, PRUint8 *reserved) 356 { 357 return NS_ERROR_NOT_IMPLEMENTED; 358 } 359 355 360 int VBoxDirectFB::createSurface(uint32_t w, uint32_t h) 356 361 { -
trunk/src/VBox/Frontends/VBoxFB/Framebuffer.h
r44528 r45940 53 53 NS_IMETHOD ProcessVHWACommand(PRUint8 *pCommand); 54 54 55 NS_IMETHOD Notify3DEvent(PRUint32 type, PRUint8 *reserved); 55 56 private: 56 57 int createSurface(uint32_t w, uint32_t h); -
trunk/src/VBox/Frontends/VBoxHeadless/Framebuffer.cpp
r33591 r45940 294 294 return E_NOTIMPL; 295 295 } 296 297 STDMETHODIMP VRDPFramebuffer::Notify3DEvent(ULONG uType, BYTE *pReserved) 298 { 299 return E_NOTIMPL; 300 } -
trunk/src/VBox/Frontends/VBoxHeadless/Framebuffer.h
r44529 r45940 70 70 STDMETHOD(ProcessVHWACommand)(BYTE *pCommand); 71 71 72 STDMETHOD(Notify3DEvent)(ULONG uType, BYTE *pReserved); 72 73 private: 73 74 /* If the format is Opaque, then internal memory buffer is used. -
trunk/src/VBox/Frontends/VBoxHeadless/NullFramebuffer.h
r44529 r45940 206 206 } 207 207 208 STDMETHOD(Notify3DEvent)(ULONG uType, BYTE *pReserved) 209 { 210 return E_NOTIMPL; 211 } 212 208 213 private: 209 214 /** Guest framebuffer pixel format */ -
trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.cpp
r42852 r45940 622 622 return E_NOTIMPL; 623 623 } 624 625 STDMETHODIMP VBoxSDLFB::Notify3DEvent(ULONG uType, BYTE *pReserved) 626 { 627 return E_NOTIMPL; 628 } 629 624 630 // 625 631 // Internal public methods -
trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.h
r44528 r45940 95 95 96 96 STDMETHOD(ProcessVHWACommand)(BYTE *pCommand); 97 98 STDMETHOD(Notify3DEvent)(ULONG uType, BYTE *pReserved); 97 99 98 100 // internal public methods -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp
r45580 r45940 27 27 # include "UIMessageCenter.h" 28 28 # include "VBoxGlobal.h" 29 30 # include <VBox/VBoxVideo3D.h> 29 31 30 32 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */ … … 261 263 } 262 264 265 STDMETHODIMP UIFrameBuffer::Notify3DEvent(ULONG uType, BYTE *pReserved) 266 { 267 switch (uType) 268 { 269 case VBOX3D_NOTIFY_EVENT_TYPE_VISIBLE_WINDOW: 270 if (pReserved) 271 return E_INVALIDARG; 272 273 /* @todo: submit asynchronous event to GUI thread */ 274 return E_NOTIMPL; 275 default: 276 return E_INVALIDARG; 277 } 278 } 279 263 280 #ifdef VBOX_WITH_VIDEOHWACCEL 264 281 void UIFrameBuffer::doProcessVHWACommand(QEvent *pEvent) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h
r44528 r45940 180 180 STDMETHOD(ProcessVHWACommand)(BYTE *pCommand); 181 181 182 STDMETHOD(Notify3DEvent)(ULONG uType, BYTE *pReserved); 183 182 184 ulong width() { return m_width; } 183 185 ulong height() { return m_height; } -
trunk/src/VBox/GuestHost/OpenGL/include/cr_server.h
r45577 r45940 124 124 125 125 typedef DECLCALLBACKPTR(void, PFNCR_SERVER_RPW_DATA) (const struct CR_SERVER_RPW_ENTRY* pEntry, void *pvEntryTexData); 126 127 typedef DECLCALLBACKPTR(void, PFNCRSERVERNOTIFYEVENT) (int32_t screenId, uint32_t uEvent, void*pvData); 126 128 127 129 typedef struct CR_SERVER_RPW_ENTRY … … 524 526 GLboolean bWindowsInitiallyHidden; 525 527 528 uint32_t NotifyEventMap[(CR_MAX_GUEST_MONITORS + 31)/32]; 529 uint32_t cDisableEvent; 530 PFNCRSERVERNOTIFYEVENT pfnNotifyEventCB; 531 526 532 /* @todo: should we use just one blitter? 527 533 * we use two currently because the drawable attribs can differ*/ … … 565 571 extern DECLEXPORT(int32_t) crVBoxServerSetScreenViewport(int sIndex, int32_t x, int32_t y, uint32_t w, uint32_t h); 566 572 573 extern DECLEXPORT(void) crServerVBoxSetNotifyEventCB(PFNCRSERVERNOTIFYEVENT pfnCb); 574 567 575 #ifdef VBOX_WITH_CRHGSMI 568 576 /* We moved all CrHgsmi command processing to crserverlib to keep the logic of dealing with CrHgsmi commands in one place. -
trunk/src/VBox/HostServices/SharedOpenGL/crserver/crservice.cpp
r45148 r45940 244 244 return rc; 245 245 } 246 247 static DECLCALLBACK(void) svcNotifyEventCB(int32_t screenId, uint32_t uEvent, void*pvData) 248 { 249 ComPtr<IDisplay> pDisplay; 250 ComPtr<IFramebuffer> pFramebuffer; 251 LONG xo, yo; 252 LONG64 winId = 0; 253 ULONG monitorCount, i, w, h; 254 255 if (!g_pConsole) 256 { 257 crWarning("Console not defined!"); 258 return; 259 } 260 261 CHECK_ERROR2_STMT(g_pConsole, COMGETTER(Display)(pDisplay.asOutParam()), return); 262 263 CHECK_ERROR2_STMT(pDisplay, GetFramebuffer(screenId, pFramebuffer.asOutParam(), &xo, &yo), return); 264 265 if (!pFramebuffer) 266 return; 267 268 CHECK_ERROR2_STMT(pFramebuffer, Notify3DEvent(VBOX3D_NOTIFY_EVENT_TYPE_VISIBLE_WINDOW, NULL), return); 269 } 270 246 271 247 272 static DECLCALLBACK(int) svcUnload (void *) … … 1281 1306 1282 1307 rc = svcPresentFBOInit(); 1308 1309 crServerVBoxSetNotifyEventCB(svcNotifyEventCB); 1283 1310 } 1284 1311 } -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server.h
r45386 r45940 129 129 void crServerCheckMuralGeometry(CRMuralInfo *mural); 130 130 GLboolean crServerSupportRedirMuralFBO(void); 131 132 void crVBoxServerNotifyEvent(int32_t idScreen); 131 133 132 134 #define CR_SERVER_REDIR_F_NONE 0x00 -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_config.c
r45577 r45940 58 58 cr_server.bUseOutputRedirect = GL_FALSE; 59 59 cr_server.bWindowsInitiallyHidden = GL_FALSE; 60 61 memset(cr_server.NotifyEventMap, 0, sizeof (cr_server.NotifyEventMap)); 62 cr_server.cDisableEvent = 0; 63 cr_server.pfnNotifyEventCB = NULL; 60 64 } 61 65 -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_main.c
r45635 r45940 2574 2574 #define MAPPED(screen) ((screen).winID != 0) 2575 2575 2576 extern DECLEXPORT(void) crServerVBoxSetNotifyEventCB(PFNCRSERVERNOTIFYEVENT pfnCb) 2577 { 2578 cr_server.pfnNotifyEventCB = pfnCb; 2579 } 2580 2581 void crVBoxServerNotifyEvent(int32_t idScreen) 2582 { 2583 /* this is something unexpected, but just in case */ 2584 if (idScreen >= cr_server.screenCount) 2585 { 2586 crWarning("invalid screen id %d", idScreen); 2587 return; 2588 } 2589 2590 if (!cr_server.cDisableEvent) 2591 cr_server.pfnNotifyEventCB(idScreen, VBOX3D_NOTIFY_EVENT_TYPE_VISIBLE_WINDOW, NULL); 2592 else 2593 ASMBitSet(cr_server.NotifyEventMap, idScreen); 2594 } 2595 2576 2596 static void crVBoxServerReparentMuralCB(unsigned long key, void *data1, void *data2) 2577 2597 { … … 2586 2606 2587 2607 renderspuReparentWindow(pMI->spuWindow); 2608 2609 if (pMI->bVisible && (pMI->fPresentMode & CR_SERVER_REDIR_F_DISPLAY)) 2610 crVBoxServerNotifyEvent(pMI->screenId); 2588 2611 2589 2612 crServerVBoxCompositionDisableLeave(pMI, GL_FALSE); … … 2722 2745 uint32_t cRects; 2723 2746 const RTRECT *pRects; 2724 int rc ;2747 int rc = VINF_SUCCESS; 2725 2748 2726 2749 fForcePresent = crServerVBoxCompositionPresentNeeded(pMI); -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.c
r45920 r45940 193 193 renderspuReparentWindow(mural->spuWindow); 194 194 renderspuSetWindowId(cr_server.screen[0].winID); 195 196 if (mural->bVisible && (mural->fPresentMode & CR_SERVER_REDIR_F_DISPLAY)) 197 crVBoxServerNotifyEvent(mural->screenId); 195 198 } 196 199 … … 349 352 { 350 353 if (mural->bVisible) 354 { 351 355 cr_server.head_spu->dispatch_table.WindowShow(mural->spuWindow, GL_TRUE); 356 crVBoxServerNotifyEvent(mural->screenId); 357 } 352 358 mural->fPresentMode |= CR_SERVER_REDIR_F_DISPLAY; 353 359 } … … 748 754 DECLEXPORT(void) crServerVBoxCompositionSetEnableStateGlobal(GLboolean fEnable) 749 755 { 756 if (!fEnable) 757 ++cr_server.cDisableEvent; 758 750 759 crHashtableWalk(cr_server.muralTable, crServerVBoxCompositionSetEnableStateGlobalCB, (void*)fEnable); 751 760 752 761 crHashtableWalk(cr_server.dummyMuralTable, crServerVBoxCompositionSetEnableStateGlobalCB, (void*)fEnable); 762 763 if (fEnable) 764 { 765 --cr_server.cDisableEvent; 766 CRASSERT(cr_server.cDisableEvent < UINT32_MAX/2); 767 if(!cr_server.cDisableEvent) 768 { 769 int i; 770 for (i = 0; i < cr_server.screenCount; ++i) 771 { 772 if (!ASMBitTest(cr_server.NotifyEventMap, i)) 773 continue; 774 775 cr_server.pfnNotifyEventCB(i, VBOX3D_NOTIFY_EVENT_TYPE_VISIBLE_WINDOW, NULL); 776 777 ASMBitClear(cr_server.NotifyEventMap, i); 778 } 779 } 780 } 753 781 } 754 782 … … 907 935 cr_serverCtxSwitchPostprocess(&CtxSwitch); 908 936 937 #if 1 909 938 if (RT_SUCCESS(rc)) 910 939 { … … 916 945 } 917 946 } 918 947 #endif 919 948 return; 920 949 } -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_window.c
r45636 r45940 807 807 { 808 808 cr_server.head_spu->dispatch_table.WindowShow(mural->spuWindow, state); 809 } 810 811 mural->bVisible = state; 809 810 if (state) 811 crVBoxServerNotifyEvent(mural->screenId); 812 } 813 814 mural->bVisible = !!state; 812 815 } 813 816 -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r45926 r45940 14276 14276 <interface 14277 14277 name="IFramebuffer" extends="$unknown" 14278 uuid=" b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"14278 uuid="e3f122c0-adab-4fc9-a8dc-da112fb48428" 14279 14279 wsmap="suppress" 14280 14280 > … … 14598 14598 <param name="command" type="octet" mod="ptr" dir="in"> 14599 14599 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc> 14600 </param> 14601 </method> 14602 14603 <method name="notify3DEvent"> 14604 <desc> 14605 Notifies framebuffer about 3D backend event. 14606 </desc> 14607 14608 <param name="type" type="unsigned long" dir="in"> 14609 <desc>event type. Currently only VBOX3D_NOTIFY_EVENT_TYPE_VISIBLE_WINDOW is supported.</desc> 14610 </param> 14611 <param name="reserved" type="octet" mod="ptr" dir="in"> 14612 <desc>Reserved for future use, must be NULL.</desc> 14600 14613 </param> 14601 14614 </method>
Note:
See TracChangeset
for help on using the changeset viewer.