Changeset 39507 in vbox for trunk/src/VBox/GuestHost/OpenGL/include
- Timestamp:
- Dec 2, 2011 7:44:16 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/include/cr_glstate.h
r37613 r39507 118 118 struct CRContext { 119 119 int id; 120 121 #ifdef CHROMIUM_THREADSAFE 122 /* we keep reference counting of context's makeCurrent for different threads 123 * this is primarily needed to avoid having an invalid memory reference in the TLS 124 * when the context is assigned to more than one threads and then destroyed from 125 * one of those, i.e. 126 * 1. Thread1 -> MakeCurrent(ctx1); 127 * 2. Thread2 -> MakeCurrent(ctx1); 128 * 3. Thread1 -> Destroy(ctx1); 129 * => Thread2 still refers to destroyed ctx1 130 * */ 131 /* number of threads that have context set as current */ 132 volatile int cRefs; 133 #endif 134 120 135 CRbitvalue bitid[CR_MAX_BITARRAY]; 121 136 CRbitvalue neg_bitid[CR_MAX_BITARRAY]; … … 181 196 DECLEXPORT(void) crStateInit(void); 182 197 DECLEXPORT(void) crStateDestroy(void); 198 DECLEXPORT(void) crStateOnThreadAttachDetach(GLboolean attach); 183 199 DECLEXPORT(CRContext *) crStateCreateContext(const CRLimitsState *limits, GLint visBits, CRContext *share); 184 200 DECLEXPORT(CRContext *) crStateCreateContextEx(const CRLimitsState *limits, GLint visBits, CRContext *share, GLint presetID);
Note:
See TracChangeset
for help on using the changeset viewer.