Changeset 44740 in vbox for trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_window.c
- Timestamp:
- Feb 18, 2013 5:02:47 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_window.c
r44389 r44740 22 22 GLint dims[2]; 23 23 GLint windowID = -1; 24 GLint spuWindow; 25 VBOXVR_TEXTURE Tex = {0}; 26 27 int rc = CrVrScrCompositorInit(&mural->Compositor); 28 if (!RT_SUCCESS(rc)) 29 { 30 crWarning("CrVrScrCompositorInit failed, rc %d", rc); 31 return -1; 32 } 33 24 34 /* 25 35 * Have first SPU make a new window. 26 36 */ 27 GLintspuWindow = cr_server.head_spu->dispatch_table.WindowCreate( dpyName, visBits );37 spuWindow = cr_server.head_spu->dispatch_table.WindowCreate( dpyName, visBits ); 28 38 if (spuWindow < 0) { 29 crServerReturnValue( &spuWindow, sizeof(spuWindow));39 CrVrScrCompositorTerm(&mural->Compositor); 30 40 return spuWindow; 31 41 } … … 33 43 /* get initial window size */ 34 44 cr_server.head_spu->dispatch_table.GetChromiumParametervCR(GL_WINDOW_SIZE_CR, spuWindow, GL_INT, 2, dims); 45 46 Tex.width = dims[0]; 47 Tex.height = dims[1]; 48 Tex.target = GL_TEXTURE_2D; 49 Tex.hwid = 0; 50 CrVrScrCompositorEntryInit(&mural->CEntry, &Tex); 35 51 36 52 defaultMural = (CRMuralInfo *) crHashtableSearch(cr_server.muralTable, 0); … … 118 134 { 119 135 crWarning("crServerMuralInit failed!"); 136 crServerReturnValue( &windowID, sizeof(windowID) ); 120 137 crFree(mural); 121 138 return windowID; … … 290 307 } 291 308 309 CrVrScrCompositorTerm(&mural->Compositor); 310 292 311 crHashtableDelete(cr_server.muralTable, window, crFree); 293 312 } … … 295 314 void crServerMuralSize(CRMuralInfo *mural, GLint width, GLint height) 296 315 { 297 mural->width = width; 298 mural->height = height; 316 if (mural->width != width || mural->height != height) 317 { 318 VBOXVR_TEXTURE Tex; 319 Tex.width = width; 320 Tex.height = height; 321 Tex.target = GL_TEXTURE_2D; 322 Tex.hwid = 0; 323 CrVrScrCompositorEntryRemove(&mural->Compositor, &mural->CEntry); 324 CrVrScrCompositorEntryInit(&mural->CEntry, &Tex); 325 mural->width = width; 326 mural->height = height; 327 } 299 328 300 329 if (cr_server.curClient && cr_server.curClient->currentMural == mural) … … 342 371 { 343 372 CRMuralInfo *mural = (CRMuralInfo *) crHashtableSearch(cr_server.muralTable, window); 373 RTPOINT Pos; 344 374 /* crDebug("CRServer: Window %d pos %d, %d", window, x, y);*/ 345 375 if (!mural) { … … 352 382 mural->gY = y; 353 383 384 Pos.x = x; 385 Pos.y = y; 386 387 CrVrScrCompositorEntryPosSet(&mural->Compositor, &mural->CEntry, &Pos); 388 354 389 crServerCheckMuralGeometry(mural); 355 390 } … … 392 427 cRects, (RTRECT *)pRects); 393 428 } 429 430 CrVrScrCompositorEntryRegionsSet(&mural->Compositor, &mural->CEntry, NULL, cRects, (const RTRECT *)pRects); 394 431 } 395 432
Note:
See TracChangeset
for help on using the changeset viewer.