VirtualBox

Ignore:
Timestamp:
Jun 19, 2014 3:12:30 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
94439
Message:

Main,Frontends: use safearray for IFramebuffer::Notify3DEvent

Location:
trunk/src/VBox/HostServices/SharedOpenGL
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/crserver/crservice.cpp

    r51524 r51670  
    3232#include <VBox/hgcmsvc.h>
    3333#include <VBox/log.h>
     34#include <VBox/com/array.h>
    3435#include <VBox/com/ErrorInfo.h>
    3536#include <VBox/com/VirtualBox.h>
     
    227228}
    228229
    229 static DECLCALLBACK(void) svcNotifyEventCB(int32_t screenId, uint32_t uEvent, void*pvData)
     230static DECLCALLBACK(void) svcNotifyEventCB(int32_t screenId, uint32_t uEvent, void* pvData, uint32_t cbData)
    230231{
    231232    ComPtr<IDisplay> pDisplay;
     
    245246        return;
    246247
    247     pFramebuffer->Notify3DEvent(uEvent, (BYTE*)pvData);
     248    com::SafeArray<BYTE> data(cbData);
     249    if (cbData)
     250        memcpy(data.raw(), pvData, cbData);
     251
     252    pFramebuffer->Notify3DEvent(uEvent, ComSafeArrayAsInParam(data));
    248253}
    249254
     
    12311236                    do {
    12321237                        /* determine if the framebuffer is functional */
    1233                         rc = pFramebuffer->Notify3DEvent(VBOX3D_NOTIFY_EVENT_TYPE_TEST_FUNCTIONAL, NULL);
     1238                        com::SafeArray<BYTE> data;
     1239                        rc = pFramebuffer->Notify3DEvent(VBOX3D_NOTIFY_EVENT_TYPE_TEST_FUNCTIONAL, ComSafeArrayAsInParam(data));
    12341240
    12351241                        if (rc == S_OK)
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server.h

    r51655 r51670  
    141141void crVBoxServerMuralFbResizeEnd(HCR_FRAMEBUFFER hFb);
    142142
    143 void crVBoxServerNotifyEvent(int32_t idScreen, uint32_t uEvent, void*pvData);
     143void crVBoxServerNotifyEvent(int32_t idScreen, uint32_t uEvent, void* pvData, uint32_t cbData);
    144144
    145145void crServerRedirMuralFbClear(CRMuralInfo *mural);
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_main.c

    r51524 r51670  
    27842784}
    27852785
    2786 void crVBoxServerNotifyEvent(int32_t idScreen, uint32_t uEvent, void*pvData)
     2786void crVBoxServerNotifyEvent(int32_t idScreen, uint32_t uEvent, void* pvData, uint32_t cbData)
    27872787{
    27882788    /* this is something unexpected, but just in case */
     
    27932793    }
    27942794
    2795     cr_server.pfnNotifyEventCB(idScreen, uEvent, pvData);
     2795    cr_server.pfnNotifyEventCB(idScreen, uEvent, pvData, cbData);
    27962796}
    27972797
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_presenter.cpp

    r51536 r51670  
    29002900        if (mFlags.fNeVisible != fVisible || mFlags.fNeForce)
    29012901        {
    2902             crVBoxServerNotifyEvent(mu32Screen, VBOX3D_NOTIFY_EVENT_TYPE_VISIBLE_3DDATA, fVisible ? (void*)1 : NULL);
     2902            crVBoxServerNotifyEvent(mu32Screen, VBOX3D_NOTIFY_EVENT_TYPE_VISIBLE_3DDATA, &fVisible, sizeof(fVisible));
    29032903            mFlags.fNeVisible = fVisible;
    29042904            mFlags.fNeForce = 0;
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