VirtualBox

Changeset 105959 in vbox for trunk/src/VBox/Main/src-all


Ignore:
Timestamp:
Sep 4, 2024 4:57:58 PM (8 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
164698
Message:

Main: (Hopefully) Made it more clear which graphics features are supported in which context (guests / hosts): For system properties we now expose features based on the current host platform, whereas in platform properties we expose features on a per-graphics adapter and VM platform combination. bugref:10749

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-all/PlatformPropertiesImpl.cpp

    r105873 r105959  
    830830 *
    831831 * @returns VBox status code.
     832 * @param   enmArchitecture              Platform architecture to query a feature for.
    832833 * @param   enmController                Graphics controller to return supported features for.
    833834 * @param   vecSupportedGraphicsFeatures Returned features on success.
    834835 */
    835836/* static */
    836 int PlatformProperties::s_getSupportedGraphicsControllerFeatures(GraphicsControllerType_T enmController,
     837int PlatformProperties::s_getSupportedGraphicsControllerFeatures(PlatformArchitecture_T enmArchitecture,
     838                                                                 GraphicsControllerType_T enmController,
    837839                                                                 std::vector<GraphicsFeature_T> &vecSupportedGraphicsFeatures)
    838840{
    839     switch (enmController)
    840     {
     841   switch (enmArchitecture)
     842    {
     843        case PlatformArchitecture_x86:
     844        {
     845            switch (enmController)
     846            {
    841847#ifdef VBOX_WITH_VMSVGA
    842         case GraphicsControllerType_VBoxSVGA:
    843         {
    844             static const GraphicsFeature_T s_aGraphicsFeatures[] =
    845             {
     848                case GraphicsControllerType_VBoxSVGA:
     849                {
     850                    static const GraphicsFeature_T s_aGraphicsFeatures[] =
     851                    {
    846852# ifdef VBOX_WITH_VIDEOHWACCEL
    847                 GraphicsFeature_Acceleration2DVideo,
     853                        GraphicsFeature_Acceleration2DVideo,
    848854# endif
    849855# ifdef VBOX_WITH_3D_ACCELERATION
    850                 GraphicsFeature_Acceleration3D
     856                        GraphicsFeature_Acceleration3D
    851857# endif
    852             };
    853             RT_CPP_VECTOR_ASSIGN_ARRAY(vecSupportedGraphicsFeatures, s_aGraphicsFeatures);
    854             break;
    855         }
     858                    };
     859                    RT_CPP_VECTOR_ASSIGN_ARRAY(vecSupportedGraphicsFeatures, s_aGraphicsFeatures);
     860                    break;
     861                }
    856862#endif
    857         case GraphicsControllerType_VBoxVGA:
    858             RT_FALL_THROUGH();
    859         case GraphicsControllerType_QemuRamFB:
    860         {
    861             static const GraphicsFeature_T s_aGraphicsFeatures[] =
    862             {
    863                 GraphicsFeature_None
    864             };
    865             RT_CPP_VECTOR_ASSIGN_ARRAY(vecSupportedGraphicsFeatures, s_aGraphicsFeatures);
    866             break;
    867         }
    868 
    869         default:
    870             return VERR_INVALID_PARAMETER;
     863                case GraphicsControllerType_VBoxVGA:
     864                    RT_FALL_THROUGH();
     865                case GraphicsControllerType_QemuRamFB:
     866                {
     867                    vecSupportedGraphicsFeatures.clear(); /* None supported. */
     868                    break;
     869                }
     870
     871                default:
     872                {
     873                    AssertFailedStmt(vecSupportedGraphicsFeatures.clear());
     874                    return VERR_INVALID_PARAMETER;
     875                }
     876            }
     877
     878            break;
     879        }
     880
     881        case PlatformArchitecture_ARM:
     882        {
     883            vecSupportedGraphicsFeatures.clear(); /* None supported. */
     884            break;
     885        }
     886
     887        default:
     888            break;
    871889    }
    872890
     
    878896 *
    879897 * @returns \c true if the given feature is supported, or \c false if not.
     898 * @param   enmArchitecture         Platform architecture to query a feature for.
    880899 * @param   enmController           Graphics controlller to query a feature for.
    881900 * @param   enmFeature              Feature to query.
    882901 */
    883902/* static */
    884 bool PlatformProperties::s_isGraphicsControllerFeatureSupported(GraphicsControllerType_T enmController, GraphicsFeature_T enmFeature)
     903bool PlatformProperties::s_isGraphicsControllerFeatureSupported(PlatformArchitecture_T enmArchitecture, GraphicsControllerType_T enmController, GraphicsFeature_T enmFeature)
    885904{
    886905    std::vector<GraphicsFeature_T> vecSupportedGraphicsFeatures;
    887     int vrc = PlatformProperties::s_getSupportedGraphicsControllerFeatures(enmController, vecSupportedGraphicsFeatures);
     906    int vrc = PlatformProperties::s_getSupportedGraphicsControllerFeatures(enmArchitecture, enmController, vecSupportedGraphicsFeatures);
    888907    if (RT_SUCCESS(vrc))
    889908        return std::find(vecSupportedGraphicsFeatures.begin(),
     
    9901009                                                           std::vector<GraphicsFeature_T> &aSupportedGraphicsFeatures)
    9911010{
    992     int vrc = PlatformProperties::s_getSupportedGraphicsControllerFeatures(aGraphicsControllerType, aSupportedGraphicsFeatures);
     1011    int vrc = PlatformProperties::s_getSupportedGraphicsControllerFeatures(mPlatformArchitecture,
     1012                                                                           aGraphicsControllerType, aSupportedGraphicsFeatures);
    9931013    if (RT_FAILURE(vrc))
    9941014        return setError(E_INVALIDARG, tr("The graphics controller type (%d) is invalid"), aGraphicsControllerType);
Note: See TracChangeset for help on using the changeset viewer.

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