VirtualBox

Changeset 16640 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Feb 10, 2009 3:37:23 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
42620
Message:

crOpenGL: use shared memory to access xserver pixmaps data

Location:
trunk/src/VBox/Additions/WINNT/Graphics/crOpenGL
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/crOpenGL/context.c

    r16480 r16640  
    275275#endif
    276276
     277#ifdef GLX
     278    context->pGLXPixmapsHash = crAllocHashtable();
     279#endif
     280
    277281    crHashtableAdd(stub.contextTable, context->id, (void *) context);
    278282
     
    10021006    }
    10031007
     1008#ifdef GLX
     1009    crFreeHashtable(context->pGLXPixmapsHash, crFree);
     1010#endif
     1011
    10041012    crMemZero(context, sizeof(ContextInfo));  /* just to be safe */
    10051013    crHashtableDelete(stub.contextTable, contextId, crFree);
  • trunk/src/VBox/Additions/WINNT/Graphics/crOpenGL/load.c

    r16480 r16640  
    207207
    208208    crNetTearDown();
     209
     210#ifdef GLX
     211    if (stub.xshmSI.shmid>=0)
     212    {
     213        shmctl(stub.xshmSI.shmid, IPC_RMID, 0);
     214        shmdt(stub.xshmSI.shmaddr);
     215    }
     216#endif
    209217
    210218    crMemset(&stub, 0, sizeof(stub) );
     
    541549#endif
    542550
     551#ifdef GLX
     552    stub.xshmSI.shmid = -1;
     553    stub.bShmInitFailed = GL_FALSE;
     554#endif
     555
    543556    return true;
    544557}
  • trunk/src/VBox/Additions/WINNT/Graphics/crOpenGL/pack/packspu_config.c

    r15532 r16640  
    5454    pack_spu.swapbuffer_sync = 0;
    5555    pack_spu.name = crStrdup("vboxhgcm://llp:7000");
    56     pack_spu.buffer_size = 1024 * 1024;
     56    pack_spu.buffer_size = 5 * 1024 * 1024;
    5757}
  • trunk/src/VBox/Additions/WINNT/Graphics/crOpenGL/stub.h

    r16574 r16640  
    3939#include "cr_threads.h"
    4040#include "spu_dispatch_table.h"
     41
     42#ifdef GLX
     43#include <X11/extensions/XShm.h>
     44#include <sys/shm.h>
     45#endif
    4146
    4247
     
    6065typedef struct window_info_t WindowInfo;
    6166
     67#ifdef GLX
     68typedef struct glxpixmap_info_t GLX_Pixmap_t;
     69
     70struct glxpixmap_info_t
     71{
     72    int x, y;
     73    unsigned int w, h, border, depth;
     74    Window root;
     75    GC gc;
     76    Pixmap pixmap;
     77    void *data;
     78};
     79#endif
     80
    6281struct context_info_t
    6382{
     
    91110    Bool direct;
    92111    GLXContext glxContext;
     112    CRHashTable *pGLXPixmapsHash;
    93113#endif
    94114};
     
    175195    CRHashTable *windowTable;
    176196
     197#ifdef GLX
     198    /* Shared memory, used to transfer XServer pixmaps data into client memory */
     199    XShmSegmentInfo xshmSI;
     200    GLboolean       bShmInitFailed;
     201#endif
     202
    177203#ifdef WINDOWS
    178204    HHOOK       hMessageHook;
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