VirtualBox

Changeset 22143 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Aug 10, 2009 7:12:18 PM (15 years ago)
Author:
vboxsync
Message:

video 2d accel: Main & ui settings

Location:
trunk/src/VBox/Main
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/MachineImpl.cpp

    r21961 r22143  
    193193    mVRAMSize = 8;
    194194    mAccelerate3DEnabled = false;
     195    mAccelerate2DVideoEnabled = false;
    195196    mMonitorCount = 1;
    196197    mHWVirtExEnabled = true;
     
    226227        mVRAMSize != that.mVRAMSize ||
    227228        mAccelerate3DEnabled != that.mAccelerate3DEnabled ||
     229        mAccelerate2DVideoEnabled != that.mAccelerate2DVideoEnabled ||
    228230        mMonitorCount != that.mMonitorCount ||
    229231        mHWVirtExEnabled != that.mHWVirtExEnabled ||
     
    11861188}
    11871189
     1190
     1191STDMETHODIMP Machine::COMGETTER(Accelerate2DVideoEnabled)(BOOL *enabled)
     1192{
     1193    if (!enabled)
     1194        return E_POINTER;
     1195
     1196    AutoCaller autoCaller(this);
     1197    CheckComRCReturnRC(autoCaller.rc());
     1198
     1199    AutoReadLock alock(this);
     1200
     1201    *enabled = mHWData->mAccelerate2DVideoEnabled;
     1202
     1203    return S_OK;
     1204}
     1205
     1206STDMETHODIMP Machine::COMSETTER(Accelerate2DVideoEnabled)(BOOL enable)
     1207{
     1208    AutoCaller autoCaller(this);
     1209    CheckComRCReturnRC(autoCaller.rc());
     1210
     1211    AutoWriteLock alock(this);
     1212
     1213    HRESULT rc = checkStateDependency(MutableStateDep);
     1214    CheckComRCReturnRC(rc);
     1215
     1216    /** @todo check validity! */
     1217
     1218    mHWData.backup();
     1219    mHWData->mAccelerate2DVideoEnabled = enable;
     1220
     1221    return S_OK;
     1222}
    11881223
    11891224STDMETHODIMP Machine::COMGETTER(MonitorCount) (ULONG *monitorCount)
     
    52745309        mHWData->mMonitorCount  = displayNode.value <ULONG> ("monitorCount");
    52755310        mHWData->mAccelerate3DEnabled = displayNode.value <bool> ("accelerate3D");
     5311        mHWData->mAccelerate2DVideoEnabled = displayNode.value <bool> ("accelerate2DVideo");
    52765312    }
    52775313
     
    67266762        displayNode.setValue <ULONG> ("monitorCount", mHWData->mMonitorCount);
    67276763        displayNode.setValue <bool> ("accelerate3D", !!mHWData->mAccelerate3DEnabled);
     6764        displayNode.setValue <bool> ("accelerate2DVideo", !!mHWData->mAccelerate2DVideoEnabled);
    67286765    }
    67296766
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r21970 r22143  
    40104010  <interface
    40114011     name="IMachine" extends="$unknown"
    4012      uuid="540dcfda-3df2-49c6-88fa-033a28c2ff85"
     4012     uuid="5293aa45-5ab5-4f70-852e-bb43f5a46491"
    40134013     wsmap="managed"
    40144014     >
     
    42234223        of the 3D graphics support available on the host. Currently limited
    42244224        to OpenGL only. </desc>
     4225    </attribute>
     4226   
     4227    <attribute name="accelerate2DVideoEnabled" type="boolean" default="false">
     4228      <desc>
     4229        This setting determines whether VirtualBox allows guests to make use
     4230        of the 2D Video graphics support available on the host. </desc>
    42254231    </attribute>
    42264232
  • trunk/src/VBox/Main/include/MachineImpl.h

    r21961 r22143  
    271271        BOOL           mHWVirtExVPIDEnabled;
    272272        BOOL           mAccelerate3DEnabled;
     273        BOOL           mAccelerate2DVideoEnabled;
    273274        BOOL           mPAEEnabled;
    274275        ULONG          mCPUCount;
     
    504505    STDMETHOD(COMGETTER(Accelerate3DEnabled))(BOOL *enabled);
    505506    STDMETHOD(COMSETTER(Accelerate3DEnabled))(BOOL enabled);
     507    STDMETHOD(COMGETTER(Accelerate2DVideoEnabled))(BOOL *enabled);
     508    STDMETHOD(COMSETTER(Accelerate2DVideoEnabled))(BOOL enabled);
    506509    STDMETHOD(COMGETTER(BIOSSettings))(IBIOSSettings **biosSettings);
    507510    STDMETHOD(COMGETTER(HWVirtExEnabled))(BOOL *enabled);
  • trunk/src/VBox/Main/include/VirtualBoxXMLUtil.h

    r17669 r22143  
    2929
    3030/** VirtualBox XML settings version number substring ("x.y")  */
    31 #define VBOX_XML_VERSION        "1.7"
     31#define VBOX_XML_VERSION        "1.8"
    3232
    3333/** VirtualBox XML settings version platform substring */
  • trunk/src/VBox/Main/xml/SettingsConverter.xsl

    r21447 r22143  
    141141    <xsl:attribute name="version"><xsl:value-of select="concat('1.7','-',$curVerPlat)"/></xsl:attribute>
    142142    <xsl:apply-templates select="node()" mode="v1.7"/>
     143  </xsl:copy>
     144</xsl:template>
     145
     146<!-- 1.7 => 1.8 -->
     147<xsl:template match="/vb:VirtualBox[substring-before(@version,'-')='1.7']">
     148  <xsl:copy>
     149    <xsl:attribute name="version"><xsl:value-of select="concat('1.8','-',$curVerPlat)"/></xsl:attribute>
     150    <xsl:apply-templates select="node()" mode="v1.8"/>
    143151  </xsl:copy>
    144152</xsl:template>
     
    976984<!--
    977985 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     986 *  1.7 => 1.8
     987 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     988-->
     989<!--
     990 *  all non-root elements that are not explicitly matched are copied as is
     991-->
     992<xsl:template match="@*|node()[../..]" mode="v1.8">
     993  <xsl:copy>
     994    <xsl:apply-templates select="@*|node()[../..]" mode="v1.8"/>
     995  </xsl:copy>
     996</xsl:template>
     997
     998<!--
     999 *  Global settings
     1000-->
     1001
     1002<!--
     1003 *  Machine settings
     1004-->
     1005
     1006<!--xsl:template match="vb:VirtualBox[substring-before(@version,'-')='1.7']/
     1007                     vb:Machine//vb:Hardware/vb:Display"
     1008              mode="v1.8">
     1009  <xsl:copy>
     1010    <xsl:apply-templates select="node()" mode="v1.8"/>
     1011    <xsl:for-each select="@*">
     1012      <xsl:choose>
     1013        <xsl:when test="name()='Accelerate2DVideo'">
     1014          <xsl:attribute name="accelerate2DVideo"><xsl:value-of select="."/></xsl:attribute>
     1015        </xsl:when>
     1016        <xsl:otherwise>
     1017          <xsl:apply-templates select="." mode="v1.8"/>
     1018        </xsl:otherwise>
     1019      </xsl:choose>
     1020    </xsl:for-each>
     1021  </xsl:copy>
     1022</xsl:template-->
     1023
     1024<!--
     1025 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    9781026-->
    9791027
  • trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd

    r19726 r22143  
    500500  </xsd:attribute>
    501501  <xsd:attribute name="accelerate3D" type="xsd:boolean" default="false"/>
     502  <xsd:attribute name="accelerate2DVideo" type="xsd:boolean" default="false"/>
    502503</xsd:complexType>
    503504
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