VirtualBox

Changeset 84790 in vbox for trunk


Ignore:
Timestamp:
Jun 11, 2020 10:30:36 AM (5 years ago)
Author:
vboxsync
Message:

FE/Qt, Main/Helpers: Get rid of 2D Video Acceleration code.

Location:
trunk/src/VBox
Files:
6 deleted
31 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk

    r84746 r84790  
    140140 endif
    141141endif
    142 ifdef VBOX_WITH_VIDEOHWACCEL
    143  VirtualBox_DEFS          += VBOX_WITH_VIDEOHWACCEL VBOX_GUI_USE_QGL
    144 else ifdef VBOX_GUI_USE_QGL
    145  VirtualBox_DEFS          += VBOX_GUI_USE_QGL
    146 endif
    147142ifdef VBOX_WITH_LIBCURL
    148143 VirtualBox_DEFS          += VBOX_GUI_WITH_NETWORK_MANAGER
     
    211206 endif
    212207endif
    213 ifdef VBOX_WITH_VIDEOHWACCEL
    214  VirtualBoxVM_DEFS          += VBOX_WITH_VIDEOHWACCEL VBOX_GUI_USE_QGL
    215 else ifdef VBOX_GUI_USE_QGL
    216  VirtualBoxVM_DEFS          += VBOX_GUI_USE_QGL
    217 endif
    218208ifdef VBOX_GUI_WITH_QTGLFRAMEBUFFER
    219209 VirtualBoxVM_DEFS          += VBOX_GUI_WITH_QTGLFRAMEBUFFER
     
    269259  UICommon_DEFS       += VBOX_WITH_DEBUGGER_GUI_MENU
    270260 endif
    271 endif
    272 ifdef VBOX_WITH_VIDEOHWACCEL
    273  UICommon_DEFS        += VBOX_WITH_VIDEOHWACCEL VBOX_GUI_USE_QGL
    274 else ifdef VBOX_GUI_USE_QGL
    275  UICommon_DEFS        += VBOX_GUI_USE_QGL
    276261endif
    277262ifdef VBOX_WITH_LIBCURL
     
    404389        -framework AppKit -framework Carbon -framework IOKit
    405390
    406 if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
     391ifdef VBOX_GUI_WITH_QTGLFRAMEBUFFER
    407392 VirtualBox_LDFLAGS.darwin += -framework OpenGL
    408393endif
     
    442427        -framework AppKit -framework Carbon -framework IOKit \
    443428
    444 if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
     429ifdef VBOX_GUI_WITH_QTGLFRAMEBUFFER
    445430 VirtualBoxVM_LDFLAGS.darwin += -framework OpenGL
    446431endif
     
    468453        -framework Carbon \
    469454        -framework IOKit
    470 if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
     455
     456ifdef VBOX_GUI_WITH_QTGLFRAMEBUFFER
    471457 UICommon_LDFLAGS.darwin += -framework OpenGL
    472458endif
     
    508494
    509495# These are 2D Video Acceleration and 3D Acceleration related libs:
    510 if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
     496ifdef VBOX_GUI_WITH_QTGLFRAMEBUFFER
    511497 VirtualBox_LIBS.win       += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib
    512498 VirtualBox_LIBS.solaris   += GL
     
    561547
    562548# These are 2D Video Acceleration and 3D Acceleration related libs:
    563 if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
     549ifdef VBOX_GUI_WITH_QTGLFRAMEBUFFER
    564550 VirtualBoxVM_LIBS.win       += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib
    565551 VirtualBoxVM_LIBS.solaris   += GL
     
    598584
    599585# These are 2D Video Acceleration and 3D Acceleration related libs:
    600 if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
     586ifdef VBOX_GUI_WITH_QTGLFRAMEBUFFER
    601587 UICommon_LIBS.win     += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib
    602588 UICommon_LIBS.solaris += GL
     
    606592ifdef VBOX_WITH_3D_ACCELERATION
    607593 UICommon_LIBS += $(PATH_STAGE_LIB)/VBoxOGLTest$(VBOX_SUFF_LIB)
    608 endif
    609 if defined(VBOX_WITH_VIDEOHWACCEL)
    610  if1of ($(KBUILD_TARGET), win linux freebsd)
    611   UICommon_LIBS += $(PATH_STAGE_LIB)/VBoxOGL2D$(VBOX_SUFF_LIB)
    612  endif
    613594endif
    614595
     
    11951176        src/platform/win/UIDesktopServices_win.cpp
    11961177
    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.cpp
    1202 endif
    1203 
    12041178$(call VBOX_SET_VER_INFO_EXE,VirtualBox,VirtualBox Manager,$(VBOX_WINDOWS_ICON_FILE))
    12051179
     
    12741248        src/runtime/UIDnDEnumFormat_win.cpp
    12751249 endif
    1276 endif
    1277 
    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.cpp
    12831250endif
    12841251
     
    15011468        src/platform/darwin/VBoxUtils-darwin.cpp
    15021469
    1503 if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
    1504  UICommon_SOURCES += \
    1505         src/VBox2DHelpers.cpp \
    1506         src/VBoxGLSupportInfo.cpp
    1507 endif
    1508 
    15091470
    15101471#
     
    15371498VirtualBox_QT_MODULES.darwin  += MacExtras
    15381499VirtualBox_QT_MODULES.win     += WinExtras
    1539 if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
     1500ifdef VBOX_GUI_WITH_QTGLFRAMEBUFFER
    15401501 VirtualBox_QT_MODULES += OpenGL
    15411502endif
     
    15531514VirtualBoxVM_QT_MODULES.darwin  += MacExtras
    15541515VirtualBoxVM_QT_MODULES.win     += WinExtras
    1555 if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
     1516ifdef VBOX_GUI_WITH_QTGLFRAMEBUFFER
    15561517 VirtualBoxVM_QT_MODULES += OpenGL
    15571518endif
     
    15691530UICommon_QT_MODULES.darwin  += MacExtras
    15701531UICommon_QT_MODULES.win     += WinExtras
    1571 if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
     1532ifdef VBOX_GUI_WITH_QTGLFRAMEBUFFER
    15721533 UICommon_QT_MODULES += OpenGL
    15731534endif
     
    16011562UICommon_SOURCES += $(VBOX_VIRTUALBOX_OUT_DIR)/VirtualBoxBrand.qrc
    16021563$(VBOX_VIRTUALBOX_OUT_DIR)/VirtualBoxBrand.qrc_RCCFLAGS = -name BRAND
    1603 if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
    1604  UICommon_SOURCES += VirtualBoxShaders.qrc
    1605  VirtualBoxShaders.qrc_RCCFLAGS = -name SHADERS
    1606 endif
    16071564
    16081565
     
    18661823                --output $@ $<
    18671824endif # darwin
    1868 
    1869 #
    1870 # App for testing GL support
    1871 #
    1872 if defined(VBOX_WITH_VIDEOHWACCEL)
    1873  if1of ($(KBUILD_TARGET), win linux freebsd)
    1874   LIBRARIES += VBoxOGL2D
    1875   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_QGL
    1877   VBoxOGL2D_QT_MODULES += OpenGL
    1878   VBoxOGL2D_SOURCES = \
    1879         src/VBoxGLSupportInfo.cpp
    1880   VBoxOGL2D_INCS = include
    1881  endif
    1882 endif
    18831825
    18841826
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.cpp

    r83452 r84790  
    166166const char *UIExtraDataDefs::GUI_VirtualScreenToHostScreen = "GUI/VirtualScreenToHostScreen";
    167167const char *UIExtraDataDefs::GUI_AutomountGuestScreens = "GUI/AutomountGuestScreens";
    168 #ifdef VBOX_WITH_VIDEOHWACCEL
    169 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 */
    175168#ifndef VBOX_WS_MAC
    176169const char *UIExtraDataDefs::GUI_ShowMiniToolBar = "GUI/ShowMiniToolBar";
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h

    r83653 r84790  
    317317        /** Holds whether automatic mounting/unmounting of guest-screens enabled. */
    318318        SHARED_LIBRARY_STUFF extern const char *GUI_AutomountGuestScreens;
    319 #ifdef VBOX_WITH_VIDEOHWACCEL
    320         /** 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 */
    331319#ifndef VBOX_WS_MAC
    332320        /** Holds whether mini-toolbar is enabled for full and seamless screens. */
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp

    r83452 r84790  
    19631963           << GUI_AutoresizeGuest << GUI_LastVisibilityStatusForGuestScreen << GUI_LastGuestSizeHint
    19641964           << GUI_VirtualScreenToHostScreen << GUI_AutomountGuestScreens
    1965 #ifdef VBOX_WITH_VIDEOHWACCEL
    1966            << GUI_Accelerate2D_StretchLinear
    1967            << GUI_Accelerate2D_PixformatYV12 << GUI_Accelerate2D_PixformatUYVY
    1968            << GUI_Accelerate2D_PixformatYUY2 << GUI_Accelerate2D_PixformatAYUV
    1969 #endif /* VBOX_WITH_VIDEOHWACCEL */
    19701965#ifndef VBOX_WS_MAC
    19711966           << GUI_ShowMiniToolBar << GUI_MiniToolBarAutoHide << GUI_MiniToolBarAlignment
     
    37823777}
    37833778
    3784 #ifdef VBOX_WITH_VIDEOHWACCEL
    3785 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 
    38163779#ifndef VBOX_WS_MAC
    38173780bool UIExtraDataManager::miniToolbarEnabled(const QUuid &uID)
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h

    r83452 r84790  
    548548        /** Returns whether automatic mounting/unmounting of guest-screens enabled. */
    549549        bool autoMountGuestScreensEnabled(const QUuid &uID);
    550 
    551 #ifdef VBOX_WITH_VIDEOHWACCEL
    552         /** 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 */
    563550
    564551#ifndef VBOX_WS_MAC
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.h

    r82968 r84790  
    6262#ifdef VBOX_WS_MAC
    6363        ShowWindowEventType,
    64 #endif
    65 #ifdef VBOX_GUI_USE_QGL
    66         VHWACommandProcessType,
    6764#endif
    6865    };
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDetailsGenerator.cpp

    r84107 r84790  
    413413    {
    414414        QStringList acceleration;
    415 #ifdef VBOX_WITH_VIDEOHWACCEL
    416         /* 2D acceleration: */
    417         if (comGraphics.GetAccelerate2DVideoEnabled())
    418             acceleration << QApplication::translate("UIDetails", "2D Video", "details (display)");
    419 #endif
    420415        /* 3D acceleration: */
    421416        if (comGraphics.GetAccelerate3DEnabled())
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp

    r84768 r84790  
    3636# include "UIMachineWindow.h"
    3737#endif /* VBOX_WITH_MASKED_SEAMLESS */
    38 #ifdef VBOX_WITH_VIDEOHWACCEL
    39 # include "VBoxFBOverlay.h"
    40 #endif /* VBOX_WITH_VIDEOHWACCEL */
    4138
    4239/* COM includes: */
     
    423420    virtual void performRescale();
    424421
    425 #ifdef VBOX_WITH_VIDEOHWACCEL
    426     /** Performs Video HW Acceleration command. */
    427     virtual void doProcessVHWACommand(QEvent*) {}
    428422    /** Handles viewport resize-event. */
    429423    virtual void viewportResized(QResizeEvent*)
    430424    {
    431 # ifdef VBOX_GUI_WITH_QTGLFRAMEBUFFER
     425#ifdef VBOX_GUI_WITH_QTGLFRAMEBUFFER
    432426        /* Sync GL widget size with the MachineView widget: */
    433427        /** @todo This can be probably done in a more automated way. */
    434428        if (m_pGLWidget && m_pMachineView)
    435429            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    }
    441432
    442433#ifdef VBOX_GUI_WITH_QTGLFRAMEBUFFER
     
    10781069
    10791070
    1080 #ifdef VBOX_WITH_VIDEOHWACCEL
    1081 /** UIFrameBufferPrivate reimplementation used to maintain VM display video memory
    1082   *                      for the case when 2D Video Acceleration is enabled. */
    1083 class VBoxOverlayFrameBuffer : public UIFrameBufferPrivate
    1084 {
    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 
    11991071#ifdef VBOX_WITH_XPCOM
    12001072NS_DECL_CLASSINFO(UIFrameBufferPrivate)
     
    24722344
    24732345
    2474 #ifdef VBOX_WITH_VIDEOHWACCEL
    2475 UIFrameBuffer::UIFrameBuffer(bool m_fAccelerate2DVideo)
    2476 {
    2477     if (m_fAccelerate2DVideo)
    2478     {
    2479         ComObjPtr<VBoxOverlayFrameBuffer> pFrameBuffer;
    2480         pFrameBuffer.createObject();
    2481         m_pFrameBuffer = pFrameBuffer;
    2482     }
    2483     else
    2484     {
    2485         m_pFrameBuffer.createObject();
    2486     }
    2487 }
    2488 #else /* !VBOX_WITH_VIDEOHWACCEL */
    24892346UIFrameBuffer::UIFrameBuffer()
    24902347{
    24912348    m_pFrameBuffer.createObject();
    24922349}
    2493 #endif /* !VBOX_WITH_VIDEOHWACCEL */
    24942350
    24952351UIFrameBuffer::~UIFrameBuffer()
     
    26582514}
    26592515
    2660 #ifdef VBOX_WITH_VIDEOHWACCEL
    2661 void UIFrameBuffer::doProcessVHWACommand(QEvent *pEvent)
    2662 {
    2663     m_pFrameBuffer->doProcessVHWACommand(pEvent);
    2664 }
    2665 
    26662516void UIFrameBuffer::viewportResized(QResizeEvent *pEvent)
    26672517{
     
    26692519}
    26702520
    2671 void UIFrameBuffer::viewportScrolled(int iX, int iY)
    2672 {
    2673     m_pFrameBuffer->viewportScrolled(iX, iY);
    2674 }
    2675 #endif /* VBOX_WITH_VIDEOHWACCEL */
    2676 
    26772521#include "UIFrameBuffer.moc"
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h

    r82968 r84790  
    4545public:
    4646
    47 #ifdef VBOX_WITH_VIDEOHWACCEL
    48     /** Frame-buffer constructor.
    49       * @param m_fAccelerate2DVideo defines whether we should use VBoxOverlayFrameBuffer
    50       *                             instead of the default one. */
    51     UIFrameBuffer(bool m_fAccelerate2DVideo);
    52 #else /* !VBOX_WITH_VIDEOHWACCEL */
    5347    /** Frame-buffer constructor. */
    5448    UIFrameBuffer();
    55 #endif /* !VBOX_WITH_VIDEOHWACCEL */
    5649
    5750    /** Frame-buffer destructor. */
     
    140133    void performRescale();
    141134
    142 #ifdef VBOX_WITH_VIDEOHWACCEL
    143     /** Performs Video HW Acceleration command. */
    144     void doProcessVHWACommand(QEvent *pEvent);
    145135    /** Handles viewport resize-event. */
    146136    void viewportResized(QResizeEvent *pEvent);
    147     /** Handles viewport scroll-event. */
    148     void viewportScrolled(int iX, int iY);
    149 #endif /* VBOX_WITH_VIDEOHWACCEL */
    150137
    151138private:
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp

    r84724 r84790  
    4040#include "UIMouseHandler.h"
    4141#include "UIFrameBuffer.h"
    42 #include "VBoxFBOverlay.h"
    4342#ifdef VBOX_WS_MAC
    4443# include "UICocoaApplication.h"
     
    116115
    117116/* 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                                      )
     117UIMachineView* UIMachineView::create(UIMachineWindow *pMachineWindow, ulong uScreenId, UIVisualStateType visualStateType)
    125118{
    126119    UIMachineView *pMachineView = 0;
     
    128121    {
    129122        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);
    136124            break;
    137125        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);
    144127            break;
    145128        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);
    152130            break;
    153131        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);
    160133            break;
    161134        default:
     
    659632}
    660633
    661 UIMachineView::UIMachineView(  UIMachineWindow *pMachineWindow
    662                              , ulong uScreenId
    663 #ifdef VBOX_WITH_VIDEOHWACCEL
    664                              , bool bAccelerate2DVideo
    665 #endif /* VBOX_WITH_VIDEOHWACCEL */
    666                              )
     634UIMachineView::UIMachineView(UIMachineWindow *pMachineWindow, ulong uScreenId)
    667635    : QAbstractScrollArea(pMachineWindow->centralWidget())
    668636    , m_pMachineWindow(pMachineWindow)
     
    673641    , m_maxGuestSizePolicy(MaxGuestResolutionPolicy_Automatic)
    674642    , m_u64MaxGuestSize(0)
    675 #ifdef VBOX_WITH_VIDEOHWACCEL
    676     , m_fAccelerate2DVideo(bAccelerate2DVideo)
    677 #endif /* VBOX_WITH_VIDEOHWACCEL */
    678643#ifdef VBOX_WITH_DRAG_AND_DROP_GH
    679644    , m_fIsDraggingFromGuest(false)
     
    726691    else
    727692    {
    728 #ifdef VBOX_WITH_VIDEOHWACCEL
    729         /* Create new frame-buffer: */
    730         m_pFrameBuffer = new UIFrameBuffer(m_fAccelerate2DVideo);
    731         m_pFrameBuffer->init(this);
    732 #else /* VBOX_WITH_VIDEOHWACCEL */
    733693        /* Create new frame-buffer: */
    734694        m_pFrameBuffer = new UIFrameBuffer;
    735695        m_pFrameBuffer->init(this);
    736 #endif /* !VBOX_WITH_VIDEOHWACCEL */
    737696
    738697        /* Take scaling optimization type into account: */
     
    892851    QApplication::sendPostedEvents(this, QEvent::MetaCall);
    893852
    894 #ifdef VBOX_WITH_VIDEOHWACCEL
    895     if (m_fAccelerate2DVideo)
    896         QApplication::sendPostedEvents(this, VHWACommandProcessType);
    897 #endif /* VBOX_WITH_VIDEOHWACCEL */
    898 
    899853    /* Temporarily detach the framebuffer from IDisplay before detaching
    900854     * from view in order to respect the thread synchonisation logic (see UIFrameBuffer.h).
     
    13441298void UIMachineView::scrollContentsBy(int dx, int dy)
    13451299{
    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: */
    13521301    QAbstractScrollArea::scrollContentsBy(dx, dy);
    13531302
     
    14231372#endif /* VBOX_WS_MAC */
    14241373
    1425 #ifdef VBOX_WITH_VIDEOHWACCEL
    1426         case VHWACommandProcessType:
    1427         {
    1428             m_pFrameBuffer->doProcessVHWACommand(pEvent);
    1429             return true;
    1430         }
    1431 #endif /* VBOX_WITH_VIDEOHWACCEL */
    1432 
    14331374        default:
    14341375            break;
     
    14461387            case QEvent::Resize:
    14471388            {
    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);
    14501391                if (m_pFrameBuffer)
    14511392                    m_pFrameBuffer->viewportResized(pResizeEvent);
    1452 #endif /* VBOX_WITH_VIDEOHWACCEL */
    14531393                /* Update console's display viewport and 3D overlay: */
    14541394                updateViewport();
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h

    r82968 r84790  
    7878
    7979    /* 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);
    8781    /* Factory function to destroy required machine-view: */
    8882    static void destroy(UIMachineView *pMachineView);
     
    145139
    146140    /* 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);
    153142    /* Machine-view destructor: */
    154143    virtual ~UIMachineView() {}
     
    377366    volatile uint64_t m_u64MaxGuestSize;
    378367
    379 #ifdef VBOX_WITH_VIDEOHWACCEL
    380     bool m_fAccelerate2DVideo : 1;
    381 #endif /* VBOX_WITH_VIDEOHWACCEL */
    382 
    383368    /** Holds the pause-pixmap. */
    384369    QPixmap m_pausePixmap;
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp

    r84741 r84790  
    4040#include "UIMouseHandler.h"
    4141#include "UIVMCloseDialog.h"
    42 #include "VBox2DHelpers.h"
    4342
    4443/* COM includes: */
     
    496495void UIMachineWindow::prepareMachineView()
    497496{
    498 #ifdef VBOX_WITH_VIDEOHWACCEL
    499     /* 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 
    503497    /* Get visual-state type: */
    504498    UIVisualStateType visualStateType = machineLogic()->visualStateType();
    505499
    506500    /* 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);
    514502
    515503    /* Listen for frame-buffer resize: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r84696 r84790  
    5050#include "UIFrameBuffer.h"
    5151#include "UISettingsDialogSpecific.h"
    52 #ifdef VBOX_WITH_VIDEOHWACCEL
    53 # include "VBox2DHelpers.h"
    54 #endif
    5552#ifdef VBOX_WS_MAC
    5653# include "VBoxUtils-darwin.h"
     
    243240    /* Load VM settings: */
    244241    loadVMSettings();
    245 
    246 #ifdef VBOX_WITH_VIDEOHWACCEL
    247     /* 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 */
    252242
    253243/* Log whether HID LEDs sync is enabled: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp

    r82968 r84790  
    4343
    4444
    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                     )
     45UIMachineViewFullscreen::UIMachineViewFullscreen(UIMachineWindow *pMachineWindow, ulong uScreenId)
     46    : UIMachineView(pMachineWindow, uScreenId)
    5747    , m_bIsGuestAutoresizeEnabled(actionPool()->action(UIActionIndexRT_M_View_T_GuestAutoresize)->isChecked())
    5848{
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.h

    r82968 r84790  
    3232
    3333    /* 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);
    4035    /* Fullscreen machine-view destructor: */
    4136    virtual ~UIMachineViewFullscreen() {}
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp

    r82968 r84790  
    3737
    3838
    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                     )
     39UIMachineViewNormal::UIMachineViewNormal(UIMachineWindow *pMachineWindow, ulong uScreenId)
     40    : UIMachineView(pMachineWindow, uScreenId)
    5141    , m_bIsGuestAutoresizeEnabled(actionPool()->action(UIActionIndexRT_M_View_T_GuestAutoresize)->isChecked())
    5242{
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h

    r82968 r84790  
    3232
    3333    /* 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);
    4035    /* Normal machine-view destructor: */
    4136    virtual ~UIMachineViewNormal() {}
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.cpp

    r82968 r84790  
    4040
    4141
    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                     )
     42UIMachineViewScale::UIMachineViewScale(UIMachineWindow *pMachineWindow, ulong uScreenId)
     43    : UIMachineView(pMachineWindow, uScreenId)
    5444{
    5545}
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.h

    r82968 r84790  
    3232
    3333    /* 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);
    4035    /* Scale machine-view destructor: */
    4136    virtual ~UIMachineViewScale() {}
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp

    r82968 r84790  
    4747
    4848
    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                     )
     49UIMachineViewSeamless::UIMachineViewSeamless(UIMachineWindow *pMachineWindow, ulong uScreenId)
     50    : UIMachineView(pMachineWindow, uScreenId)
    6151{
    6252    /* Prepare seamless view: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.h

    r82968 r84790  
    3232
    3333    /* 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);
    4035    /* Seamless machine-view destructor: */
    4136    virtual ~UIMachineViewSeamless() { cleanupSeamless(); }
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp

    r83940 r84790  
    454454        UIMachineSettingsSystem *pSystemPage =
    455455            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
    457457        UIMachineSettingsDisplay *pDisplayPage =
    458458            qobject_cast<UIMachineSettingsDisplay*>(m_pSelector->idToPage(MachineSettingsPageType_Display));
    459 #endif /* VBOX_WITH_VIDEOHWACCEL || VBOX_WITH_3D_ACCELERATION */
     459#endif /* VBOX_WITH_3D_ACCELERATION */
    460460
    461461        /* Guest OS type & VT-x/AMD-V option correlation auto-fix: */
     
    463463            pGeneralPage->is64BitOSTypeSelected() && !pSystemPage->isHWVirtExEnabled())
    464464            m_machine.SetHWVirtExProperty(KHWVirtExPropertyType_Enabled, true);
    465 
    466 #ifdef VBOX_WITH_VIDEOHWACCEL
    467         /* 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 */
    474465
    475466#ifdef VBOX_WITH_3D_ACCELERATION
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp

    r83627 r84790  
    2424#include "UIErrorString.h"
    2525#include "UICommon.h"
    26 #include "VBox2DHelpers.h"
    2726
    2827/* COM includes: */
     
    4948#ifdef VBOX_WITH_3D_ACCELERATION
    5049        , m_f3dAccelerationEnabled(false)
    51 #endif
    52 #ifdef VBOX_WITH_VIDEOHWACCEL
    53         , m_f2dVideoAccelerationEnabled(false)
    5450#endif
    5551        , m_fRemoteDisplayServerSupported(false)
     
    8076               && (m_f3dAccelerationEnabled == other.m_f3dAccelerationEnabled)
    8177#endif
    82 #ifdef VBOX_WITH_VIDEOHWACCEL
    83                && (m_f2dVideoAccelerationEnabled == other.m_f2dVideoAccelerationEnabled)
    84 #endif
    8578               && (m_fRemoteDisplayServerSupported == other.m_fRemoteDisplayServerSupported)
    8679               && (m_fRemoteDisplayServerEnabled == other.m_fRemoteDisplayServerEnabled)
     
    247240    /** Holds whether the 3D acceleration is enabled. */
    248241    bool                     m_f3dAccelerationEnabled;
    249 #endif
    250 #ifdef VBOX_WITH_VIDEOHWACCEL
    251     /** Holds whether the 2D video acceleration is enabled. */
    252     bool                     m_f2dVideoAccelerationEnabled;
    253242#endif
    254243    /** Holds whether the remote display server is supported. */
     
    291280    , m_fWddmModeSupported(false)
    292281#endif
    293 #ifdef VBOX_WITH_VIDEOHWACCEL
    294     , m_f2DVideoAccelerationSupported(false)
    295 #endif
    296282    , m_enmGraphicsControllerTypeRecommended(KGraphicsControllerType_Null)
    297283    , m_pCache(0)
     
    323309    m_pVideoMemoryEditor->set3DAccelerationSupported(m_fWddmModeSupported);
    324310#endif
    325 #ifdef VBOX_WITH_VIDEOHWACCEL
    326     /* 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 #endif
    331311    /* Acquire recommended graphics controller type: */
    332312    m_enmGraphicsControllerTypeRecommended = m_comGuestOSType.GetRecommendedGraphicsController();
     
    342322}
    343323#endif /* VBOX_WITH_3D_ACCELERATION */
    344 
    345 #ifdef VBOX_WITH_VIDEOHWACCEL
    346 bool UIMachineSettingsDisplay::isAcceleration2DVideoSelected() const
    347 {
    348     return m_pCheckbox2DVideo->isChecked();
    349 }
    350 #endif /* VBOX_WITH_VIDEOHWACCEL */
    351324
    352325KGraphicsControllerType UIMachineSettingsDisplay::graphicsControllerTypeRecommended() const
     
    390363        oldDisplayData.m_f3dAccelerationEnabled = comGraphics.GetAccelerate3DEnabled();
    391364#endif
    392 #ifdef VBOX_WITH_VIDEOHWACCEL
    393         oldDisplayData.m_f2dVideoAccelerationEnabled = comGraphics.GetAccelerate2DVideoEnabled();
    394 #endif
    395365    }
    396366
     
    455425    m_pCheckbox3D->setChecked(oldDisplayData.m_f3dAccelerationEnabled);
    456426#endif
    457 #ifdef VBOX_WITH_VIDEOHWACCEL
    458     m_pCheckbox2DVideo->setChecked(oldDisplayData.m_f2dVideoAccelerationEnabled);
    459 #endif
    460427    /* Push required value to m_pVideoMemoryEditor: */
    461428    sltHandleGuestScreenCountEditorChange();
     
    463430#ifdef VBOX_WITH_3D_ACCELERATION
    464431    sltHandle3DAccelerationCheckboxChange();
    465 #endif
    466 #ifdef VBOX_WITH_VIDEOHWACCEL
    467     sltHandle2DVideoAccelerationCheckboxChange();
    468432#endif
    469433    // Should be the last one for this tab, since it depends on some of others:
     
    524488#ifdef VBOX_WITH_3D_ACCELERATION
    525489    newDisplayData.m_f3dAccelerationEnabled = m_pCheckbox3D->isChecked();
    526 #endif
    527 #ifdef VBOX_WITH_VIDEOHWACCEL
    528     newDisplayData.m_f2dVideoAccelerationEnabled = m_pCheckbox2DVideo->isChecked();
    529490#endif
    530491    /* If remote display server is supported: */
     
    632593            }
    633594#endif /* VBOX_WITH_3D_ACCELERATION */
    634 #ifdef VBOX_WITH_VIDEOHWACCEL
    635             /* 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 */
    647595        }
    648596
     
    656604        }
    657605#endif /* VBOX_WITH_3D_ACCELERATION */
    658 
    659 #ifdef VBOX_WITH_VIDEOHWACCEL
    660         /* 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 */
    667606
    668607        /* Graphics controller type test: */
     
    819758    m_pCheckbox3D->hide();
    820759#endif
    821     m_pCheckbox2DVideo->hide();
    822     m_pPlaceholder2DVideo->hide();
    823760
    824761    /* Polish 'Remote Display' availability: */
     
    887824}
    888825#endif /* VBOX_WITH_3D_ACCELERATION */
    889 
    890 #ifdef VBOX_WITH_VIDEOHWACCEL
    891 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 */
    900826
    901827void UIMachineSettingsDisplay::sltHandleRecordingCheckboxToggle()
     
    12481174            this, &UIMachineSettingsDisplay::sltHandle3DAccelerationCheckboxChange);
    12491175#endif
    1250 #ifdef VBOX_WITH_VIDEOHWACCEL
    1251     connect(m_pCheckbox2DVideo, &QCheckBox::stateChanged,
    1252             this, &UIMachineSettingsDisplay::sltHandle2DVideoAccelerationCheckboxChange);
    1253 #endif
    12541176
    12551177    /* Configure 'Remote Display' connections: */
     
    14211343            {
    14221344                comGraphics.SetAccelerate3DEnabled(newDisplayData.m_f3dAccelerationEnabled);
    1423                 fSuccess = comGraphics.isOk();
    1424             }
    1425 #endif
    1426 #ifdef VBOX_WITH_VIDEOHWACCEL
    1427             /* Save whether 2D video acceleration is enabled: */
    1428             if (fSuccess && isMachineOffline() && newDisplayData.m_f2dVideoAccelerationEnabled != oldDisplayData.m_f2dVideoAccelerationEnabled)
    1429             {
    1430                 comGraphics.SetAccelerate2DVideoEnabled(newDisplayData.m_f2dVideoAccelerationEnabled);
    14311345                fSuccess = comGraphics.isOk();
    14321346            }
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.h

    r82968 r84790  
    5454    bool isAcceleration3DSelected() const;
    5555#endif
    56 #ifdef VBOX_WITH_VIDEOHWACCEL
    57     /** Returns whether 2D Video Acceleration is enabled. */
    58     bool isAcceleration2DVideoSelected() const;
    59 #endif
    6056
    6157    /** Returns recommended graphics controller type. */
     
    106102    /** Handles 3D Acceleration check-box change. */
    107103    void sltHandle3DAccelerationCheckboxChange();
    108 #endif
    109 #ifdef VBOX_WITH_VIDEOHWACCEL
    110     /** Handles 2D Video Acceleration check-box change. */
    111     void sltHandle2DVideoAccelerationCheckboxChange();
    112104#endif
    113105
     
    177169    bool          m_fWddmModeSupported;
    178170#endif
    179 #ifdef VBOX_WITH_VIDEOHWACCEL
    180     /** Holds whether the guest OS supports 2D Video Acceleration. */
    181     bool          m_f2DVideoAccelerationSupported;
    182 #endif
    183171    /** Holds recommended graphics controller type. */
    184172    KGraphicsControllerType  m_enmGraphicsControllerTypeRecommended;
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.ui

    r82974 r84790  
    178178            <item>
    179179             <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 &amp;2D Video Acceleration</string>
    198               </property>
    199              </widget>
    200             </item>
    201             <item>
    202              <widget class="QWidget" name="m_pPlaceholder2DVideo"/>
    203180            </item>
    204181           </layout>
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.cpp

    r83902 r84790  
    141141           : false;
    142142}
    143 
    144 #ifdef VBOX_WITH_VIDEOHWACCEL
    145 bool UIMachineSettingsGeneral::isWindowsOSTypeSelected() const
    146 {
    147     AssertPtrReturn(m_pNameAndSystemEditor, false);
    148     return m_pNameAndSystemEditor->familyId() == "Windows";
    149 }
    150 #endif /* VBOX_WITH_VIDEOHWACCEL */
    151143
    152144void UIMachineSettingsGeneral::setHWVirtExEnabled(bool fEnabled)
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.h

    r82968 r84790  
    4848    /** Returns whether 64bit OS type ID is selected. */
    4949    bool is64BitOSTypeSelected() const;
    50 #ifdef VBOX_WITH_VIDEOHWACCEL
    51     /** Returns whether Windows OS type ID is selected. */
    52     bool isWindowsOSTypeSelected() const;
    53 #endif /* VBOX_WITH_VIDEOHWACCEL */
    5450
    5551    /** Defines whether HW virtualization extension is enabled. */
  • trunk/src/VBox/Frontends/VirtualBox/src/snapshots/UISnapshotDetailsWidget.cpp

    r82968 r84790  
    17181718    /* Prepare report: */
    17191719    QStringList aReport;
    1720 #ifdef VBOX_WITH_VIDEOHWACCEL
    1721     /* 2D Video Acceleration? */
    1722     if (comGraphics.GetAccelerate2DVideoEnabled())
    1723         aReport << QApplication::translate("UIDetails", "2D Video", "details (display)");
    1724 #endif
    17251720    /* 3D Acceleration? */
    17261721    if (comGraphics.GetAccelerate3DEnabled() && uiCommon().is3DAvailable())
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIVideoMemoryEditor.cpp

    r82968 r84790  
    2727#include "UICommon.h"
    2828#include "UIVideoMemoryEditor.h"
    29 #include "VBox2DHelpers.h"
    3029
    3130/* COM includes: */
     
    4342    , m_f3DAccelerationEnabled(false)
    4443#endif
    45 #ifdef VBOX_WITH_VIDEOHWACCEL
    46     , m_f2DVideoAccelerationSupported(false)
    47     , m_f2DVideoAccelerationEnabled(false)
    48 #endif
    4944    , m_iMinVRAM(0)
    5045    , m_iMaxVRAM(0)
     
    140135}
    141136#endif /* VBOX_WITH_3D_ACCELERATION */
    142 
    143 #ifdef VBOX_WITH_VIDEOHWACCEL
    144 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 */
    170137
    171138void UIVideoMemoryEditor::retranslateUi()
     
    333300#endif
    334301
    335 #ifdef VBOX_WITH_VIDEOHWACCEL
    336     if (m_f2DVideoAccelerationEnabled && m_f2DVideoAccelerationSupported)
    337     {
    338         uNeedMBytes += VBox2DHelpers::required2DOffscreenVideoMemory() / _1M;
    339     }
    340 #endif
    341 
    342302    if (m_pSpinBox)
    343303        m_pSpinBox->setMaximum(m_iMaxVRAMVisible);
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIVideoMemoryEditor.h

    r82968 r84790  
    7575#endif
    7676
    77 #ifdef VBOX_WITH_VIDEOHWACCEL
    78     /** 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 #endif
    83 
    8477protected:
    8578
     
    123116    bool                     m_f3DAccelerationEnabled;
    124117#endif
    125 #ifdef VBOX_WITH_VIDEOHWACCEL
    126     /** Holds whether 2D video acceleration is supported. */
    127     bool                     m_f2DVideoAccelerationSupported;
    128     /** Holds whether 2D video acceleration is enabled. */
    129     bool                     m_f2DVideoAccelerationEnabled;
    130 #endif
    131118
    132119    /** Holds the minimum lower limit of VRAM (MiB). */
  • trunk/src/VBox/Main/src-helper-apps/OpenGLTest/Makefile.kmk

    r84540 r84790  
    2929endif
    3030VBoxOGLTest_SOURCES.darwin = OpenGLTestDarwin.cpp
     31
     32#
     33# App for testing GL support
     34#
     35if defined(VBOX_WITH_VIDEOHWACCEL)
     36 if1of ($(KBUILD_TARGET), win linux freebsd)
     37  LIBRARIES += VBoxOGL2D
     38  VBoxOGL2D_TEMPLATE = $(if $(VBOX_WITH_VIDEOHWACCEL),$(if $(VBOX_WITH_HARDENING),VBOXQTGUI,VBOXQTGUIEXE),VBOXMAINEXE)
     39  VBoxOGL2D_DEFS = QT_NO_DEBUG QT_THREAD_SUPPORT QT_SHARED HAVE_CONFIG_H VBOX_WITH_VIDEOHWACCEL VBOX_GUI_USE_QGL
     40  VBoxOGL2D_QT_MODULES += OpenGL
     41  VBoxOGL2D_SOURCES = VBoxGLSupportInfo.cpp
     42 endif
     43endif
    3144
    3245#
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette