- Timestamp:
- Oct 9, 2013 12:16:19 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 89722
- Location:
- trunk/src/VBox
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/context.c
r48345 r48999 1806 1806 goto out; 1807 1807 } 1808 1809 #ifdef VBOX_WITH_WDDM 1810 pVBoxCtxChromiumParameteriCR(ctx, GL_HOST_WND_CREATED_HIDDEN_CR, GL_TRUE); 1811 #endif 1808 1812 1809 1813 #ifndef VBOX -
trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/directx.c
r48345 r48999 402 402 goto fail; 403 403 } 404 405 #ifdef VBOX_WITH_WDDM 406 pVBoxCtxChromiumParameteriCR(ctx->gl_ctx, GL_HOST_WND_CREATED_HIDDEN_CR, GL_TRUE); 407 #endif 404 408 405 409 /* Make it the current GL context. */ -
trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/wined3d_gl.h
r48345 r48999 192 192 193 193 HGLRC (WINAPI *pVBoxCreateContext)(HDC, struct VBOXUHGSMI*) DECLSPEC_HIDDEN; 194 void (WINAPI *pVBoxCtxChromiumParameteriCR)(HGLRC , GLenum , GLint) DECLSPEC_HIDDEN; 194 195 void (WINAPI *pVBoxFlushToHost)(HGLRC) DECLSPEC_HIDDEN; 195 196 GLint (WINAPI *pVBoxGetWindowId)(HDC) DECLSPEC_HIDDEN; … … 201 202 # define VBOX_GL_FUNCS_GEN \ 202 203 VBOX_USE_FUNC(VBoxCreateContext) \ 204 VBOX_USE_FUNC(VBoxCtxChromiumParameteriCR) \ 203 205 VBOX_USE_FUNC(VBoxFlushToHost) \ 204 206 VBOX_USE_FUNC(VBoxGetWindowId) \ -
trunk/src/VBox/Additions/common/crOpenGL/context.c
r47161 r48999 106 106 } 107 107 #endif 108 } 109 110 void stubConChromiumParameteriCR(GLint con, GLenum param, GLint value) 111 { 112 if (con) 113 stub.spu->dispatch_table.VBoxConChromiumParameteriCR(con, param, value); 114 else 115 crError("VBoxConChromiumParameteriCR called with null connection"); 108 116 } 109 117 … … 1099 1107 } 1100 1108 1109 GLboolean stubCtxCreate(ContextInfo *context) 1110 { 1111 /* 1112 * Create a Chromium context. 1113 */ 1114 #if defined(GLX) || defined(DARWIN) 1115 GLint spuShareCtx = context->share ? context->share->spuContext : 0; 1116 #else 1117 GLint spuShareCtx = 0; 1118 #endif 1119 GLint spuConnection = 0; 1120 CRASSERT(stub.spu); 1121 CRASSERT(stub.spu->dispatch_table.CreateContext); 1122 context->type = CHROMIUM; 1123 1124 #if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST) 1125 if (context->pHgsmi) 1126 { 1127 spuConnection = stub.spu->dispatch_table.VBoxConCreate(context->pHgsmi); 1128 if (!spuConnection) 1129 { 1130 crWarning("VBoxConCreate failed"); 1131 return GL_FALSE; 1132 } 1133 context->spuConnection = spuConnection; 1134 } 1135 #endif 1136 1137 context->spuContext 1138 = stub.spu->dispatch_table.VBoxCreateContext(spuConnection, context->dpyName, 1139 context->visBits, 1140 spuShareCtx); 1141 1142 return GL_TRUE; 1143 } 1144 1145 GLboolean stubCtxCheckCreate(ContextInfo *context) 1146 { 1147 if (context->type == UNDECIDED) 1148 return stubCtxCreate(context); 1149 return CHROMIUM == context->type; 1150 } 1151 1152 1101 1153 GLboolean 1102 1154 stubMakeCurrent( WindowInfo *window, ContextInfo *context ) … … 1129 1181 1130 1182 if (stubCheckUseChromium(window)) { 1131 /*1132 * Create a Chromium context.1133 */1134 #if defined(GLX) || defined(DARWIN)1135 GLint spuShareCtx = context->share ? context->share->spuContext : 0;1136 #else1137 GLint spuShareCtx = 0;1138 #endif1139 1183 GLint spuConnection = 0; 1140 CRASSERT(stub.spu); 1141 CRASSERT(stub.spu->dispatch_table.CreateContext); 1142 context->type = CHROMIUM; 1184 1185 if (!stubCtxCreate(context)) 1186 { 1187 crWarning("stubCtxCreate failed"); 1188 return GL_FALSE; 1189 } 1143 1190 1144 1191 #if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST) 1145 if (context->pHgsmi) 1146 { 1147 spuConnection = stub.spu->dispatch_table.VBoxConCreate(context->pHgsmi); 1148 if (!spuConnection) 1149 { 1150 crWarning("VBoxConCreate failed"); 1151 return GL_FALSE; 1152 } 1153 context->spuConnection = spuConnection; 1154 } 1155 #endif 1156 1157 context->spuContext 1158 = stub.spu->dispatch_table.VBoxCreateContext(spuConnection, context->dpyName, 1159 context->visBits, 1160 spuShareCtx); 1192 spuConnection = context->spuConnection; 1193 #endif 1194 1161 1195 if (window->spuWindow == -1) 1162 1196 { 1163 1197 /*crDebug("(1)stubMakeCurrent ctx=%p(%i) window=%p(%i)", context, context->spuContext, window, window->spuWindow);*/ 1164 window->spuWindow = stub.spu->dispatch_table.VBoxWindowCreate( 1165 spuConnection, 1166 window->dpyName, context->visBits ); 1198 window->spuWindow = stub.spu->dispatch_table.VBoxWindowCreate(spuConnection, window->dpyName, context->visBits ); 1167 1199 #ifdef CR_NEWWINTRACK 1168 1200 window->u32ClientID = stub.spu->dispatch_table.VBoxPackGetInjectID(spuConnection); -
trunk/src/VBox/Additions/common/crOpenGL/defs.py
r47647 r48999 498 498 crGetProcAddress 499 499 VBoxCreateContext 500 VBoxCtxChromiumParameteriCR 500 501 VBoxGetWindowId 501 502 VBoxGetContextId -
trunk/src/VBox/Additions/common/crOpenGL/defs64.py
r47647 r48999 478 478 crGetProcAddress 479 479 VBoxCreateContext 480 VBoxCtxChromiumParameteriCR 480 481 VBoxGetWindowId 481 482 VBoxGetContextId -
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_context.c
r46171 r48999 185 185 } 186 186 187 GLvoid PACKSPU_APIENTRY 188 packspu_VBoxConChromiumParameteriCR(GLint con, GLenum param, GLint value) 189 { 190 GET_THREAD(thread); 191 CRPackContext * curPacker = crPackGetContext(); 192 ThreadInfo *curThread = thread; 193 int writeback = 1; 194 GLint serverCtx = (GLint) -1; 195 int slot; 196 197 CRASSERT(!curThread == !curPacker); 198 CRASSERT(!curThread || !curPacker || curThread->packer == curPacker); 199 #ifdef CHROMIUM_THREADSAFE 200 crLockMutex(&_PackMutex); 201 #endif 202 203 #if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST) 204 CRASSERT(!con == !CRPACKSPU_IS_WDDM_CRHGSMI()); 205 #endif 206 207 if (CRPACKSPU_IS_WDDM_CRHGSMI()) 208 { 209 if (!con) 210 { 211 crError("connection should be specified!"); 212 return -1; 213 } 214 thread = GET_THREAD_VAL_ID(con); 215 } 216 else 217 { 218 CRASSERT(!con); 219 if (!thread) 220 { 221 thread = packspuNewThread( 222 #if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST) 223 NULL 224 #endif 225 ); 226 } 227 } 228 CRASSERT(thread); 229 CRASSERT(thread->packer); 230 231 crPackSetContext( thread->packer ); 232 233 packspu_ChromiumParameteriCR(param, value); 234 235 #ifdef CHROMIUM_THREADSAFE 236 crUnlockMutex(&_PackMutex); 237 #endif 238 239 if (CRPACKSPU_IS_WDDM_CRHGSMI()) 240 { 241 /* restore the packer context to the tls */ 242 crPackSetContext(curPacker); 243 } 244 } 187 245 188 246 GLint PACKSPU_APIENTRY -
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_special
r48927 r48999 108 108 VBoxDetachThread 109 109 VBoxCreateContext 110 VBoxConChromiumParameteriCR 110 111 VBoxWindowCreate 111 112 VBoxWindowDestroy -
trunk/src/VBox/Additions/common/crOpenGL/stub.h
r47151 r48999 343 343 #endif 344 344 ); 345 extern void stubConChromiumParameteriCR(GLint con, GLenum param, GLint value); 346 extern GLboolean stubCtxCreate(ContextInfo *context); 347 extern GLboolean stubCtxCheckCreate(ContextInfo *context); 345 348 extern void stubDestroyContext( unsigned long contextId ); 346 349 extern GLboolean stubMakeCurrent( WindowInfo *window, ContextInfo *context ); … … 348 351 extern void stubDestroyWindow( GLint con, GLint window ); 349 352 extern void stubSwapBuffers(WindowInfo *window, GLint flags); 350 extern void stubGetWindowGeometry( WindowInfo *win, int *x, int *y, unsigned int *w, unsigned int *h);353 extern void stubGetWindowGeometry(const WindowInfo *win, int *x, int *y, unsigned int *w, unsigned int *h); 351 354 extern GLboolean stubUpdateWindowGeometry(WindowInfo *pWindow, GLboolean bForceUpdate); 352 355 extern GLboolean stubIsWindowVisible(WindowInfo *win); -
trunk/src/VBox/Additions/common/crOpenGL/wgl.c
r46966 r48999 296 296 } 297 297 298 DECLEXPORT(void) WINAPI VBoxCtxChromiumParameteriCR(HGLRC hglrc, GLenum param, GLint value) 299 { 300 ContextInfo *context; 301 302 CR_DDI_PROLOGUE(); 303 304 // crHashtableLock(stub.windowTable); 305 crHashtableLock(stub.contextTable); 306 307 context = (ContextInfo *) crHashtableSearch(stub.contextTable, (unsigned long) hglrc); 308 309 if (context) 310 { 311 stubCtxCheckCreate(context); 312 stubConChromiumParameteriCR(CR_CTX_CON(context), param, value); 313 } 314 else 315 crWarning("invalid context %#x", hglrc); 316 317 crHashtableUnlock(stub.contextTable); 318 // crHashtableUnlock(stub.windowTable); 319 } 298 320 299 321 DECLEXPORT(HGLRC) WINAPI VBoxCreateContext( HDC hdc, struct VBOXUHGSMI *pHgsmi ) … … 410 432 if (context) 411 433 stubConFlush(CR_CTX_CON(context)); 434 else 435 crWarning("invalid context %#x", hglrc); 412 436 413 437 crHashtableUnlock(stub.contextTable); -
trunk/src/VBox/GuestHost/OpenGL/glapi_parser/APIspec.txt
r45132 r48999 8550 8550 chromium nopack 8551 8551 8552 name VBoxConChromiumParameteriCR 8553 return void 8554 param con GLint 8555 param target GLenum 8556 paramprop target GL_CURSOR_POSITION_CR GL_DEFAULT_BBOX_CR GL_SCREEN_BBOX_CR GL_OBJECT_BBOX_CR GL_PRINT_STRING_CR GL_MURAL_SIZE_CR GL_NUM_SERVERS_CR GL_NUM_TILES_CR GL_TILE_BOUNDS_CR GL_VERTEX_COUNTS_CR GL_RESET_VERTEX_COUNTERS_CR GL_SET_MAX_VIEWPORT_CR GL_HEAD_SPU_NAME_CR GL_PERF_GET_FRAME_DATA_CR GL_PERF_GET_TIMER_DATA_CR GL_PERF_DUMP_COUNTERS_CR GL_PERF_SET_TOKEN_CR GL_PERF_SET_DUMP_ON_SWAP_CR GL_PERF_SET_DUMP_ON_FINISH_CR GL_PERF_SET_DUMP_ON_FLUSH_CR GL_PERF_START_TIMER_CR GL_PERF_STOP_TIMER_CR GL_WINDOW_SIZE_CR GL_TILE_INFO_CR GL_GATHER_DRAWPIXELS_CR GL_GATHER_PACK_CR GL_GATHER_CONNECT_CR GL_GATHER_POST_SWAPBUFFERS_CR GL_SAVEFRAME_ENABLED_CR GL_SAVEFRAME_FRAMENUM_CR GL_SAVEFRAME_STRIDE_CR GL_SAVEFRAME_SINGLE_CR GL_SAVEFRAME_FILESPEC_CR GL_READBACK_BARRIER_SIZE_CR 8557 param value GLint 8558 category VBox 8559 chromium nopack 8560 8552 8561 name VBoxWindowCreate 8553 8562 return GLint
Note:
See TracChangeset
for help on using the changeset viewer.