Changeset 63199 in vbox for trunk/src/VBox/GuestHost/OpenGL/util
- Timestamp:
- Aug 9, 2016 11:40:19 AM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 109822
- Location:
- trunk/src/VBox/GuestHost/OpenGL/util
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/util/blitter.cpp
r62814 r63199 82 82 83 83 RTRECT Intersection; 84 const RTPOINT ZeroPoint = {0, 0};84 /*const RTPOINT ZeroPoint = {0, 0}; - unused */ 85 85 86 86 for (uint32_t i = 0; i < cRects; ++i) … … 573 573 DECLINLINE(GLint*) crBltVtRectTF(const RTRECT *pRect, uint32_t normalX, uint32_t normalY, GLint* pBuff, uint32_t height) 574 574 { 575 (void)normalX; (void)normalY; 576 575 577 /* xLeft yTop */ 576 578 pBuff[0] = pRect->xLeft; … … 1115 1117 VBOXBLITTERDECL(int) CrBltImgGetMural(PCR_BLITTER pBlitter, bool fBb, CR_BLITTER_IMG *pDst) 1116 1118 { 1119 (void)fBb; (void)pDst; 1117 1120 if (!CrBltIsEntered(pBlitter)) 1118 1121 { … … 2030 2033 } 2031 2034 2032 Assert(width == pScaledCache->Tex.width);2033 Assert(height == pScaledCache->Tex.height);2035 Assert(width == (uint32_t)pScaledCache->Tex.width); 2036 Assert(height == (uint32_t)pScaledCache->Tex.height); 2034 2037 2035 2038 if (!pScaledCache->Flags.DataValid) … … 2057 2060 VBOXBLITTERDECL(int) CrTdBltDataAcquireScaled(PCR_TEXDATA pTex, GLenum enmFormat, bool fInverted, uint32_t width, uint32_t height, const CR_BLITTER_IMG**ppImg) 2058 2061 { 2059 if ( pTex->Tex.width == width &&pTex->Tex.height == height)2062 if ((uint32_t)pTex->Tex.width == width && (uint32_t)pTex->Tex.height == height) 2060 2063 return CrTdBltDataAcquire(pTex, enmFormat, fInverted, ppImg); 2061 2064 -
trunk/src/VBox/GuestHost/OpenGL/util/bufpool.c
r53726 r63199 115 115 /* check that the buffer to push isn't already in the pool! */ 116 116 { 117 const Buffer *b ;118 for (b = pool->head; b; b = b->next) {119 CRASSERT(b ->address != buf);117 const Buffer *bd; 118 for (bd = pool->head; bd; bd = bd->next) { 119 CRASSERT(bd->address != buf); 120 120 } 121 121 } -
trunk/src/VBox/GuestHost/OpenGL/util/compositor.cpp
r62492 r63199 105 105 { 106 106 uint32_t* pCounter = (uint32_t*)pvVisitor; 107 (void)pCompositor; (void)pEntry; 108 107 109 Assert(VBoxVrListRectsCount(&pEntry->Vr)); 108 110 *pCounter += VBoxVrListRectsCount(&pEntry->Vr); … … 495 497 CR_TEXDATA *pTex) 496 498 { 499 (void)pCompositor; 500 497 501 if (pEntry->pTex == pTex) 498 502 return VINF_SUCCESS; -
trunk/src/VBox/GuestHost/OpenGL/util/devnull.c
r53726 r63199 82 82 (void) conn; 83 83 (void) port; 84 (void) hostname; 84 85 } 85 86 -
trunk/src/VBox/GuestHost/OpenGL/util/dll.c
r62812 r63199 228 228 return NULL; 229 229 } 230 # endif / / CR_NO_GL_SYSTEM_PATH230 # endif /* CR_NO_GL_SYSTEM_PATH */ 231 231 #endif 232 232 … … 328 328 329 329 #elif defined(IRIX) || defined(IRIX64) || defined(Linux) || defined(FreeBSD) || defined(AIX) || defined(SunOS) || defined(OSF1) 330 return (CRDLLFunc) 330 return (CRDLLFunc)(uintptr_t)dlsym( dll->hinstLib, symname ); 331 331 #else 332 332 #error CR DLL ARCHITETECTURE -
trunk/src/VBox/GuestHost/OpenGL/util/error.c
r62814 r63199 33 33 # include "VBox/VBoxGuestLib.h" 34 34 # include "iprt/initterm.h" 35 #else 36 # include "cr_error.h" 35 37 #endif 36 38 … … 77 79 } 78 80 81 #ifdef WINDOWS 79 82 static void logMessage(const char *pszPrefix, const char *pszFormat, ...) 80 83 { … … 85 88 va_end(va); 86 89 } 90 #endif 87 91 88 92 DECLEXPORT(void) crError(const char *pszFormat, ...) -
trunk/src/VBox/GuestHost/OpenGL/util/filenet.c
r53726 r63199 92 92 crFileAccept( CRConnection *conn, const char *hostname, unsigned short port ) 93 93 { 94 (void)hostname; 94 95 conn->file_direction = CR_FILE_READ; 95 96 conn->fd = open( conn->filename, O_RDONLY | O_BINARY ); -
trunk/src/VBox/GuestHost/OpenGL/util/hash.c
r62814 r63199 274 274 } 275 275 276 / / Assert(id != 2);276 /* Assert(id != 2);*/ 277 277 278 278 RTListForEachSafe(&pool->freeList, f, next, FreeElem, Node) -
trunk/src/VBox/GuestHost/OpenGL/util/list.c
r62814 r63199 312 312 } 313 313 314 #endif / / CR_TESTING_LIST314 #endif /* CR_TESTING_LIST */ -
trunk/src/VBox/GuestHost/OpenGL/util/net.c
r53726 r63199 388 388 conn->hostname = crStrdup( filename ); 389 389 390 /* call the protocol-specific init routines */ / / ktd (add)390 /* call the protocol-specific init routines */ /* ktd (add) */ 391 391 InitConnection(conn, protocol_only, mtu 392 392 #if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST) 393 393 , NULL 394 394 #endif 395 ); / / ktd (add)395 ); /* ktd (add) */ 396 396 } 397 397 else { … … 513 513 514 514 /* Free up stuff */ 515 void crNetTearDown( )515 void crNetTearDown(void) 516 516 { 517 517 CRNetReceiveFuncList *rfl; … … 1274 1274 1275 1275 #ifdef IN_GUEST 1276 uint32_t crNetHostCapsGet( )1276 uint32_t crNetHostCapsGet(void) 1277 1277 { 1278 1278 #ifdef VBOX_WITH_HGCM … … 1294 1294 #if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST) 1295 1295 CRConnection *conn 1296 #else 1297 void 1296 1298 #endif 1297 1299 ) … … 1363 1365 crNetSetContextRange( int low_context, int high_context ) 1364 1366 { 1367 #if !defined(TEAC_SUPPORT) && !defined(TCSCOMM_SUPPORT) 1368 (void)low_context; (void)high_context; 1369 #endif 1365 1370 #ifdef TEAC_SUPPORT 1366 1371 crTeacSetContextRange( low_context, high_context ); … … 1377 1382 crNetSetNodeRange( const char *low_node, const char *high_node ) 1378 1383 { 1384 #if !defined(TEAC_SUPPORT) && !defined(TCSCOMM_SUPPORT) 1385 (void)low_node; (void)high_node; 1386 #endif 1379 1387 #ifdef TEAC_SUPPORT 1380 1388 crTeacSetNodeRange( low_node, high_node ); … … 1393 1401 #ifdef TEAC_SUPPORT 1394 1402 crTeacSetKey( key, keyLength ); 1395 #endif 1396 } 1403 #else 1404 (void)key; (void)keyLength; 1405 #endif 1406 } -
trunk/src/VBox/GuestHost/OpenGL/util/net_internals.h
r53726 r63199 100 100 #if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST) 101 101 CRConnection *conn 102 #else 103 void 102 104 #endif 103 105 ); 104 106 #ifdef IN_GUEST 105 extern uint32_t crVBoxHGCMHostCapsGet( );107 extern uint32_t crVBoxHGCMHostCapsGet(void); 106 108 #endif 107 109 extern CRConnection** crVBoxHGCMDump( int *num ); -
trunk/src/VBox/GuestHost/OpenGL/util/pixel.c
r62814 r63199 1596 1596 } 1597 1597 else 1598 / /crDebug("Sending texture, BytesPerRow!=RowStrideBytes");1598 /*crDebug("Sending texture, BytesPerRow!=RowStrideBytes");*/ 1599 1599 for (i = 0; i < height; i++) 1600 1600 { -
trunk/src/VBox/GuestHost/OpenGL/util/process.c
r58583 r63199 229 229 { 230 230 #ifdef WINDOWS 231 / /return _getpid();231 /*return _getpid();*/ 232 232 return GetCurrentProcess(); 233 233 #else -
trunk/src/VBox/GuestHost/OpenGL/util/tcpip.c
r62814 r63199 519 519 char host[NI_MAXHOST]; 520 520 #endif 521 (void)hostname; 521 522 522 523 cr_tcpip.server_sock = CreateListeningSocket(port); … … 1278 1279 if ( conn->tcp_socket < 0 ) 1279 1280 { 1280 int err = crTCPIPErrno( );1281 if (err != EAFNOSUPPORT)1282 crWarning( "socket error: %s, trying another way", crTCPIPErrorString( err ) );1281 int err2 = crTCPIPErrno( ); 1282 if (err2 != EAFNOSUPPORT) 1283 crWarning( "socket error: %s, trying another way", crTCPIPErrorString( err2 ) ); 1283 1284 cur=cur->ai_next; 1284 1285 continue; -
trunk/src/VBox/GuestHost/OpenGL/util/udptcpip.c
r61992 r63199 521 521 else if ( FD_ISSET(conn->udp_socket, &read_fds ) ) 522 522 { 523 CRTCPIPBuffer *buf = ((CRTCPIPBuffer *) crTCPIPAlloc( conn )) - 1;524 unsigned int *seq = ((unsigned int *) (buf + 1)) - 1;525 int len;523 unsigned int *seq; 524 buf = ((CRTCPIPBuffer *) crTCPIPAlloc( conn )) - 1; 525 seq = ((unsigned int *) (buf + 1)) - 1; 526 526 527 527 len = recv( conn->udp_socket, (void *)seq, -
trunk/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c
r63064 r63199 64 64 #define CRASSERT Assert 65 65 #endif 66 / /#define IN_GUEST67 //#if defined(IN_GUEST)68 //#define VBOX_WITH_CRHGSMIPROFILE69 //#endif 66 /*#define IN_GUEST 67 #if defined(IN_GUEST) 68 #define VBOX_WITH_CRHGSMIPROFILE 69 #endif */ 70 70 #ifdef VBOX_WITH_CRHGSMIPROFILE 71 71 #include <iprt/time.h> … … 101 101 { 102 102 uint64_t cStartTime; 103 / / bool bDisable;103 /* bool bDisable;*/ 104 104 } VBOXCRHGSMIPROFILE_SCOPE, *PVBOXCRHGSMIPROFILE_SCOPE; 105 105 … … 131 131 DECLINLINE(void) vboxCrHgsmiProfileScopeEnter(PVBOXCRHGSMIPROFILE_SCOPE pScope) 132 132 { 133 / / pScope->bDisable = false;133 /* pScope->bDisable = false; */ 134 134 pScope->cStartTime = VBOXCRHGSMIPROFILE_GET_TIME_NANO(); 135 135 } … … 137 137 DECLINLINE(void) vboxCrHgsmiProfileScopeExit(PVBOXCRHGSMIPROFILE_SCOPE pScope) 138 138 { 139 / / if (!pScope->bDisable)139 /* if (!pScope->bDisable) */ 140 140 { 141 141 uint64_t cTime = VBOXCRHGSMIPROFILE_GET_TIME_NANO(); … … 522 522 pSubm->fFlags.Value = 0; 523 523 pSubm->fFlags.bDoNotRetire = 1; 524 // pSubm->fFlags.bDoNotSignalCompletion = 1; /* <- we do not need that actually since 525 // * in case we want completion, 526 // * we will block in _crVBoxHGSMICmdBufferGetRc (when locking the buffer) 527 // * which is needed for getting the result */ 524 # if 0 525 pSubm->fFlags.bDoNotSignalCompletion = 1; /* <- we do not need that actually since 526 * in case we want completion, 527 * we will block in _crVBoxHGSMICmdBufferGetRc (when locking the buffer) 528 * which is needed for getting the result */ 529 # endif 528 530 } 529 531 #endif … … 549 551 #endif 550 552 553 #ifndef IN_GUEST 551 554 /*@todo get rid of it*/ 552 555 static bool _crVBoxHGCMWriteBytes(CRConnection *conn, const void *buf, uint32_t len) … … 576 579 return TRUE; 577 580 } 581 #endif 578 582 579 583 /** … … 588 592 { 589 593 #ifdef IN_GUEST 590 # if defined(VBOX_WITH_CRHGSMI) 594 # ifndef VBOX_WITH_CRHGSMI 595 RT_NOREF(conn); 596 # else 591 597 PCRVBOXHGSMI_CLIENT pClient = g_crvboxhgcm.bHgsmiOn ? _crVBoxHGSMIClientGet(conn) : NULL; 592 598 if (pClient) … … 681 687 # endif /*#ifdef RT_OS_WINDOWS*/ 682 688 } 683 #else /*#ifdef IN_GUEST*/ 689 690 #else /* IN_GUEST */ 691 RT_NOREF(conn, pvData, cbData); 684 692 crError("crVBoxHGCMCall called on host side!"); 685 693 CRASSERT(FALSE); 686 694 return VERR_NOT_SUPPORTED; 687 #endif 695 #endif /* IN_GUEST */ 688 696 } 689 697 … … 805 813 CRVBOXHGCMREAD parms; 806 814 int rc; 815 RT_NOREF(buf, len); 807 816 808 817 parms.hdr.result = VERR_WRONG_ORDER; … … 811 820 parms.hdr.cParms = SHCRGL_CPARMS_READ; 812 821 813 CRASSERT(!conn->pBuffer); / /make sure there's no data to process822 CRASSERT(!conn->pBuffer); /* make sure there's no data to process */ 814 823 parms.pBuffer.type = VMMDevHGCMParmType_LinAddr_Out; 815 824 parms.pBuffer.u.Pointer.size = conn->cbHostBufferAllocated; … … 829 838 if (parms.cbBuffer.u.value32) 830 839 { 831 / /conn->pBuffer = (uint8_t*) parms.pBuffer.u.Pointer.u.linearAddr;840 /*conn->pBuffer = (uint8_t*) parms.pBuffer.u.Pointer.u.linearAddr; */ 832 841 conn->pBuffer = conn->pHostBuffer; 833 842 conn->cbBuffer = parms.cbBuffer.u.value32; … … 858 867 parms.pBuffer.u.Pointer.u.linearAddr = (uintptr_t) buf; 859 868 860 CRASSERT(!conn->pBuffer); / /make sure there's no data to process869 CRASSERT(!conn->pBuffer); /*make sure there's no data to process*/ 861 870 parms.pWriteback.type = VMMDevHGCMParmType_LinAddr_Out; 862 871 parms.pWriteback.u.Pointer.size = conn->cbHostBufferAllocated; … … 965 974 if (parms.cbWriteback.u.value32) 966 975 { 967 / /conn->pBuffer = (uint8_t*) parms.pWriteback.u.Pointer.u.linearAddr;976 /*conn->pBuffer = (uint8_t*) parms.pWriteback.u.Pointer.u.linearAddr;*/ 968 977 conn->pBuffer = conn->pHostBuffer; 969 978 conn->cbBuffer = parms.cbWriteback.u.value32; … … 987 996 { 988 997 #ifndef IN_GUEST 989 / /@todo remove temp buffer allocation in unpacker998 /**@todo remove temp buffer allocation in unpacker*/ 990 999 /* we're at the host side, so just store data until guest polls us */ 991 1000 _crVBoxHGCMWriteBytes(conn, start, len); … … 1107 1116 #endif 1108 1117 if (g_crvboxhgcm.bufpool) { 1109 / /@todo o'rly?1118 /**@todo o'rly? */ 1110 1119 /* pool may have been deallocated just a bit earlier in response 1111 1120 * to a SIGPIPE (Broken Pipe) signal. … … 1154 1163 if (conn->allow_redir_ptr) 1155 1164 { 1156 #endif //IN_GUEST1165 #endif 1157 1166 CRASSERT(conn->buffer_size >= sizeof(CRMessageRedirPtr)); 1158 1167 … … 1204 1213 cached_type = msg->header.type; 1205 1214 } 1206 #endif / /IN_GUEST1215 #endif /* !IN_GUEST*/ 1207 1216 1208 1217 conn->recv_credits -= len; … … 1242 1251 static void crVBoxHGCMAccept( CRConnection *conn, const char *hostname, unsigned short port ) 1243 1252 { 1253 RT_NOREF(hostname, port); 1244 1254 VBOXCRHGSMIPROFILE_FUNC_PROLOGUE(); 1245 1255 CRASSERT(conn && conn->pHostBuffer); … … 1254 1264 CRVBOXHGCMSETVERSION parms; 1255 1265 int rc; 1266 RT_NOREF(vMajor, vMinor); 1256 1267 1257 1268 parms.hdr.result = VERR_WRONG_ORDER; … … 1616 1627 static void crVBoxHGCMHandleNewMessage( CRConnection *conn, CRMessage *msg, unsigned int len ) 1617 1628 { 1629 RT_NOREF(conn, msg, len); 1618 1630 VBOXCRHGSMIPROFILE_FUNC_PROLOGUE(); 1619 1631 CRASSERT(FALSE); … … 1763 1775 parms->hdr.u32ClientID = conn->u32ClientID; 1764 1776 parms->hdr.u32Function = SHCRGL_GUEST_FN_READ; 1765 / / parms->hdr.u32Reserved = 0;1766 1767 CRASSERT(!conn->pBuffer); / /make sure there's no data to process1777 /* parms->hdr.u32Reserved = 0;*/ 1778 1779 CRASSERT(!conn->pBuffer); /* make sure there's no data to process */ 1768 1780 parms->iBuffer = 1; 1769 1781 parms->cbBuffer = 0; … … 1838 1850 PVBOXUHGSMI_BUFFER pBuf = NULL; 1839 1851 VBOXUHGSMI_BUFFER_LOCK_FLAGS fFlags; 1840 / / uint32_t cbBuffer;1852 /* uint32_t cbBuffer;*/ 1841 1853 1842 1854 parms->hdr.result = VERR_WRONG_ORDER; 1843 1855 parms->hdr.u32ClientID = conn->u32ClientID; 1844 1856 parms->hdr.u32Function = SHCRGL_GUEST_FN_WRITE_READ; 1845 / / parms->hdr.u32Reserved = 0;1857 /* parms->hdr.u32Reserved = 0;*/ 1846 1858 1847 1859 parms->iBuffer = 1; 1848 1860 1849 CRASSERT(!conn->pBuffer); / /make sure there's no data to process1861 CRASSERT(!conn->pBuffer); /* make sure there's no data to process */ 1850 1862 parms->iWriteback = 2; 1851 1863 parms->cbWriteback = 0; … … 2016 2028 parms->hdr.u32ClientID = conn->u32ClientID; 2017 2029 parms->hdr.u32Function = SHCRGL_GUEST_FN_INJECT; 2018 / / parms->hdr.u32Reserved = 0;2030 /* parms->hdr.u32Reserved = 0;*/ 2019 2031 2020 2032 parms->u32ClientID = conn->u32InjectClientID; … … 2050 2062 parms->hdr.u32ClientID = conn->u32ClientID; 2051 2063 parms->hdr.u32Function = SHCRGL_GUEST_FN_WRITE; 2052 / / parms->hdr.u32Reserved = 0;2064 /* parms->hdr.u32Reserved = 0; */ 2053 2065 2054 2066 parms->iBuffer = 1; … … 2100 2112 { 2101 2113 #ifndef IN_GUEST 2102 / /@todo remove temp buffer allocation in unpacker2114 /** @todo remove temp buffer allocation in unpacker */ 2103 2115 /* we're at the host side, so just store data until guest polls us */ 2104 2116 _crVBoxHGCMWriteBytes(conn, start, len); … … 2399 2411 2400 2412 /* Callback function used to free buffer pool entries */ 2401 void crVBoxHGCMBufferFree(void *data)2413 static void crVBoxHGCMBufferFree(void *data) 2402 2414 { 2403 2415 CRVBOXHGCMBUFFER *hgcm_buffer = (CRVBOXHGCMBUFFER *) data; … … 2528 2540 conn->allow_redir_ptr = 1; 2529 2541 2530 / /@todo remove this crap at all later2542 /** @todo remove this crap at all later */ 2531 2543 conn->cbHostBufferAllocated = 2*1024; 2532 2544 conn->pHostBuffer = (uint8_t*) crAlloc(conn->cbHostBufferAllocated); … … 2564 2576 2565 2577 #if defined(IN_GUEST) 2566 void _crVBoxHGCMPerformPollHost(CRConnection *conn)2578 static void _crVBoxHGCMPerformPollHost(CRConnection *conn) 2567 2579 { 2568 2580 if (conn->type == CR_NO_CONNECTION ) … … 2586 2598 #endif 2587 2599 2588 void _crVBoxHGCMPerformReceiveMessage(CRConnection *conn)2600 static void _crVBoxHGCMPerformReceiveMessage(CRConnection *conn) 2589 2601 { 2590 2602 if ( conn->type == CR_NO_CONNECTION ) … … 2598 2610 2599 2611 #ifdef IN_GUEST 2600 uint32_t crVBoxHGCMHostCapsGet( )2612 uint32_t crVBoxHGCMHostCapsGet(void) 2601 2613 { 2602 2614 Assert(g_crvboxhgcm.fHostCapsInitialized); … … 2608 2620 #if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST) 2609 2621 CRConnection *conn 2622 #else 2623 void 2610 2624 #endif 2611 2625 ) -
trunk/src/VBox/GuestHost/OpenGL/util/vreg.cpp
r62814 r63199 401 401 } 402 402 403 #if 0 /* unused */ 403 404 /** 404 405 * @returns Entry to be iterated next. ListHead is returned to break the … … 435 436 } 436 437 } 438 #endif /* unused */ 437 439 438 440 static void vboxVrListJoinRectsHV(PVBOXVR_LIST pList, bool fHorizontal) … … 712 714 } 713 715 716 #if 0 /* unused */ 717 714 718 static DECLCALLBACK(PRTLISTNODE) vboxVrListIntersectNoJoinNonintersectedCb(PVBOXVR_LIST pList1, PVBOXVR_REG pReg1, void *pvContext) 715 719 { … … 730 734 } 731 735 732 #if 0 /* unused */733 736 static DECLCALLBACK(PRTLISTNODE) vboxVrListIntersectNoJoinIntersectedCb(PVBOXVR_LIST pList1, PVBOXVR_REG pReg1, PCRTRECT pRect2, 734 737 void *pvContext, PPRTLISTNODE ppNext) … … 755 758 return &pReg1->ListEntry; 756 759 } 757 #endif 760 761 #endif /* unused */ 758 762 759 763 static int vboxVrListIntersectNoJoin(PVBOXVR_LIST pList, PCVBOXVR_LIST pList2, bool *pfChanged)
Note:
See TracChangeset
for help on using the changeset viewer.