- Timestamp:
- Feb 20, 2019 8:04:38 AM (6 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA.h
r76985 r77370 585 585 uint32_t dy, uint32_t fEnabled, 586 586 uint32_t fNotifyGuest); 587 DECLCALLBACK(void) vbvaPortReportHostCursorCapabilities(PPDMIDISPLAYPORT pInterface, uint32_t fCapabilitiesAdded, 588 uint32_t fCapabilitiesRemoved); 587 DECLCALLBACK(void) vbvaPortReportHostCursorCapabilities(PPDMIDISPLAYPORT pInterface, bool fSupportsRenderCursor, bool fSupportsMoveCursor); 589 588 DECLCALLBACK(void) vbvaPortReportHostCursorPosition(PPDMIDISPLAYPORT pInterface, uint32_t x, uint32_t y); 590 589 -
trunk/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp
r77130 r77370 2834 2834 } 2835 2835 2836 DECLCALLBACK(void) vbvaPortReportHostCursorCapabilities(PPDMIDISPLAYPORT pInterface, uint32_t fCapabilitiesAdded, 2837 uint32_t fCapabilitiesRemoved) 2838 { 2836 DECLCALLBACK(void) vbvaPortReportHostCursorCapabilities(PPDMIDISPLAYPORT pInterface, bool fSupportsRenderCursor, bool fSupportsMoveCursor) 2837 { 2838 LogRelFlowFunc(("fSupportsRenderCursor=%RTbool, fSupportsMoveCursor=%RTbool\n", 2839 fSupportsRenderCursor, fSupportsMoveCursor)); 2840 #if 0 2839 2841 PVGASTATE pThis = IDISPLAYPORT_2_VGASTATE(pInterface); 2840 2842 int rc = PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY); 2843 NOREF(fSupportsMoveCursor); 2841 2844 AssertRC(rc); 2842 pThis->fHostCursorCapabilities |= fCapabilitiesAdded; 2843 pThis->fHostCursorCapabilities &= ~fCapabilitiesRemoved; 2845 pThis->fHostCursorCapabilities = fSupportsRenderCursor ? VBOX_VBVA_CURSOR_CAPABILITY_HARDWARE : 0; 2844 2846 if (pThis->fGuestCaps & VBVACAPS_IRQ && pThis->fGuestCaps & VBVACAPS_DISABLE_CURSOR_INTEGRATION) 2845 2847 VBVARaiseIrq(pThis, HGSMIHOSTFLAGS_CURSOR_CAPABILITIES); 2846 2848 PDMCritSectLeave(&pThis->CritSect); 2849 #else 2850 RT_NOREF(pInterface, fSupportsRenderCursor, fSupportsMoveCursor); 2851 #endif 2847 2852 } 2848 2853 … … 2885 2890 pCtx->fPaused = true; 2886 2891 memset(pCtx->aModeHints, ~0, sizeof(pCtx->aModeHints)); 2887 pVGAState->fHostCursorCapabilities = 0;2892 pVGAState->fHostCursorCapabilities = VBOX_VBVA_CURSOR_CAPABILITY_HARDWARE; 2888 2893 } 2889 2894 } -
trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.cpp
r76553 r77370 412 412 if (mfUpdateImage) 413 413 { 414 caps.resize(2); 415 caps[0] = FramebufferCapabilities_UpdateImage; 416 caps[1] = FramebufferCapabilities_RenderCursor; 417 } 418 else 419 { 414 420 caps.resize(1); 415 caps[0] = FramebufferCapabilities_UpdateImage; 416 } 417 else 418 { 419 /* No caps to return. */ 421 caps[0] = FramebufferCapabilities_RenderCursor; 420 422 } 421 423 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp
r76606 r77370 711 711 if (vboxGlobal().isSeparateProcess()) 712 712 { 713 caps.resize( 1);713 caps.resize(2); 714 714 caps[0] = FramebufferCapabilities_UpdateImage; 715 caps[1] = FramebufferCapabilities_RenderCursor; 715 716 } 716 717 else 717 718 { 718 caps.resize( 2);719 caps.resize(3); 719 720 caps[0] = FramebufferCapabilities_VHWA; 720 721 caps[1] = FramebufferCapabilities_VisibleRegion; 722 caps[2] = FramebufferCapabilities_RenderCursor; 721 723 } 722 724 -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r77065 r77370 17882 17882 </desc> 17883 17883 </const> 17884 17885 <const name="RenderCursor" value="0x08"> 17886 <desc> 17887 This framebuffer implementation can render a pointer cursor itself. Unless the 17888 MoveCursor capability is also set the cursor will always be rendered at the 17889 location of (and usually using) the host pointer. 17890 </desc> 17891 </const> 17892 17893 <const name="MoveCursor" value="0x10"> 17894 <desc> 17895 Supports rendering a pointer cursor anywhere within the guest screen. Implies 17896 RenderCursor. 17897 </desc> 17898 </const> 17884 17899 </enum> 17885 17900 … … 25447 25462 25448 25463 <attribute name="hasData" readonly="yes" type="boolean"> 25449 <desc>Event contains valid data (alternative: notification of support)</desc>25464 <desc>Event contains valid data. If not set, switch back to using the host cursor.</desc> 25450 25465 </attribute> 25451 25466 <attribute name="x" readonly="yes" type="unsigned long"> -
trunk/src/VBox/Main/include/DisplayImpl.h
r77130 r77370 193 193 int i_handleQueryVisibleRegion(uint32_t *pcRects, PRTRECT paRects); 194 194 195 void i_VideoAccelVRDP(bool fEnable); 195 void i_VRDPConnectionEvent(bool fConnect); 196 void i_VideoAccelVRDP(bool fEnable, int c); 196 197 197 198 /* Legacy video acceleration requests coming from the VGA refresh timer. */ … … 201 202 int VideoAccelEnableVMMDev(bool fEnable, VBVAMEMORY *pVbvaMemory); 202 203 void VideoAccelFlushVMMDev(void); 204 205 void i_UpdateDeviceCursorCapabilities(void); 203 206 204 207 #ifdef VBOX_WITH_RECORDING … … 433 436 bool mfVideoAccelVRDP; 434 437 uint32_t mfu32SupportedOrders; 435 int32_t volatile mcVideoAccelVRDPRefs; 438 /** Number of currently connected VRDP clients. */ 439 int32_t volatile mcVRDPRefs; 436 440 437 441 /** Accelerate3DEnabled = true && GraphicsControllerType == VBoxVGA. */ -
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r77100 r77370 1405 1405 1406 1406 NOREF(u32ClientId); 1407 mDisplay->i_V ideoAccelVRDP(true);1407 mDisplay->i_VRDPConnectionEvent(true); 1408 1408 1409 1409 #ifdef VBOX_WITH_GUEST_PROPS … … 1439 1439 } 1440 1440 1441 mDisplay->i_V ideoAccelVRDP(false);1441 mDisplay->i_VRDPConnectionEvent(false); 1442 1442 1443 1443 if (fu32Intercepted & VRDE_CLIENT_INTERCEPT_USB) -
trunk/src/VBox/Main/src-client/DisplayImpl.cpp
r77152 r77370 125 125 mfVideoAccelVRDP = false; 126 126 mfu32SupportedOrders = 0; 127 mcV ideoAccelVRDPRefs = 0;127 mcVRDPRefs = 0; 128 128 129 129 mfSeamlessEnabled = false; … … 1351 1351 } 1352 1352 1353 /** Updates the device's view of the host cursor handling capabilities. 1354 * Calls into mpDrv->pUpPort. */ 1355 void Display::i_UpdateDeviceCursorCapabilities(void) 1356 { 1357 bool fRenderCursor = true; 1358 bool fMoveCursor = mcVRDPRefs == 0; 1359 #ifdef VBOX_WITH_RECORDING 1360 RecordingContext *pCtx = mParent->i_recordingGetContext(); 1361 1362 if ( pCtx 1363 && pCtx->IsStarted() 1364 && pCtx->IsFeatureEnabled(RecordingFeature_Video)) 1365 fRenderCursor = fMoveCursor = false; 1366 else 1367 #endif /* VBOX_WITH_RECORDING */ 1368 { 1369 for (unsigned uScreenId = 0; uScreenId < mcMonitors; uScreenId++) 1370 { 1371 DISPLAYFBINFO *pFBInfo = &maFramebuffers[uScreenId]; 1372 if (!(pFBInfo->u32Caps & FramebufferCapabilities_RenderCursor)) 1373 fRenderCursor = false; 1374 if (!(pFBInfo->u32Caps & FramebufferCapabilities_MoveCursor)) 1375 fMoveCursor = false; 1376 } 1377 } 1378 mpDrv->pUpPort->pfnReportHostCursorCapabilities(mpDrv->pUpPort, fRenderCursor, fMoveCursor); 1379 } 1380 1353 1381 HRESULT Display::i_reportHostCursorCapabilities(uint32_t fCapabilitiesAdded, uint32_t fCapabilitiesRemoved) 1354 1382 { … … 1366 1394 CHECK_CONSOLE_DRV(mpDrv); 1367 1395 alock.release(); /* Release before calling up for lock order reasons. */ 1368 mpDrv->pUpPort->pfnReportHostCursorCapabilities(mpDrv->pUpPort, fCapabilitiesAdded, fCapabilitiesRemoved);1369 1396 mfHostCursorCapabilities = fHostCursorCapabilities; 1397 i_UpdateDeviceCursorCapabilities(); 1370 1398 return S_OK; 1371 1399 } … … 1625 1653 /* Called always by one VRDP server thread. Can be thread-unsafe. 1626 1654 */ 1627 void Display::i_VideoAccelVRDP(bool fEnable) 1628 { 1629 LogRelFlowFunc(("fEnable = %d\n", fEnable)); 1630 1655 void Display::i_VRDPConnectionEvent(bool fConnect) 1656 { 1657 LogRelFlowFunc(("fConnect = %d\n", fConnect)); 1658 1659 int c = fConnect? 1660 ASMAtomicIncS32(&mcVRDPRefs): 1661 ASMAtomicDecS32(&mcVRDPRefs); 1662 1663 i_VideoAccelVRDP(fConnect, c); 1664 i_UpdateDeviceCursorCapabilities(); 1665 } 1666 1667 1668 void Display::i_VideoAccelVRDP(bool fEnable, int c) 1669 { 1631 1670 VIDEOACCEL *pVideoAccel = &mVideoAccelLegacy; 1632 1633 int c = fEnable?1634 ASMAtomicIncS32(&mcVideoAccelVRDPRefs):1635 ASMAtomicDecS32(&mcVideoAccelVRDPRefs);1636 1671 1637 1672 Assert (c >= 0); … … 2441 2476 RecordingContext *pCtx = mParent->i_recordingGetContext(); 2442 2477 2478 i_UpdateDeviceCursorCapabilities(); 2443 2479 if ( RT_LIKELY(!maRecordingEnabled[uScreenId]) 2444 2480 || !pCtx || !pCtx->IsStarted())
Note:
See TracChangeset
for help on using the changeset viewer.