Changeset 42028 in vbox for trunk/src/VBox/GuestHost/OpenGL/include
- Timestamp:
- Jul 5, 2012 3:22:55 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/include/cr_pack.h
r41109 r42028 80 80 }; 81 81 82 #if !defined(IN_RING0) 83 # define CR_PACKER_CONTEXT_ARGSINGLEDECL 84 # define CR_PACKER_CONTEXT_ARGDECL 85 # define CR_PACKER_CONTEXT_ARG 86 # define CR_PACKER_CONTEXT_ARGCTX(C) 87 # ifdef CHROMIUM_THREADSAFE 88 extern CRtsd _PackerTSD; 89 # define CR_GET_PACKER_CONTEXT(C) CRPackContext *C = (CRPackContext *) crGetTSD(&_PackerTSD) 90 # define CR_LOCK_PACKER_CONTEXT(PC) crLockMutex(&((PC)->mutex)) 91 # define CR_UNLOCK_PACKER_CONTEXT(PC) crUnlockMutex(&((PC)->mutex)) 92 # else 93 extern DLLDATA(CRPackContext) cr_packer_globals; 94 # define CR_GET_PACKER_CONTEXT(C) CRPackContext *C = &cr_packer_globals 95 # define CR_LOCK_PACKER_CONTEXT(PC) 96 # define CR_UNLOCK_PACKER_CONTEXT(PC) 97 # endif 98 #else /* if defined IN_RING0 */ 99 # define CR_PACKER_CONTEXT_ARGSINGLEDECL CRPackContext *_pCtx 100 # define CR_PACKER_CONTEXT_ARGDECL CR_PACKER_CONTEXT_ARGSINGLEDECL, 101 # define CR_PACKER_CONTEXT_ARG _pCtx, 102 # define CR_PACKER_CONTEXT_ARGCTX(C) C, 103 # define CR_GET_PACKER_CONTEXT(C) CRPackContext *C = _pCtx 104 # define CR_LOCK_PACKER_CONTEXT(PC) 105 # define CR_UNLOCK_PACKER_CONTEXT(PC) 106 #endif 82 107 83 108 extern DECLEXPORT(CRPackContext *) crPackNewContext(int swapping); … … 106 131 GLfloat *xmax, GLfloat *ymax, GLfloat *zmax); 107 132 108 extern DECLEXPORT(void) crPackAppendBuffer( const CRPackBuffer *buffer );109 extern DECLEXPORT(void) crPackAppendBoundedBuffer( const CRPackBuffer *buffer, const CRrecti *bounds );110 extern DECLEXPORT(int) crPackCanHoldBuffer( const CRPackBuffer *buffer );111 extern DECLEXPORT(int) crPackCanHoldBoundedBuffer( const CRPackBuffer *buffer );133 extern DECLEXPORT(void) crPackAppendBuffer( CR_PACKER_CONTEXT_ARGDECL const CRPackBuffer *buffer ); 134 extern DECLEXPORT(void) crPackAppendBoundedBuffer( CR_PACKER_CONTEXT_ARGDECL const CRPackBuffer *buffer, const CRrecti *bounds ); 135 extern DECLEXPORT(int) crPackCanHoldBuffer( CR_PACKER_CONTEXT_ARGDECL const CRPackBuffer *buffer ); 136 extern DECLEXPORT(int) crPackCanHoldBoundedBuffer( CR_PACKER_CONTEXT_ARGDECL const CRPackBuffer *buffer ); 112 137 113 138 #if defined(LINUX) || defined(WINDOWS) … … 119 144 extern DECLEXPORT(void) crWriteSwappedDouble( void *buffer, double d ); 120 145 121 extern DECLEXPORT(void) *crPackAlloc( unsigned int len );122 extern DECLEXPORT(void) crHugePacket( CR Opcode op, void *ptr );123 extern DECLEXPORT(void) crPackFree( void *ptr );146 extern DECLEXPORT(void) *crPackAlloc( CR_PACKER_CONTEXT_ARGDECL unsigned int len ); 147 extern DECLEXPORT(void) crHugePacket( CR_PACKER_CONTEXT_ARGDECL CROpcode op, void *ptr ); 148 extern DECLEXPORT(void) crPackFree( CR_PACKER_CONTEXT_ARGDECL void *ptr ); 124 149 extern DECLEXPORT(void) crNetworkPointerWrite( CRNetworkPointer *, void * ); 125 150 … … 144 169 extern DECLEXPORT(void) crPackExpandMultiDrawElementsEXT( GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount, CRClientState *c ); 145 170 extern DECLEXPORT(void) crPackExpandMultiDrawElementsEXTSWAP( GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount, CRClientState *c ); 146 147 148 #ifdef CHROMIUM_THREADSAFE149 extern CRtsd _PackerTSD;150 #define CR_GET_PACKER_CONTEXT(C) CRPackContext *C = (CRPackContext *) crGetTSD(&_PackerTSD)151 #define CR_LOCK_PACKER_CONTEXT(PC) crLockMutex(&((PC)->mutex))152 #define CR_UNLOCK_PACKER_CONTEXT(PC) crUnlockMutex(&((PC)->mutex))153 #elif !defined IN_RING0154 extern DLLDATA(CRPackContext) cr_packer_globals;155 #define CR_GET_PACKER_CONTEXT(C) CRPackContext *C = &cr_packer_globals156 #define CR_LOCK_PACKER_CONTEXT(PC)157 #define CR_UNLOCK_PACKER_CONTEXT(PC)158 #endif159 171 160 172
Note:
See TracChangeset
for help on using the changeset viewer.