VirtualBox

Changeset 12449 in vbox for trunk


Ignore:
Timestamp:
Sep 15, 2008 8:16:14 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
36526
Message:

+changed IFramebuffer interface to report id of associated window if there's one
+changed sdl/qt3/qt4 frontends's interface implementations to report this id
+added VBoxSharedCrOpenGL hgcm service
(VBoxManage.exe setextradata lvm_winxp_sp2 VBoxInternal/Devices/VMMDev/0/LUN#0/Config/crOpenGLEnabled 1)
+changed crserver to be launched from vmmdev by guest request
+added hgcm call to supply desired window id to render spu
+changed guest icd driver to initialize hgcm and cause tcpip listener startup on host
+fixed spu finalization
+fixed q3 startup, again :)

Location:
trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/log.h

    r11502 r12449  
    268268    /** SELM group. */
    269269    LOG_GROUP_SELM,
     270    /** Chromium OpenGL host service group. */
     271    LOG_GROUP_SHARED_CROPENGL,
    270272    /** Shared folders host service group. */
    271273    LOG_GROUP_SHARED_FOLDERS,
     
    431433    "REM_RUN",      \
    432434    "SELM",         \
     435    "SHARED_CROPENGL",\
    433436    "SHARED_FOLDERS",\
    434437    "SHARED_OPENGL",\
  • trunk/src/VBox/Additions/WINNT/Graphics/OpenGL/VBoxOGL.cpp

    r11642 r12449  
    4343    Assert(ret);
    4444}
    45 
    4645
    4746/**
  • trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.cpp

    r11419 r12449  
    379379
    380380/**
     381 * Returns handle of window where framebuffer context is being drawn
     382 *
     383 * @returns COM status code.
     384 * @param   winId Handle of associated window.
     385 */
     386STDMETHODIMP VBoxSDLFB::COMGETTER(WinId)(uint64_t *winId)
     387{
     388    if (!winId)
     389        return E_POINTER;
     390    *winId = mWinId;
     391    return S_OK;
     392}
     393
     394/**
    381395 * Notify framebuffer of an update.
    382396 *
     
    14031417
    14041418/**
     1419 * Returns associated window handle. We return NULL here.
     1420 *
     1421 * @returns COM status code
     1422 * @param   winId Address of result buffer.
     1423 */
     1424STDMETHODIMP VBoxSDLFBOverlay::COMGETTER(WinId)(ULONG64 *winId)
     1425{
     1426    LogFlow(("VBoxSDLFBOverlay::GetWinId\n"));
     1427    if (!winId)
     1428        return E_INVALIDARG;
     1429    *winId = 0;
     1430    return S_OK;
     1431}
     1432
     1433
     1434/**
    14051435 * Lock the overlay.  This should not be used - lock the parent IFramebuffer instead.
    14061436 *
  • trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.h

    r11400 r12449  
    9999    STDMETHOD(COMGETTER(HeightReduction)) (ULONG *heightReduction);
    100100    STDMETHOD(COMGETTER(Overlay)) (IFramebufferOverlay **aOverlay);
     101    STDMETHOD(COMGETTER(WinId)) (uint64_t *winId);
    101102
    102103    STDMETHOD(NotifyUpdate)(ULONG x, ULONG y,
     
    135136#endif
    136137    void uninit();
     138    void setWinId(uint64_t winId) { mWinId = winId; }
    137139
    138140private:
     
    176178    /** flag whether we print out SDL information */
    177179    bool mfShowSDLConfig;
     180    /** handle to window where framebuffer context is being drawn*/
     181    uint64_t mWinId;
    178182#ifdef VBOX_SECURELABEL
    179183    /** current secure label text */
     
    263267    STDMETHOD(COMGETTER(HeightReduction)) (ULONG *heightReduction);
    264268    STDMETHOD(COMGETTER(Overlay)) (IFramebufferOverlay **aOverlay);
     269    STDMETHOD(COMGETTER(WinId)) (ULONG64 *winId);
    265270
    266271    STDMETHOD(Lock)();
  • trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp

    r12320 r12449  
    10571057#endif
    10581058#ifdef VBOX_WIN32_UI
    1059     bool fWin32UI = false;
     1059    bool fWin32UI = true;
     1060    uint64_t winId = 0;
    10601061#endif
    10611062    bool fShowSDLConfig    = false;
     
    19201921    {
    19211922        /* initialize the Win32 user interface inside which SDL will be embedded */
    1922         if (initUI(fResizable))
     1923        if (initUI(fResizable, winId))
    19231924            return 1;
    19241925    }
     
    19341935        goto leave;
    19351936    }
     1937
     1938#ifdef VBOX_WIN32_UI
     1939    gpFrameBuffer->setWinId(winId);
     1940#endif
     1941
    19361942    if (!gpFrameBuffer->initialized())
    19371943        goto leave;
  • trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.h

    r11576 r12449  
    6666
    6767#ifdef VBOX_WIN32_UI
    68 int initUI(bool fResizable);
     68int initUI(bool fResizable, uint64_t &winId);
    6969int uninitUI(void);
    7070int resizeUI(uint16_t width, uint16_t height);
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxFrameBuffer.h

    r8155 r12449  
    205205    STDMETHOD(COMGETTER(HeightReduction)) (ULONG *aHeightReduction);
    206206    STDMETHOD(COMGETTER(Overlay)) (IFramebufferOverlay **aOverlay);
     207    STDMETHOD(COMGETTER(WinId)) (ULONG64 *winId);
    207208
    208209    STDMETHOD(Lock)();
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxFrameBuffer.cpp

    r8902 r12449  
    134134    /* not yet implemented */
    135135    *aOverlay = 0;
     136    return S_OK;
     137}
     138
     139STDMETHODIMP VBoxFrameBuffer::COMGETTER(WinId) (ULONG64 *winId)
     140{
     141    if (!winId)
     142        return E_POINTER;
     143    *winId = (mView && mView->viewport()) ? (ULONG64) mView->viewport()->winId() : 0;   
    136144    return S_OK;
    137145}
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxFrameBuffer.h

    r8155 r12449  
    205205    STDMETHOD(COMGETTER(HeightReduction)) (ULONG *aHeightReduction);
    206206    STDMETHOD(COMGETTER(Overlay)) (IFramebufferOverlay **aOverlay);
     207    STDMETHOD(COMGETTER(WinId)) (ULONG64 *winId);
    207208
    208209    STDMETHOD(Lock)();
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxFrameBuffer.cpp

    r11418 r12449  
    135135    /* not yet implemented */
    136136    *aOverlay = 0;
     137    return S_OK;
     138}
     139
     140STDMETHODIMP VBoxFrameBuffer::COMGETTER(WinId) (ULONG64 *winId)
     141{
     142    if (!winId)
     143        return E_POINTER;
     144    *winId = (mView && mView->viewport()) ? (ULONG64) mView->viewport()->winId() : 0;   
    137145    return S_OK;
    138146}
  • trunk/src/VBox/Main/FramebufferImpl.cpp

    r8155 r12449  
    131131}
    132132
     133STDMETHODIMP InternalFramebuffer::COMGETTER(WinId) (ULONG64 *winId)
     134{
     135    if (!winId)
     136        return E_POINTER;
     137    *winId = 0;
     138    return S_OK;
     139}
    133140
    134141// IFramebuffer methods
  • trunk/src/VBox/Main/VMMDevInterface.cpp

    r11844 r12449  
    3636#include "hgcm/HGCM.h"
    3737#include "hgcm/HGCMObjects.h"
     38#include <VBox/HostServices/VBoxCrOpenGLSvc.h>
    3839#endif
    3940
     
    695696     * Validate configuration.
    696697     */
    697     if (!CFGMR3AreValuesValid(pCfgHandle, "Object\0OpenGLEnabled\0"))
     698    if (!CFGMR3AreValuesValid(pCfgHandle, "Object\0OpenGLEnabled\0crOpenGLEnabled\0"))
    698699        return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES;
    699700    PPDMIBASE pBaseIgnore;
     
    814815        {
    815816            LogRel(("Failed to load Shared OpenGL service %Vrc\n", rc));
     817        }
     818    }
     819
     820    rc = CFGMR3QueryBool(pCfgHandle, "crOpenGLEnabled", &fEnabled);
     821    if ( VBOX_SUCCESS(rc) &&  fEnabled)
     822    {
     823        rc = pData->pVMMDev->hgcmLoadService ("VBoxSharedCrOpenGL", "VBoxSharedCrOpenGL");
     824        if (VBOX_SUCCESS(rc))
     825        {
     826            LogRel(("Shared Chromium OpenGL service loaded.\n"));
     827
     828            /* Setup the service. */
     829            VBOXHGCMSVCPARM parm;
     830            parm.type = VBOX_HGCM_SVC_PARM_PTR;
     831
     832            //parm.u.pointer.addr = static_cast <IConsole *> (pData->pVMMDev->getParent());
     833                        parm.u.pointer.addr = pData->pVMMDev->getParent()->getDisplay()->getFramebuffer();
     834            parm.u.pointer.size = sizeof(IFramebuffer *);
     835       
     836            rc = HGCMHostCall("VBoxSharedCrOpenGL", VBOX_SHARED_CROPENGL_HOST_FN_SET_FRAMEBUFFER, 1, &parm);
     837            if (!VBOX_SUCCESS(rc))
     838                AssertMsgFailed(("VBOX_SHARED_CROPENGL_HOST_FN_SET_FRAMEBUFFER failed with %Vrc\n", rc));
     839        }
     840        else
     841        {
     842            LogRel(("Failed to load Shared Chromium OpenGL service %Vrc\n", rc));
    816843        }
    817844    }
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r12284 r12449  
    80018001    </attribute>
    80028002
     8003    <attribute name="winId" type="unsigned long long" readonly="yes">
     8004      <desc>
     8005        Platform-dependent identifier of the window where context of this
     8006        framebuffer is drawn, or zero if there's no such window.
     8007      </desc>
     8008    </attribute>
     8009
    80038010    <method name="lock">
    80048011      <desc>
  • trunk/src/VBox/Main/include/FramebufferImpl.h

    r8155 r12449  
    5757    STDMETHOD(COMGETTER(HeightReduction)) (ULONG *heightReduction);
    5858    STDMETHOD(COMGETTER(Overlay)) (IFramebufferOverlay **aOverlay);
     59    STDMETHOD(COMGETTER(WinId)) (ULONG64 *winId);
    5960
    6061    // IFramebuffer methods
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