VirtualBox

Changeset 84792 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Jun 11, 2020 1:12:17 PM (5 years ago)
Author:
vboxsync
Message:

FE/Qt: Get rid of 3D testing code in the GUI.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp

    r84791 r84792  
    310310    , m_fWrappersValid(false)
    311311    , m_fVBoxSVCAvailable(true)
    312     , m_i3DAvailable(-1)
    313312    , m_pThreadPool(0)
    314313    , m_pThreadPoolCloud(0)
     
    37323731}
    37333732
    3734 bool UICommon::is3DAvailableWorker() const
    3735 {
    3736     /* Rational is that when starting a text mode guest (like DOS) that does not
    3737      * have 3D enabled, don't wast the developer's or user's time on launching the
    3738      * test application when starting the VM or editing it's settings.
    3739      *
    3740      * Keep in mind that if we ever end up checking this concurrently on multiple threads,
    3741      * use a RTONCE construct to serialize the efforts. */
    3742 
    3743 #ifdef VBOX_WITH_3D_ACCELERATION
    3744     bool fSupported = true;
    3745 #else
    3746     bool fSupported = false;
    3747 #endif
    3748     m_i3DAvailable = fSupported;
    3749     return fSupported;
    3750 }
    3751 
    3752 bool UICommon::is3DAvailable() const
    3753 {
    3754     if (m_i3DAvailable < 0)
    3755         return is3DAvailableWorker();
    3756     return m_i3DAvailable != 0;
    3757 }
    3758 
    37593733#ifdef VBOX_WITH_3D_ACCELERATION
    37603734/* static */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.h

    r84741 r84792  
    634634    /** @name Display stuff.
    635635     * @{ */
    636         /** Inner worker for lazily querying for 3D support. */
    637         bool is3DAvailableWorker() const;
    638         /** Returns whether 3D is available, runs worker above if necessary. */
    639         bool is3DAvailable() const;
    640 
    641636#ifdef VBOX_WITH_3D_ACCELERATION
    642637        /** Returns whether guest OS type with passed @a strGuestOSTypeId is WDDM compatible. */
     
    925920    /** @} */
    926921
    927     /** @name Display stuff.
    928      * @{ */
    929         /** Holds whether 3D is available. */
    930         mutable int  m_i3DAvailable;
    931     /** @} */
    932 
    933922    /** @name Thread stuff.
    934923     * @{ */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp

    r82968 r84792  
    762762
    763763        /* 3D acceleration: */
    764         const bool fAcceleration3D = comGraphics.GetAccelerate3DEnabled() && uiCommon().is3DAvailable();
     764        const bool fAcceleration3D = comGraphics.GetAccelerate3DEnabled();
    765765        if (fAcceleration3D)
    766766        {
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp

    r84790 r84792  
    218218
    219219    /* Propagate the scale-factor related attributes to 3D service if necessary: */
    220     if (machine().GetGraphicsAdapter().GetAccelerate3DEnabled() && uiCommon().is3DAvailable())
     220    if (machine().GetGraphicsAdapter().GetAccelerate3DEnabled())
    221221    {
    222222        double dScaleFactorFor3D = dScaleFactor;
     
    494494
    495495    /* Propagate the scale-factor related attributes to 3D service if necessary: */
    496     if (machine().GetGraphicsAdapter().GetAccelerate3DEnabled() && uiCommon().is3DAvailable())
     496    if (machine().GetGraphicsAdapter().GetAccelerate3DEnabled())
    497497    {
    498498        double dScaleFactorFor3D = dScaleFactor;
     
    714714
    715715        /* Propagate the scale-factor related attributes to 3D service if necessary: */
    716         if (machine().GetGraphicsAdapter().GetAccelerate3DEnabled() && uiCommon().is3DAvailable())
     716        if (machine().GetGraphicsAdapter().GetAccelerate3DEnabled())
    717717        {
    718718            double dScaleFactorFor3D = dScaleFactor;
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.cpp

    r84790 r84792  
    6262    {
    6363        /* Propagate scale-factor to 3D service if necessary: */
    64         if (machine().GetGraphicsAdapter().GetAccelerate3DEnabled() && uiCommon().is3DAvailable())
     64        if (machine().GetGraphicsAdapter().GetAccelerate3DEnabled())
    6565        {
    6666            double xScaleFactor = (double)scaledSize.width()  / frameBuffer()->width();
     
    121121    {
    122122        /* Propagate scale-factor to 3D service if necessary: */
    123         if (machine().GetGraphicsAdapter().GetAccelerate3DEnabled() && uiCommon().is3DAvailable())
     123        if (machine().GetGraphicsAdapter().GetAccelerate3DEnabled())
    124124        {
    125125            double xScaleFactor = (double)scaledSize.width()  / frameBuffer()->width();
     
    144144    frameBuffer()->setUseUnscaledHiDPIOutput(fUseUnscaledHiDPIOutput);
    145145    /* Propagate unscaled-hidpi-output feature to 3D service if necessary: */
    146     if (machine().GetGraphicsAdapter().GetAccelerate3DEnabled() && uiCommon().is3DAvailable())
     146    if (machine().GetGraphicsAdapter().GetAccelerate3DEnabled())
    147147        display().NotifyHiDPIOutputPolicyChange(fUseUnscaledHiDPIOutput);
    148148
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp

    r84790 r84792  
    594594#endif /* VBOX_WITH_3D_ACCELERATION */
    595595        }
    596 
    597 #ifdef VBOX_WITH_3D_ACCELERATION
    598         /* 3D acceleration test: */
    599         if (m_pCheckbox3D->isChecked() && !uiCommon().is3DAvailable())
    600         {
    601             message.second << tr("The virtual machine is set up to use hardware graphics acceleration. "
    602                                  "However the host system does not currently provide this, "
    603                                  "so you will not be able to start the machine.");
    604         }
    605 #endif /* VBOX_WITH_3D_ACCELERATION */
    606596
    607597        /* Graphics controller type test: */
  • trunk/src/VBox/Frontends/VirtualBox/src/snapshots/UISnapshotDetailsWidget.cpp

    r84790 r84792  
    17191719    QStringList aReport;
    17201720    /* 3D Acceleration? */
    1721     if (comGraphics.GetAccelerate3DEnabled() && uiCommon().is3DAvailable())
     1721    if (comGraphics.GetAccelerate3DEnabled())
    17221722        aReport << QApplication::translate("UIDetails", "3D", "details (display)");
    17231723    /* Compose and return report: */
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