Changeset 84790 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jun 11, 2020 10:30:36 AM (5 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 6 deleted
- 30 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r84746 r84790 140 140 endif 141 141 endif 142 ifdef VBOX_WITH_VIDEOHWACCEL143 VirtualBox_DEFS += VBOX_WITH_VIDEOHWACCEL VBOX_GUI_USE_QGL144 else ifdef VBOX_GUI_USE_QGL145 VirtualBox_DEFS += VBOX_GUI_USE_QGL146 endif147 142 ifdef VBOX_WITH_LIBCURL 148 143 VirtualBox_DEFS += VBOX_GUI_WITH_NETWORK_MANAGER … … 211 206 endif 212 207 endif 213 ifdef VBOX_WITH_VIDEOHWACCEL214 VirtualBoxVM_DEFS += VBOX_WITH_VIDEOHWACCEL VBOX_GUI_USE_QGL215 else ifdef VBOX_GUI_USE_QGL216 VirtualBoxVM_DEFS += VBOX_GUI_USE_QGL217 endif218 208 ifdef VBOX_GUI_WITH_QTGLFRAMEBUFFER 219 209 VirtualBoxVM_DEFS += VBOX_GUI_WITH_QTGLFRAMEBUFFER … … 269 259 UICommon_DEFS += VBOX_WITH_DEBUGGER_GUI_MENU 270 260 endif 271 endif272 ifdef VBOX_WITH_VIDEOHWACCEL273 UICommon_DEFS += VBOX_WITH_VIDEOHWACCEL VBOX_GUI_USE_QGL274 else ifdef VBOX_GUI_USE_QGL275 UICommon_DEFS += VBOX_GUI_USE_QGL276 261 endif 277 262 ifdef VBOX_WITH_LIBCURL … … 404 389 -framework AppKit -framework Carbon -framework IOKit 405 390 406 if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)391 ifdef VBOX_GUI_WITH_QTGLFRAMEBUFFER 407 392 VirtualBox_LDFLAGS.darwin += -framework OpenGL 408 393 endif … … 442 427 -framework AppKit -framework Carbon -framework IOKit \ 443 428 444 if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)429 ifdef VBOX_GUI_WITH_QTGLFRAMEBUFFER 445 430 VirtualBoxVM_LDFLAGS.darwin += -framework OpenGL 446 431 endif … … 468 453 -framework Carbon \ 469 454 -framework IOKit 470 if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL) 455 456 ifdef VBOX_GUI_WITH_QTGLFRAMEBUFFER 471 457 UICommon_LDFLAGS.darwin += -framework OpenGL 472 458 endif … … 508 494 509 495 # These are 2D Video Acceleration and 3D Acceleration related libs: 510 if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)496 ifdef VBOX_GUI_WITH_QTGLFRAMEBUFFER 511 497 VirtualBox_LIBS.win += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib 512 498 VirtualBox_LIBS.solaris += GL … … 561 547 562 548 # These are 2D Video Acceleration and 3D Acceleration related libs: 563 if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)549 ifdef VBOX_GUI_WITH_QTGLFRAMEBUFFER 564 550 VirtualBoxVM_LIBS.win += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib 565 551 VirtualBoxVM_LIBS.solaris += GL … … 598 584 599 585 # These are 2D Video Acceleration and 3D Acceleration related libs: 600 if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)586 ifdef VBOX_GUI_WITH_QTGLFRAMEBUFFER 601 587 UICommon_LIBS.win += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib 602 588 UICommon_LIBS.solaris += GL … … 606 592 ifdef VBOX_WITH_3D_ACCELERATION 607 593 UICommon_LIBS += $(PATH_STAGE_LIB)/VBoxOGLTest$(VBOX_SUFF_LIB) 608 endif609 if defined(VBOX_WITH_VIDEOHWACCEL)610 if1of ($(KBUILD_TARGET), win linux freebsd)611 UICommon_LIBS += $(PATH_STAGE_LIB)/VBoxOGL2D$(VBOX_SUFF_LIB)612 endif613 594 endif 614 595 … … 1195 1176 src/platform/win/UIDesktopServices_win.cpp 1196 1177 1197 if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)1198 VirtualBox_SOURCES += \1199 src/VBox2DHelpers.cpp \1200 src/VBoxFBOverlay.cpp \1201 src/VBoxGLSupportInfo.cpp1202 endif1203 1204 1178 $(call VBOX_SET_VER_INFO_EXE,VirtualBox,VirtualBox Manager,$(VBOX_WINDOWS_ICON_FILE)) 1205 1179 … … 1274 1248 src/runtime/UIDnDEnumFormat_win.cpp 1275 1249 endif 1276 endif1277 1278 if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)1279 VirtualBoxVM_SOURCES += \1280 src/VBox2DHelpers.cpp \1281 src/VBoxFBOverlay.cpp \1282 src/VBoxGLSupportInfo.cpp1283 1250 endif 1284 1251 … … 1501 1468 src/platform/darwin/VBoxUtils-darwin.cpp 1502 1469 1503 if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)1504 UICommon_SOURCES += \1505 src/VBox2DHelpers.cpp \1506 src/VBoxGLSupportInfo.cpp1507 endif1508 1509 1470 1510 1471 # … … 1537 1498 VirtualBox_QT_MODULES.darwin += MacExtras 1538 1499 VirtualBox_QT_MODULES.win += WinExtras 1539 if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)1500 ifdef VBOX_GUI_WITH_QTGLFRAMEBUFFER 1540 1501 VirtualBox_QT_MODULES += OpenGL 1541 1502 endif … … 1553 1514 VirtualBoxVM_QT_MODULES.darwin += MacExtras 1554 1515 VirtualBoxVM_QT_MODULES.win += WinExtras 1555 if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)1516 ifdef VBOX_GUI_WITH_QTGLFRAMEBUFFER 1556 1517 VirtualBoxVM_QT_MODULES += OpenGL 1557 1518 endif … … 1569 1530 UICommon_QT_MODULES.darwin += MacExtras 1570 1531 UICommon_QT_MODULES.win += WinExtras 1571 if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)1532 ifdef VBOX_GUI_WITH_QTGLFRAMEBUFFER 1572 1533 UICommon_QT_MODULES += OpenGL 1573 1534 endif … … 1601 1562 UICommon_SOURCES += $(VBOX_VIRTUALBOX_OUT_DIR)/VirtualBoxBrand.qrc 1602 1563 $(VBOX_VIRTUALBOX_OUT_DIR)/VirtualBoxBrand.qrc_RCCFLAGS = -name BRAND 1603 if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)1604 UICommon_SOURCES += VirtualBoxShaders.qrc1605 VirtualBoxShaders.qrc_RCCFLAGS = -name SHADERS1606 endif1607 1564 1608 1565 … … 1866 1823 --output $@ $< 1867 1824 endif # darwin 1868 1869 #1870 # App for testing GL support1871 #1872 if defined(VBOX_WITH_VIDEOHWACCEL)1873 if1of ($(KBUILD_TARGET), win linux freebsd)1874 LIBRARIES += VBoxOGL2D1875 VBoxOGL2D_TEMPLATE = $(if $(VBOX_WITH_VIDEOHWACCEL),$(if $(VBOX_WITH_HARDENING),VBOXQTGUI,VBOXQTGUIEXE),VBOXMAINEXE)1876 VBoxOGL2D_DEFS = QT_NO_DEBUG QT_THREAD_SUPPORT QT_SHARED HAVE_CONFIG_H VBOX_WITH_VIDEOHWACCEL VBOX_GUI_USE_QGL1877 VBoxOGL2D_QT_MODULES += OpenGL1878 VBoxOGL2D_SOURCES = \1879 src/VBoxGLSupportInfo.cpp1880 VBoxOGL2D_INCS = include1881 endif1882 endif1883 1825 1884 1826 -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.cpp
r83452 r84790 166 166 const char *UIExtraDataDefs::GUI_VirtualScreenToHostScreen = "GUI/VirtualScreenToHostScreen"; 167 167 const char *UIExtraDataDefs::GUI_AutomountGuestScreens = "GUI/AutomountGuestScreens"; 168 #ifdef VBOX_WITH_VIDEOHWACCEL169 const char *UIExtraDataDefs::GUI_Accelerate2D_StretchLinear = "GUI/Accelerate2D/StretchLinear";170 const char *UIExtraDataDefs::GUI_Accelerate2D_PixformatYV12 = "GUI/Accelerate2D/PixformatYV12";171 const char *UIExtraDataDefs::GUI_Accelerate2D_PixformatUYVY = "GUI/Accelerate2D/PixformatUYVY";172 const char *UIExtraDataDefs::GUI_Accelerate2D_PixformatYUY2 = "GUI/Accelerate2D/PixformatYUY2";173 const char *UIExtraDataDefs::GUI_Accelerate2D_PixformatAYUV = "GUI/Accelerate2D/PixformatAYUV";174 #endif /* VBOX_WITH_VIDEOHWACCEL */175 168 #ifndef VBOX_WS_MAC 176 169 const char *UIExtraDataDefs::GUI_ShowMiniToolBar = "GUI/ShowMiniToolBar"; -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h
r83653 r84790 317 317 /** Holds whether automatic mounting/unmounting of guest-screens enabled. */ 318 318 SHARED_LIBRARY_STUFF extern const char *GUI_AutomountGuestScreens; 319 #ifdef VBOX_WITH_VIDEOHWACCEL320 /** Holds whether 2D acceleration should use linear sretch. */321 SHARED_LIBRARY_STUFF extern const char *GUI_Accelerate2D_StretchLinear;322 /** Holds whether 2D acceleration should use YV12 pixel format. */323 SHARED_LIBRARY_STUFF extern const char *GUI_Accelerate2D_PixformatYV12;324 /** Holds whether 2D acceleration should use UYVY pixel format. */325 SHARED_LIBRARY_STUFF extern const char *GUI_Accelerate2D_PixformatUYVY;326 /** Holds whether 2D acceleration should use YUY2 pixel format. */327 SHARED_LIBRARY_STUFF extern const char *GUI_Accelerate2D_PixformatYUY2;328 /** Holds whether 2D acceleration should use AYUV pixel format. */329 SHARED_LIBRARY_STUFF extern const char *GUI_Accelerate2D_PixformatAYUV;330 #endif /* VBOX_WITH_VIDEOHWACCEL */331 319 #ifndef VBOX_WS_MAC 332 320 /** Holds whether mini-toolbar is enabled for full and seamless screens. */ -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r83452 r84790 1963 1963 << GUI_AutoresizeGuest << GUI_LastVisibilityStatusForGuestScreen << GUI_LastGuestSizeHint 1964 1964 << GUI_VirtualScreenToHostScreen << GUI_AutomountGuestScreens 1965 #ifdef VBOX_WITH_VIDEOHWACCEL1966 << GUI_Accelerate2D_StretchLinear1967 << GUI_Accelerate2D_PixformatYV12 << GUI_Accelerate2D_PixformatUYVY1968 << GUI_Accelerate2D_PixformatYUY2 << GUI_Accelerate2D_PixformatAYUV1969 #endif /* VBOX_WITH_VIDEOHWACCEL */1970 1965 #ifndef VBOX_WS_MAC 1971 1966 << GUI_ShowMiniToolBar << GUI_MiniToolBarAutoHide << GUI_MiniToolBarAlignment … … 3782 3777 } 3783 3778 3784 #ifdef VBOX_WITH_VIDEOHWACCEL3785 bool UIExtraDataManager::useLinearStretch(const QUuid &uID)3786 {3787 /* 'True' unless feature restricted: */3788 return !isFeatureRestricted(GUI_Accelerate2D_StretchLinear, uID);3789 }3790 3791 bool UIExtraDataManager::usePixelFormatYV12(const QUuid &uID)3792 {3793 /* 'True' unless feature restricted: */3794 return !isFeatureRestricted(GUI_Accelerate2D_PixformatYV12, uID);3795 }3796 3797 bool UIExtraDataManager::usePixelFormatUYVY(const QUuid &uID)3798 {3799 /* 'True' unless feature restricted: */3800 return !isFeatureRestricted(GUI_Accelerate2D_PixformatUYVY, uID);3801 }3802 3803 bool UIExtraDataManager::usePixelFormatYUY2(const QUuid &uID)3804 {3805 /* 'True' unless feature restricted: */3806 return !isFeatureRestricted(GUI_Accelerate2D_PixformatYUY2, uID);3807 }3808 3809 bool UIExtraDataManager::usePixelFormatAYUV(const QUuid &uID)3810 {3811 /* 'True' unless feature restricted: */3812 return !isFeatureRestricted(GUI_Accelerate2D_PixformatAYUV, uID);3813 }3814 #endif /* VBOX_WITH_VIDEOHWACCEL */3815 3816 3779 #ifndef VBOX_WS_MAC 3817 3780 bool UIExtraDataManager::miniToolbarEnabled(const QUuid &uID) -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h
r83452 r84790 548 548 /** Returns whether automatic mounting/unmounting of guest-screens enabled. */ 549 549 bool autoMountGuestScreensEnabled(const QUuid &uID); 550 551 #ifdef VBOX_WITH_VIDEOHWACCEL552 /** Returns whether 2D acceleration should use linear sretch. */553 bool useLinearStretch(const QUuid &uID);554 /** Returns whether 2D acceleration should use YV12 pixel format. */555 bool usePixelFormatYV12(const QUuid &uID);556 /** Returns whether 2D acceleration should use UYVY pixel format. */557 bool usePixelFormatUYVY(const QUuid &uID);558 /** Returns whether 2D acceleration should use YUY2 pixel format. */559 bool usePixelFormatYUY2(const QUuid &uID);560 /** Returns whether 2D acceleration should use AYUV pixel format. */561 bool usePixelFormatAYUV(const QUuid &uID);562 #endif /* VBOX_WITH_VIDEOHWACCEL */563 550 564 551 #ifndef VBOX_WS_MAC -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.h
r82968 r84790 62 62 #ifdef VBOX_WS_MAC 63 63 ShowWindowEventType, 64 #endif65 #ifdef VBOX_GUI_USE_QGL66 VHWACommandProcessType,67 64 #endif 68 65 }; -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDetailsGenerator.cpp
r84107 r84790 413 413 { 414 414 QStringList acceleration; 415 #ifdef VBOX_WITH_VIDEOHWACCEL416 /* 2D acceleration: */417 if (comGraphics.GetAccelerate2DVideoEnabled())418 acceleration << QApplication::translate("UIDetails", "2D Video", "details (display)");419 #endif420 415 /* 3D acceleration: */ 421 416 if (comGraphics.GetAccelerate3DEnabled()) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp
r84768 r84790 36 36 # include "UIMachineWindow.h" 37 37 #endif /* VBOX_WITH_MASKED_SEAMLESS */ 38 #ifdef VBOX_WITH_VIDEOHWACCEL39 # include "VBoxFBOverlay.h"40 #endif /* VBOX_WITH_VIDEOHWACCEL */41 38 42 39 /* COM includes: */ … … 423 420 virtual void performRescale(); 424 421 425 #ifdef VBOX_WITH_VIDEOHWACCEL426 /** Performs Video HW Acceleration command. */427 virtual void doProcessVHWACommand(QEvent*) {}428 422 /** Handles viewport resize-event. */ 429 423 virtual void viewportResized(QResizeEvent*) 430 424 { 431 # 425 #ifdef VBOX_GUI_WITH_QTGLFRAMEBUFFER 432 426 /* Sync GL widget size with the MachineView widget: */ 433 427 /** @todo This can be probably done in a more automated way. */ 434 428 if (m_pGLWidget && m_pMachineView) 435 429 m_pGLWidget->resize(m_pMachineView->viewport()->size()); 436 # endif 437 } 438 /** Handles viewport scroll-event. */ 439 virtual void viewportScrolled(int, int) {} 440 #endif /* VBOX_WITH_VIDEOHWACCEL */ 430 #endif 431 } 441 432 442 433 #ifdef VBOX_GUI_WITH_QTGLFRAMEBUFFER … … 1078 1069 1079 1070 1080 #ifdef VBOX_WITH_VIDEOHWACCEL1081 /** UIFrameBufferPrivate reimplementation used to maintain VM display video memory1082 * for the case when 2D Video Acceleration is enabled. */1083 class VBoxOverlayFrameBuffer : public UIFrameBufferPrivate1084 {1085 Q_OBJECT;1086 1087 public:1088 1089 VBoxOverlayFrameBuffer()1090 {1091 }1092 1093 virtual HRESULT init(UIMachineView *pView)1094 {1095 mpView = pView;1096 UIFrameBufferPrivate::init(mpView);1097 mOverlay.init(mpView->viewport(), mpView, &(mpView->session()), mpView->screenId()),1098 /* sync with frame-buffer */1099 mOverlay.onResizeEventPostprocess (VBoxFBSizeInfo(this), QPoint(mpView->contentsX(), mpView->contentsY()));1100 return S_OK;1101 }1102 1103 STDMETHOD(ProcessVHWACommand)(BYTE *pCommand, LONG enmCmd, BOOL fGuestCmd)1104 {1105 UIFrameBufferPrivate::lock();1106 /* Make sure frame-buffer is used: */1107 if (m_fUnused)1108 {1109 LogRel2(("GUI: ProcessVHWACommand: Postponed!\n"));1110 /* Unlock access to frame-buffer: */1111 UIFrameBufferPrivate::unlock();1112 /* tell client to pend ProcessVHWACommand */1113 return E_ACCESSDENIED;1114 }1115 1116 int rc = mOverlay.onVHWACommand((struct VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *)pCommand, enmCmd, fGuestCmd != FALSE);1117 UIFrameBufferPrivate::unlock();1118 if (rc == VINF_CALLBACK_RETURN)1119 return S_OK;1120 if (RT_SUCCESS(rc))1121 return S_FALSE;1122 if (rc == VERR_INVALID_STATE)1123 return E_ACCESSDENIED;1124 return E_FAIL;1125 }1126 1127 void doProcessVHWACommand (QEvent * pEvent)1128 {1129 mOverlay.onVHWACommandEvent (pEvent);1130 }1131 1132 STDMETHOD(NotifyUpdate) (ULONG aX, ULONG aY,1133 ULONG aW, ULONG aH)1134 {1135 HRESULT hr = S_OK;1136 UIFrameBufferPrivate::lock();1137 /* Make sure frame-buffer is used: */1138 if (m_fUnused)1139 {1140 LogRel3(("GUI: NotifyUpdate: Ignored!\n"));1141 mOverlay.onNotifyUpdateIgnore (aX, aY, aW, aH);1142 /* Unlock access to frame-buffer: */1143 UIFrameBufferPrivate::unlock();1144 /*can we actually ignore the notify update?*/1145 /* Ignore NotifyUpdate: */1146 return E_FAIL;1147 }1148 1149 if (!mOverlay.onNotifyUpdate (aX, aY, aW, aH))1150 hr = UIFrameBufferPrivate::NotifyUpdate (aX, aY, aW, aH);1151 UIFrameBufferPrivate::unlock();1152 return hr;1153 }1154 1155 void performResize(int iWidth, int iHeight)1156 {1157 UIFrameBufferPrivate::performResize(iWidth, iHeight);1158 mOverlay.onResizeEventPostprocess(VBoxFBSizeInfo(this),1159 QPoint(mpView->contentsX(), mpView->contentsY()));1160 }1161 1162 void performRescale()1163 {1164 UIFrameBufferPrivate::performRescale();1165 mOverlay.onResizeEventPostprocess(VBoxFBSizeInfo(this),1166 QPoint(mpView->contentsX(), mpView->contentsY()));1167 }1168 1169 void viewportResized (QResizeEvent * re)1170 {1171 mOverlay.onViewportResized (re);1172 UIFrameBufferPrivate::viewportResized (re);1173 }1174 1175 void viewportScrolled (int dx, int dy)1176 {1177 mOverlay.onViewportScrolled (QPoint(mpView->contentsX(), mpView->contentsY()));1178 UIFrameBufferPrivate::viewportScrolled (dx, dy);1179 }1180 1181 void setView(UIMachineView * pView)1182 {1183 /* lock to ensure we do not collide with the EMT thread passing commands to us */1184 UIFrameBufferPrivate::lock();1185 UIFrameBufferPrivate::setView(pView);1186 mpView = pView;1187 mOverlay.updateAttachment(pView ? pView->viewport() : NULL, pView);1188 UIFrameBufferPrivate::unlock();1189 }1190 1191 private:1192 1193 VBoxQGLOverlay mOverlay;1194 UIMachineView *mpView;1195 };1196 #endif /* VBOX_WITH_VIDEOHWACCEL */1197 1198 1199 1071 #ifdef VBOX_WITH_XPCOM 1200 1072 NS_DECL_CLASSINFO(UIFrameBufferPrivate) … … 2472 2344 2473 2345 2474 #ifdef VBOX_WITH_VIDEOHWACCEL2475 UIFrameBuffer::UIFrameBuffer(bool m_fAccelerate2DVideo)2476 {2477 if (m_fAccelerate2DVideo)2478 {2479 ComObjPtr<VBoxOverlayFrameBuffer> pFrameBuffer;2480 pFrameBuffer.createObject();2481 m_pFrameBuffer = pFrameBuffer;2482 }2483 else2484 {2485 m_pFrameBuffer.createObject();2486 }2487 }2488 #else /* !VBOX_WITH_VIDEOHWACCEL */2489 2346 UIFrameBuffer::UIFrameBuffer() 2490 2347 { 2491 2348 m_pFrameBuffer.createObject(); 2492 2349 } 2493 #endif /* !VBOX_WITH_VIDEOHWACCEL */2494 2350 2495 2351 UIFrameBuffer::~UIFrameBuffer() … … 2658 2514 } 2659 2515 2660 #ifdef VBOX_WITH_VIDEOHWACCEL2661 void UIFrameBuffer::doProcessVHWACommand(QEvent *pEvent)2662 {2663 m_pFrameBuffer->doProcessVHWACommand(pEvent);2664 }2665 2666 2516 void UIFrameBuffer::viewportResized(QResizeEvent *pEvent) 2667 2517 { … … 2669 2519 } 2670 2520 2671 void UIFrameBuffer::viewportScrolled(int iX, int iY)2672 {2673 m_pFrameBuffer->viewportScrolled(iX, iY);2674 }2675 #endif /* VBOX_WITH_VIDEOHWACCEL */2676 2677 2521 #include "UIFrameBuffer.moc" -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h
r82968 r84790 45 45 public: 46 46 47 #ifdef VBOX_WITH_VIDEOHWACCEL48 /** Frame-buffer constructor.49 * @param m_fAccelerate2DVideo defines whether we should use VBoxOverlayFrameBuffer50 * instead of the default one. */51 UIFrameBuffer(bool m_fAccelerate2DVideo);52 #else /* !VBOX_WITH_VIDEOHWACCEL */53 47 /** Frame-buffer constructor. */ 54 48 UIFrameBuffer(); 55 #endif /* !VBOX_WITH_VIDEOHWACCEL */56 49 57 50 /** Frame-buffer destructor. */ … … 140 133 void performRescale(); 141 134 142 #ifdef VBOX_WITH_VIDEOHWACCEL143 /** Performs Video HW Acceleration command. */144 void doProcessVHWACommand(QEvent *pEvent);145 135 /** Handles viewport resize-event. */ 146 136 void viewportResized(QResizeEvent *pEvent); 147 /** Handles viewport scroll-event. */148 void viewportScrolled(int iX, int iY);149 #endif /* VBOX_WITH_VIDEOHWACCEL */150 137 151 138 private: -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r84724 r84790 40 40 #include "UIMouseHandler.h" 41 41 #include "UIFrameBuffer.h" 42 #include "VBoxFBOverlay.h"43 42 #ifdef VBOX_WS_MAC 44 43 # include "UICocoaApplication.h" … … 116 115 117 116 /* static */ 118 UIMachineView* UIMachineView::create( UIMachineWindow *pMachineWindow 119 , ulong uScreenId 120 , UIVisualStateType visualStateType 121 #ifdef VBOX_WITH_VIDEOHWACCEL 122 , bool bAccelerate2DVideo 123 #endif /* VBOX_WITH_VIDEOHWACCEL */ 124 ) 117 UIMachineView* UIMachineView::create(UIMachineWindow *pMachineWindow, ulong uScreenId, UIVisualStateType visualStateType) 125 118 { 126 119 UIMachineView *pMachineView = 0; … … 128 121 { 129 122 case UIVisualStateType_Normal: 130 pMachineView = new UIMachineViewNormal( pMachineWindow 131 , uScreenId 132 #ifdef VBOX_WITH_VIDEOHWACCEL 133 , bAccelerate2DVideo 134 #endif /* VBOX_WITH_VIDEOHWACCEL */ 135 ); 123 pMachineView = new UIMachineViewNormal(pMachineWindow, uScreenId); 136 124 break; 137 125 case UIVisualStateType_Fullscreen: 138 pMachineView = new UIMachineViewFullscreen( pMachineWindow 139 , uScreenId 140 #ifdef VBOX_WITH_VIDEOHWACCEL 141 , bAccelerate2DVideo 142 #endif /* VBOX_WITH_VIDEOHWACCEL */ 143 ); 126 pMachineView = new UIMachineViewFullscreen(pMachineWindow, uScreenId); 144 127 break; 145 128 case UIVisualStateType_Seamless: 146 pMachineView = new UIMachineViewSeamless( pMachineWindow 147 , uScreenId 148 #ifdef VBOX_WITH_VIDEOHWACCEL 149 , bAccelerate2DVideo 150 #endif /* VBOX_WITH_VIDEOHWACCEL */ 151 ); 129 pMachineView = new UIMachineViewSeamless(pMachineWindow, uScreenId); 152 130 break; 153 131 case UIVisualStateType_Scale: 154 pMachineView = new UIMachineViewScale( pMachineWindow 155 , uScreenId 156 #ifdef VBOX_WITH_VIDEOHWACCEL 157 , bAccelerate2DVideo 158 #endif 159 ); 132 pMachineView = new UIMachineViewScale(pMachineWindow, uScreenId); 160 133 break; 161 134 default: … … 659 632 } 660 633 661 UIMachineView::UIMachineView( UIMachineWindow *pMachineWindow 662 , ulong uScreenId 663 #ifdef VBOX_WITH_VIDEOHWACCEL 664 , bool bAccelerate2DVideo 665 #endif /* VBOX_WITH_VIDEOHWACCEL */ 666 ) 634 UIMachineView::UIMachineView(UIMachineWindow *pMachineWindow, ulong uScreenId) 667 635 : QAbstractScrollArea(pMachineWindow->centralWidget()) 668 636 , m_pMachineWindow(pMachineWindow) … … 673 641 , m_maxGuestSizePolicy(MaxGuestResolutionPolicy_Automatic) 674 642 , m_u64MaxGuestSize(0) 675 #ifdef VBOX_WITH_VIDEOHWACCEL676 , m_fAccelerate2DVideo(bAccelerate2DVideo)677 #endif /* VBOX_WITH_VIDEOHWACCEL */678 643 #ifdef VBOX_WITH_DRAG_AND_DROP_GH 679 644 , m_fIsDraggingFromGuest(false) … … 726 691 else 727 692 { 728 #ifdef VBOX_WITH_VIDEOHWACCEL729 /* Create new frame-buffer: */730 m_pFrameBuffer = new UIFrameBuffer(m_fAccelerate2DVideo);731 m_pFrameBuffer->init(this);732 #else /* VBOX_WITH_VIDEOHWACCEL */733 693 /* Create new frame-buffer: */ 734 694 m_pFrameBuffer = new UIFrameBuffer; 735 695 m_pFrameBuffer->init(this); 736 #endif /* !VBOX_WITH_VIDEOHWACCEL */737 696 738 697 /* Take scaling optimization type into account: */ … … 892 851 QApplication::sendPostedEvents(this, QEvent::MetaCall); 893 852 894 #ifdef VBOX_WITH_VIDEOHWACCEL895 if (m_fAccelerate2DVideo)896 QApplication::sendPostedEvents(this, VHWACommandProcessType);897 #endif /* VBOX_WITH_VIDEOHWACCEL */898 899 853 /* Temporarily detach the framebuffer from IDisplay before detaching 900 854 * from view in order to respect the thread synchonisation logic (see UIFrameBuffer.h). … … 1344 1298 void UIMachineView::scrollContentsBy(int dx, int dy) 1345 1299 { 1346 #ifdef VBOX_WITH_VIDEOHWACCEL 1347 if (m_pFrameBuffer) 1348 { 1349 m_pFrameBuffer->viewportScrolled(dx, dy); 1350 } 1351 #endif /* VBOX_WITH_VIDEOHWACCEL */ 1300 /* Call to base-class: */ 1352 1301 QAbstractScrollArea::scrollContentsBy(dx, dy); 1353 1302 … … 1423 1372 #endif /* VBOX_WS_MAC */ 1424 1373 1425 #ifdef VBOX_WITH_VIDEOHWACCEL1426 case VHWACommandProcessType:1427 {1428 m_pFrameBuffer->doProcessVHWACommand(pEvent);1429 return true;1430 }1431 #endif /* VBOX_WITH_VIDEOHWACCEL */1432 1433 1374 default: 1434 1375 break; … … 1446 1387 case QEvent::Resize: 1447 1388 { 1448 #ifdef VBOX_WITH_VIDEOHWACCEL 1449 QResizeEvent *pResizeEvent = static_cast<QResizeEvent*>(pEvent);1389 /* Notify framebuffer about viewport resize: */ 1390 QResizeEvent *pResizeEvent = static_cast<QResizeEvent*>(pEvent); 1450 1391 if (m_pFrameBuffer) 1451 1392 m_pFrameBuffer->viewportResized(pResizeEvent); 1452 #endif /* VBOX_WITH_VIDEOHWACCEL */1453 1393 /* Update console's display viewport and 3D overlay: */ 1454 1394 updateViewport(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h
r82968 r84790 78 78 79 79 /* Factory function to create machine-view: */ 80 static UIMachineView* create( UIMachineWindow *pMachineWindow 81 , ulong uScreenId 82 , UIVisualStateType visualStateType 83 #ifdef VBOX_WITH_VIDEOHWACCEL 84 , bool bAccelerate2DVideo 85 #endif /* VBOX_WITH_VIDEOHWACCEL */ 86 ); 80 static UIMachineView* create(UIMachineWindow *pMachineWindow, ulong uScreenId, UIVisualStateType visualStateType); 87 81 /* Factory function to destroy required machine-view: */ 88 82 static void destroy(UIMachineView *pMachineView); … … 145 139 146 140 /* Machine-view constructor: */ 147 UIMachineView( UIMachineWindow *pMachineWindow 148 , ulong uScreenId 149 #ifdef VBOX_WITH_VIDEOHWACCEL 150 , bool bAccelerate2DVideo 151 #endif /* VBOX_WITH_VIDEOHWACCEL */ 152 ); 141 UIMachineView(UIMachineWindow *pMachineWindow, ulong uScreenId); 153 142 /* Machine-view destructor: */ 154 143 virtual ~UIMachineView() {} … … 377 366 volatile uint64_t m_u64MaxGuestSize; 378 367 379 #ifdef VBOX_WITH_VIDEOHWACCEL380 bool m_fAccelerate2DVideo : 1;381 #endif /* VBOX_WITH_VIDEOHWACCEL */382 383 368 /** Holds the pause-pixmap. */ 384 369 QPixmap m_pausePixmap; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
r84741 r84790 40 40 #include "UIMouseHandler.h" 41 41 #include "UIVMCloseDialog.h" 42 #include "VBox2DHelpers.h"43 42 44 43 /* COM includes: */ … … 496 495 void UIMachineWindow::prepareMachineView() 497 496 { 498 #ifdef VBOX_WITH_VIDEOHWACCEL499 /* Need to force the QGL framebuffer in case 2D Video Acceleration is supported & enabled: */500 bool bAccelerate2DVideo = machine().GetGraphicsAdapter().GetAccelerate2DVideoEnabled() && VBox2DHelpers::isAcceleration2DVideoAvailable();501 #endif /* VBOX_WITH_VIDEOHWACCEL */502 503 497 /* Get visual-state type: */ 504 498 UIVisualStateType visualStateType = machineLogic()->visualStateType(); 505 499 506 500 /* Create machine-view: */ 507 m_pMachineView = UIMachineView::create( this 508 , m_uScreenId 509 , visualStateType 510 #ifdef VBOX_WITH_VIDEOHWACCEL 511 , bAccelerate2DVideo 512 #endif /* VBOX_WITH_VIDEOHWACCEL */ 513 ); 501 m_pMachineView = UIMachineView::create(this, m_uScreenId, visualStateType); 514 502 515 503 /* Listen for frame-buffer resize: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r84696 r84790 50 50 #include "UIFrameBuffer.h" 51 51 #include "UISettingsDialogSpecific.h" 52 #ifdef VBOX_WITH_VIDEOHWACCEL53 # include "VBox2DHelpers.h"54 #endif55 52 #ifdef VBOX_WS_MAC 56 53 # include "VBoxUtils-darwin.h" … … 243 240 /* Load VM settings: */ 244 241 loadVMSettings(); 245 246 #ifdef VBOX_WITH_VIDEOHWACCEL247 /* Log whether 2D video acceleration is enabled: */248 LogRel(("GUI: 2D video acceleration is %s\n",249 machine().GetGraphicsAdapter().GetAccelerate2DVideoEnabled() && VBox2DHelpers::isAcceleration2DVideoAvailable()250 ? "enabled" : "disabled"));251 #endif /* VBOX_WITH_VIDEOHWACCEL */252 242 253 243 /* Log whether HID LEDs sync is enabled: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp
r82968 r84790 43 43 44 44 45 UIMachineViewFullscreen::UIMachineViewFullscreen( UIMachineWindow *pMachineWindow 46 , ulong uScreenId 47 #ifdef VBOX_WITH_VIDEOHWACCEL 48 , bool bAccelerate2DVideo 49 #endif 50 ) 51 : UIMachineView( pMachineWindow 52 , uScreenId 53 #ifdef VBOX_WITH_VIDEOHWACCEL 54 , bAccelerate2DVideo 55 #endif 56 ) 45 UIMachineViewFullscreen::UIMachineViewFullscreen(UIMachineWindow *pMachineWindow, ulong uScreenId) 46 : UIMachineView(pMachineWindow, uScreenId) 57 47 , m_bIsGuestAutoresizeEnabled(actionPool()->action(UIActionIndexRT_M_View_T_GuestAutoresize)->isChecked()) 58 48 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.h
r82968 r84790 32 32 33 33 /* Fullscreen machine-view constructor: */ 34 UIMachineViewFullscreen( UIMachineWindow *pMachineWindow 35 , ulong uScreenId 36 #ifdef VBOX_WITH_VIDEOHWACCEL 37 , bool bAccelerate2DVideo 38 #endif 39 ); 34 UIMachineViewFullscreen(UIMachineWindow *pMachineWindow, ulong uScreenId); 40 35 /* Fullscreen machine-view destructor: */ 41 36 virtual ~UIMachineViewFullscreen() {} -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp
r82968 r84790 37 37 38 38 39 UIMachineViewNormal::UIMachineViewNormal( UIMachineWindow *pMachineWindow 40 , ulong uScreenId 41 #ifdef VBOX_WITH_VIDEOHWACCEL 42 , bool bAccelerate2DVideo 43 #endif 44 ) 45 : UIMachineView( pMachineWindow 46 , uScreenId 47 #ifdef VBOX_WITH_VIDEOHWACCEL 48 , bAccelerate2DVideo 49 #endif 50 ) 39 UIMachineViewNormal::UIMachineViewNormal(UIMachineWindow *pMachineWindow, ulong uScreenId) 40 : UIMachineView(pMachineWindow, uScreenId) 51 41 , m_bIsGuestAutoresizeEnabled(actionPool()->action(UIActionIndexRT_M_View_T_GuestAutoresize)->isChecked()) 52 42 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h
r82968 r84790 32 32 33 33 /* Normal machine-view constructor: */ 34 UIMachineViewNormal( UIMachineWindow *pMachineWindow 35 , ulong uScreenId 36 #ifdef VBOX_WITH_VIDEOHWACCEL 37 , bool bAccelerate2DVideo 38 #endif 39 ); 34 UIMachineViewNormal(UIMachineWindow *pMachineWindow, ulong uScreenId); 40 35 /* Normal machine-view destructor: */ 41 36 virtual ~UIMachineViewNormal() {} -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.cpp
r82968 r84790 40 40 41 41 42 UIMachineViewScale::UIMachineViewScale( UIMachineWindow *pMachineWindow 43 , ulong uScreenId 44 #ifdef VBOX_WITH_VIDEOHWACCEL 45 , bool bAccelerate2DVideo 46 #endif 47 ) 48 : UIMachineView( pMachineWindow 49 , uScreenId 50 #ifdef VBOX_WITH_VIDEOHWACCEL 51 , bAccelerate2DVideo 52 #endif 53 ) 42 UIMachineViewScale::UIMachineViewScale(UIMachineWindow *pMachineWindow, ulong uScreenId) 43 : UIMachineView(pMachineWindow, uScreenId) 54 44 { 55 45 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.h
r82968 r84790 32 32 33 33 /* Scale machine-view constructor: */ 34 UIMachineViewScale( UIMachineWindow *pMachineWindow 35 , ulong uScreenId 36 #ifdef VBOX_WITH_VIDEOHWACCEL 37 , bool bAccelerate2DVideo 38 #endif 39 ); 34 UIMachineViewScale(UIMachineWindow *pMachineWindow, ulong uScreenId); 40 35 /* Scale machine-view destructor: */ 41 36 virtual ~UIMachineViewScale() {} -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp
r82968 r84790 47 47 48 48 49 UIMachineViewSeamless::UIMachineViewSeamless( UIMachineWindow *pMachineWindow 50 , ulong uScreenId 51 #ifdef VBOX_WITH_VIDEOHWACCEL 52 , bool bAccelerate2DVideo 53 #endif 54 ) 55 : UIMachineView( pMachineWindow 56 , uScreenId 57 #ifdef VBOX_WITH_VIDEOHWACCEL 58 , bAccelerate2DVideo 59 #endif 60 ) 49 UIMachineViewSeamless::UIMachineViewSeamless(UIMachineWindow *pMachineWindow, ulong uScreenId) 50 : UIMachineView(pMachineWindow, uScreenId) 61 51 { 62 52 /* Prepare seamless view: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.h
r82968 r84790 32 32 33 33 /* Seamless machine-view constructor: */ 34 UIMachineViewSeamless( UIMachineWindow *pMachineWindow 35 , ulong uScreenId 36 #ifdef VBOX_WITH_VIDEOHWACCEL 37 , bool bAccelerate2DVideo 38 #endif 39 ); 34 UIMachineViewSeamless(UIMachineWindow *pMachineWindow, ulong uScreenId); 40 35 /* Seamless machine-view destructor: */ 41 36 virtual ~UIMachineViewSeamless() { cleanupSeamless(); } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp
r83940 r84790 454 454 UIMachineSettingsSystem *pSystemPage = 455 455 qobject_cast<UIMachineSettingsSystem*>(m_pSelector->idToPage(MachineSettingsPageType_System)); 456 #if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_WITH_3D_ACCELERATION)456 #ifdef VBOX_WITH_3D_ACCELERATION 457 457 UIMachineSettingsDisplay *pDisplayPage = 458 458 qobject_cast<UIMachineSettingsDisplay*>(m_pSelector->idToPage(MachineSettingsPageType_Display)); 459 #endif /* VBOX_WITH_ VIDEOHWACCEL || VBOX_WITH_3D_ACCELERATION */459 #endif /* VBOX_WITH_3D_ACCELERATION */ 460 460 461 461 /* Guest OS type & VT-x/AMD-V option correlation auto-fix: */ … … 463 463 pGeneralPage->is64BitOSTypeSelected() && !pSystemPage->isHWVirtExEnabled()) 464 464 m_machine.SetHWVirtExProperty(KHWVirtExPropertyType_Enabled, true); 465 466 #ifdef VBOX_WITH_VIDEOHWACCEL467 /* Disable 2D Video Acceleration for non-Windows guests: */468 if (pGeneralPage && !pGeneralPage->isWindowsOSTypeSelected())469 {470 if (pDisplayPage && pDisplayPage->isAcceleration2DVideoSelected())471 m_machine.GetGraphicsAdapter().SetAccelerate2DVideoEnabled(false);472 }473 #endif /* VBOX_WITH_VIDEOHWACCEL */474 465 475 466 #ifdef VBOX_WITH_3D_ACCELERATION -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp
r83627 r84790 24 24 #include "UIErrorString.h" 25 25 #include "UICommon.h" 26 #include "VBox2DHelpers.h"27 26 28 27 /* COM includes: */ … … 49 48 #ifdef VBOX_WITH_3D_ACCELERATION 50 49 , m_f3dAccelerationEnabled(false) 51 #endif52 #ifdef VBOX_WITH_VIDEOHWACCEL53 , m_f2dVideoAccelerationEnabled(false)54 50 #endif 55 51 , m_fRemoteDisplayServerSupported(false) … … 80 76 && (m_f3dAccelerationEnabled == other.m_f3dAccelerationEnabled) 81 77 #endif 82 #ifdef VBOX_WITH_VIDEOHWACCEL83 && (m_f2dVideoAccelerationEnabled == other.m_f2dVideoAccelerationEnabled)84 #endif85 78 && (m_fRemoteDisplayServerSupported == other.m_fRemoteDisplayServerSupported) 86 79 && (m_fRemoteDisplayServerEnabled == other.m_fRemoteDisplayServerEnabled) … … 247 240 /** Holds whether the 3D acceleration is enabled. */ 248 241 bool m_f3dAccelerationEnabled; 249 #endif250 #ifdef VBOX_WITH_VIDEOHWACCEL251 /** Holds whether the 2D video acceleration is enabled. */252 bool m_f2dVideoAccelerationEnabled;253 242 #endif 254 243 /** Holds whether the remote display server is supported. */ … … 291 280 , m_fWddmModeSupported(false) 292 281 #endif 293 #ifdef VBOX_WITH_VIDEOHWACCEL294 , m_f2DVideoAccelerationSupported(false)295 #endif296 282 , m_enmGraphicsControllerTypeRecommended(KGraphicsControllerType_Null) 297 283 , m_pCache(0) … … 323 309 m_pVideoMemoryEditor->set3DAccelerationSupported(m_fWddmModeSupported); 324 310 #endif 325 #ifdef VBOX_WITH_VIDEOHWACCEL326 /* Check if 2D video acceleration supported by the guest OS type: */327 const QString strGuestOSTypeFamily = m_comGuestOSType.isNotNull() ? m_comGuestOSType.GetFamilyId() : QString();328 m_f2DVideoAccelerationSupported = strGuestOSTypeFamily == "Windows";329 m_pVideoMemoryEditor->set2DVideoAccelerationSupported(m_f2DVideoAccelerationSupported);330 #endif331 311 /* Acquire recommended graphics controller type: */ 332 312 m_enmGraphicsControllerTypeRecommended = m_comGuestOSType.GetRecommendedGraphicsController(); … … 342 322 } 343 323 #endif /* VBOX_WITH_3D_ACCELERATION */ 344 345 #ifdef VBOX_WITH_VIDEOHWACCEL346 bool UIMachineSettingsDisplay::isAcceleration2DVideoSelected() const347 {348 return m_pCheckbox2DVideo->isChecked();349 }350 #endif /* VBOX_WITH_VIDEOHWACCEL */351 324 352 325 KGraphicsControllerType UIMachineSettingsDisplay::graphicsControllerTypeRecommended() const … … 390 363 oldDisplayData.m_f3dAccelerationEnabled = comGraphics.GetAccelerate3DEnabled(); 391 364 #endif 392 #ifdef VBOX_WITH_VIDEOHWACCEL393 oldDisplayData.m_f2dVideoAccelerationEnabled = comGraphics.GetAccelerate2DVideoEnabled();394 #endif395 365 } 396 366 … … 455 425 m_pCheckbox3D->setChecked(oldDisplayData.m_f3dAccelerationEnabled); 456 426 #endif 457 #ifdef VBOX_WITH_VIDEOHWACCEL458 m_pCheckbox2DVideo->setChecked(oldDisplayData.m_f2dVideoAccelerationEnabled);459 #endif460 427 /* Push required value to m_pVideoMemoryEditor: */ 461 428 sltHandleGuestScreenCountEditorChange(); … … 463 430 #ifdef VBOX_WITH_3D_ACCELERATION 464 431 sltHandle3DAccelerationCheckboxChange(); 465 #endif466 #ifdef VBOX_WITH_VIDEOHWACCEL467 sltHandle2DVideoAccelerationCheckboxChange();468 432 #endif 469 433 // Should be the last one for this tab, since it depends on some of others: … … 524 488 #ifdef VBOX_WITH_3D_ACCELERATION 525 489 newDisplayData.m_f3dAccelerationEnabled = m_pCheckbox3D->isChecked(); 526 #endif527 #ifdef VBOX_WITH_VIDEOHWACCEL528 newDisplayData.m_f2dVideoAccelerationEnabled = m_pCheckbox2DVideo->isChecked();529 490 #endif 530 491 /* If remote display server is supported: */ … … 632 593 } 633 594 #endif /* VBOX_WITH_3D_ACCELERATION */ 634 #ifdef VBOX_WITH_VIDEOHWACCEL635 /* 2D acceleration video RAM amount test: */636 else if (m_pCheckbox2DVideo->isChecked() && m_f2DVideoAccelerationSupported)637 {638 uNeedBytes += VBox2DHelpers::required2DOffscreenVideoMemory();639 if ((quint64)m_pVideoMemoryEditor->value() * _1M < uNeedBytes)640 {641 message.second << tr("The virtual machine is currently assigned less than <b>%1</b> of video memory "642 "which is the minimum amount required for High Definition Video to be played efficiently.")643 .arg(uiCommon().formatSize(uNeedBytes, 0, FormatSize_RoundUp));644 }645 }646 #endif /* VBOX_WITH_VIDEOHWACCEL */647 595 } 648 596 … … 656 604 } 657 605 #endif /* VBOX_WITH_3D_ACCELERATION */ 658 659 #ifdef VBOX_WITH_VIDEOHWACCEL660 /* 2D video acceleration is available for Windows guests only: */661 if (m_pCheckbox2DVideo->isChecked() && !m_f2DVideoAccelerationSupported)662 {663 message.second << tr("The virtual machine is set up to use Video Stream Acceleration. "664 "As this feature only works with Windows guest systems it will be disabled.");665 }666 #endif /* VBOX_WITH_VIDEOHWACCEL */667 606 668 607 /* Graphics controller type test: */ … … 819 758 m_pCheckbox3D->hide(); 820 759 #endif 821 m_pCheckbox2DVideo->hide();822 m_pPlaceholder2DVideo->hide();823 760 824 761 /* Polish 'Remote Display' availability: */ … … 887 824 } 888 825 #endif /* VBOX_WITH_3D_ACCELERATION */ 889 890 #ifdef VBOX_WITH_VIDEOHWACCEL891 void UIMachineSettingsDisplay::sltHandle2DVideoAccelerationCheckboxChange()892 {893 /* Update Video RAM requirements: */894 m_pVideoMemoryEditor->set2DVideoAccelerationEnabled(m_pCheckbox2DVideo->isChecked());895 896 /* Revalidate: */897 revalidate();898 }899 #endif /* VBOX_WITH_VIDEOHWACCEL */900 826 901 827 void UIMachineSettingsDisplay::sltHandleRecordingCheckboxToggle() … … 1248 1174 this, &UIMachineSettingsDisplay::sltHandle3DAccelerationCheckboxChange); 1249 1175 #endif 1250 #ifdef VBOX_WITH_VIDEOHWACCEL1251 connect(m_pCheckbox2DVideo, &QCheckBox::stateChanged,1252 this, &UIMachineSettingsDisplay::sltHandle2DVideoAccelerationCheckboxChange);1253 #endif1254 1176 1255 1177 /* Configure 'Remote Display' connections: */ … … 1421 1343 { 1422 1344 comGraphics.SetAccelerate3DEnabled(newDisplayData.m_f3dAccelerationEnabled); 1423 fSuccess = comGraphics.isOk();1424 }1425 #endif1426 #ifdef VBOX_WITH_VIDEOHWACCEL1427 /* Save whether 2D video acceleration is enabled: */1428 if (fSuccess && isMachineOffline() && newDisplayData.m_f2dVideoAccelerationEnabled != oldDisplayData.m_f2dVideoAccelerationEnabled)1429 {1430 comGraphics.SetAccelerate2DVideoEnabled(newDisplayData.m_f2dVideoAccelerationEnabled);1431 1345 fSuccess = comGraphics.isOk(); 1432 1346 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.h
r82968 r84790 54 54 bool isAcceleration3DSelected() const; 55 55 #endif 56 #ifdef VBOX_WITH_VIDEOHWACCEL57 /** Returns whether 2D Video Acceleration is enabled. */58 bool isAcceleration2DVideoSelected() const;59 #endif60 56 61 57 /** Returns recommended graphics controller type. */ … … 106 102 /** Handles 3D Acceleration check-box change. */ 107 103 void sltHandle3DAccelerationCheckboxChange(); 108 #endif109 #ifdef VBOX_WITH_VIDEOHWACCEL110 /** Handles 2D Video Acceleration check-box change. */111 void sltHandle2DVideoAccelerationCheckboxChange();112 104 #endif 113 105 … … 177 169 bool m_fWddmModeSupported; 178 170 #endif 179 #ifdef VBOX_WITH_VIDEOHWACCEL180 /** Holds whether the guest OS supports 2D Video Acceleration. */181 bool m_f2DVideoAccelerationSupported;182 #endif183 171 /** Holds recommended graphics controller type. */ 184 172 KGraphicsControllerType m_enmGraphicsControllerTypeRecommended; -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.ui
r82974 r84790 178 178 <item> 179 179 <widget class="QWidget" name="m_pPlaceholder3D"/> 180 </item>181 </layout>182 </item>183 <item row="8" column="1">184 <layout class="QStackedLayout" name="m_pLayout2DVideo">185 <item>186 <widget class="QCheckBox" name="m_pCheckbox2DVideo">187 <property name="sizePolicy">188 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">189 <horstretch>0</horstretch>190 <verstretch>0</verstretch>191 </sizepolicy>192 </property>193 <property name="whatsThis">194 <string>When checked, the virtual machine will be given access to the Video Acceleration capabilities available on the host.</string>195 </property>196 <property name="text">197 <string>Enable &2D Video Acceleration</string>198 </property>199 </widget>200 </item>201 <item>202 <widget class="QWidget" name="m_pPlaceholder2DVideo"/>203 180 </item> 204 181 </layout> -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.cpp
r83902 r84790 141 141 : false; 142 142 } 143 144 #ifdef VBOX_WITH_VIDEOHWACCEL145 bool UIMachineSettingsGeneral::isWindowsOSTypeSelected() const146 {147 AssertPtrReturn(m_pNameAndSystemEditor, false);148 return m_pNameAndSystemEditor->familyId() == "Windows";149 }150 #endif /* VBOX_WITH_VIDEOHWACCEL */151 143 152 144 void UIMachineSettingsGeneral::setHWVirtExEnabled(bool fEnabled) -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.h
r82968 r84790 48 48 /** Returns whether 64bit OS type ID is selected. */ 49 49 bool is64BitOSTypeSelected() const; 50 #ifdef VBOX_WITH_VIDEOHWACCEL51 /** Returns whether Windows OS type ID is selected. */52 bool isWindowsOSTypeSelected() const;53 #endif /* VBOX_WITH_VIDEOHWACCEL */54 50 55 51 /** Defines whether HW virtualization extension is enabled. */ -
trunk/src/VBox/Frontends/VirtualBox/src/snapshots/UISnapshotDetailsWidget.cpp
r82968 r84790 1718 1718 /* Prepare report: */ 1719 1719 QStringList aReport; 1720 #ifdef VBOX_WITH_VIDEOHWACCEL1721 /* 2D Video Acceleration? */1722 if (comGraphics.GetAccelerate2DVideoEnabled())1723 aReport << QApplication::translate("UIDetails", "2D Video", "details (display)");1724 #endif1725 1720 /* 3D Acceleration? */ 1726 1721 if (comGraphics.GetAccelerate3DEnabled() && uiCommon().is3DAvailable()) -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIVideoMemoryEditor.cpp
r82968 r84790 27 27 #include "UICommon.h" 28 28 #include "UIVideoMemoryEditor.h" 29 #include "VBox2DHelpers.h"30 29 31 30 /* COM includes: */ … … 43 42 , m_f3DAccelerationEnabled(false) 44 43 #endif 45 #ifdef VBOX_WITH_VIDEOHWACCEL46 , m_f2DVideoAccelerationSupported(false)47 , m_f2DVideoAccelerationEnabled(false)48 #endif49 44 , m_iMinVRAM(0) 50 45 , m_iMaxVRAM(0) … … 140 135 } 141 136 #endif /* VBOX_WITH_3D_ACCELERATION */ 142 143 #ifdef VBOX_WITH_VIDEOHWACCEL144 void UIVideoMemoryEditor::set2DVideoAccelerationSupported(bool fSupported)145 {146 /* Check if 2D video acceleration really changed: */147 if (m_f2DVideoAccelerationSupported == fSupported)148 return;149 150 /* Remember new 2D video acceleration: */151 m_f2DVideoAccelerationSupported = fSupported;152 153 /* Update requirements: */154 updateRequirements();155 }156 157 void UIVideoMemoryEditor::set2DVideoAccelerationEnabled(bool fEnabled)158 {159 /* Check if 2D video acceleration really changed: */160 if (m_f2DVideoAccelerationEnabled == fEnabled)161 return;162 163 /* Remember new 2D video acceleration: */164 m_f2DVideoAccelerationEnabled = fEnabled;165 166 /* Update requirements: */167 updateRequirements();168 }169 #endif /* VBOX_WITH_VIDEOHWACCEL */170 137 171 138 void UIVideoMemoryEditor::retranslateUi() … … 333 300 #endif 334 301 335 #ifdef VBOX_WITH_VIDEOHWACCEL336 if (m_f2DVideoAccelerationEnabled && m_f2DVideoAccelerationSupported)337 {338 uNeedMBytes += VBox2DHelpers::required2DOffscreenVideoMemory() / _1M;339 }340 #endif341 342 302 if (m_pSpinBox) 343 303 m_pSpinBox->setMaximum(m_iMaxVRAMVisible); -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIVideoMemoryEditor.h
r82968 r84790 75 75 #endif 76 76 77 #ifdef VBOX_WITH_VIDEOHWACCEL78 /** Defines whether 2D video acceleration is @a fSupported. */79 void set2DVideoAccelerationSupported(bool fSupported);80 /** Defines whether 2D video acceleration is @a fEnabled. */81 void set2DVideoAccelerationEnabled(bool fEnabled);82 #endif83 84 77 protected: 85 78 … … 123 116 bool m_f3DAccelerationEnabled; 124 117 #endif 125 #ifdef VBOX_WITH_VIDEOHWACCEL126 /** Holds whether 2D video acceleration is supported. */127 bool m_f2DVideoAccelerationSupported;128 /** Holds whether 2D video acceleration is enabled. */129 bool m_f2DVideoAccelerationEnabled;130 #endif131 118 132 119 /** Holds the minimum lower limit of VRAM (MiB). */
Note:
See TracChangeset
for help on using the changeset viewer.