Changeset 78263 in vbox for trunk/src/VBox/HostServices/SharedOpenGL/render
- Timestamp:
- Apr 23, 2019 6:41:06 PM (6 years ago)
- Location:
- trunk/src/VBox/HostServices/SharedOpenGL/render
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu.c
r78190 r78263 243 243 } 244 244 245 ContextInfo * renderspuDefaultSharedContextAcquire( )245 ContextInfo * renderspuDefaultSharedContextAcquire(void) 246 246 { 247 247 ContextInfo * pCtx = render_spu.defaultSharedContext; … … 651 651 WindowInfo *window; 652 652 653 RT_NOREF(dpyName); 654 653 655 if (id <= 0) 654 656 { … … 731 733 window = (WindowInfo *) crHashtableSearch(render_spu.windowTable, win); 732 734 if (window) { 733 if ( w != window->BltInfo.width734 ||h != window->BltInfo.height)735 if ( (GLuint)w != window->BltInfo.width 736 || (GLuint)h != window->BltInfo.height) 735 737 { 736 738 /* window is resized, compositor data is no longer valid … … 1063 1065 { 1064 1066 PCR_BLITTER pBlitter = renderspuVBoxPresentBlitterGetAndEnter(window, i32MakeCurrentUserData, fRedraw); 1067 1068 RT_NOREF(pChangedEntry); 1065 1069 if (!pBlitter) 1066 1070 return; … … 1111 1115 { 1112 1116 WindowInfo *window = (WindowInfo *) data1; 1117 RT_NOREF(key, data2); 1118 1113 1119 renderspuVBoxCompositorSet(window, NULL); 1114 1120 } 1115 1121 1116 void renderspuVBoxCompositorClearAll( )1122 void renderspuVBoxCompositorClearAll(void) 1117 1123 { 1118 1124 /* we need to clear window compositor, which is not that trivial though, … … 1506 1512 } 1507 1513 1508 bool renderspuCalloutAvailable( )1514 bool renderspuCalloutAvailable(void) 1509 1515 { 1510 1516 return render_spu.pfnClientCallout != NULL; … … 1854 1860 { 1855 1861 WindowInfo *pWindow = (WindowInfo *)data1; 1862 RT_NOREF(key, data2); 1856 1863 1857 1864 renderspu_SystemReparentWindow(pWindow); -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu.h
r78251 r78263 339 339 extern void renderspu_SystemWindowVisibleRegion(WindowInfo *window, GLint cRects, const GLint* pRects); 340 340 extern GLboolean renderspu_SystemWindowNeedEmptyPresent(WindowInfo *window); 341 extern int renderspu_SystemInit( );342 extern int renderspu_SystemTerm( );341 extern int renderspu_SystemInit(void); 342 extern int renderspu_SystemTerm(void); 343 343 extern void renderspu_SystemDefaultSharedContextChanged(ContextInfo *fromContext, ContextInfo *toContext); 344 344 extern void renderspu_SystemShowWindow( WindowInfo *window, GLboolean showIt ); … … 351 351 extern int renderspuCreateFunctions( SPUNamedFunctionTable table[] ); 352 352 extern GLboolean renderspuVBoxCompositorSet( WindowInfo *window, const struct VBOXVR_SCR_COMPOSITOR * pCompositor); 353 extern void renderspuVBoxCompositorClearAll( );353 extern void renderspuVBoxCompositorClearAll(void); 354 354 extern int renderspuVBoxCompositorLock(WindowInfo *window, const struct VBOXVR_SCR_COMPOSITOR **ppCompositor); 355 355 extern int renderspuVBoxCompositorUnlock(WindowInfo *window); … … 408 408 extern uint32_t renderspuContextMarkDeletedAndRelease( ContextInfo *context ); 409 409 410 int renderspuDefaultCtxInit( );410 int renderspuDefaultCtxInit(void); 411 411 void renderspuCleanupBase(bool fDeleteTables); 412 412 413 ContextInfo * renderspuDefaultSharedContextAcquire( );413 ContextInfo * renderspuDefaultSharedContextAcquire(void); 414 414 void renderspuDefaultSharedContextRelease(ContextInfo * pCtx); 415 415 uint32_t renderspuContextRelease(ContextInfo *context); 416 416 uint32_t renderspuContextRetain(ContextInfo *context); 417 417 418 bool renderspuCalloutAvailable( );418 bool renderspuCalloutAvailable(void); 419 419 bool renderspuCalloutClient(PFNVCRSERVER_CLIENT_CALLOUT_CB pfnCb, void *pvCb); 420 420 -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_init.c
r78251 r78263 100 100 #endif 101 101 102 int renderspuDefaultCtxInit( )102 int renderspuDefaultCtxInit(void) 103 103 { 104 104 GLint defaultWin, defaultCtx; … … 367 367 CRASSERT(window); 368 368 369 RT_NOREF(key, data2); 370 369 371 renderspuVBoxPresentBlitterCleanup( window ); 370 372 } -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_wgl.c
r78190 r78263 99 99 } 100 100 101 int renderspuIatPatcherPatchEntry(void *pvEntry, void *pvValue, void **ppvOldVal)102 { 103 void **ppfn = (void**)pvEntry;101 int renderspuIatPatcherPatchEntry(void *pvEntry, PFNRT pfnValue, PFNRT *ppfnOldVal) 102 { 103 PFNRT *ppfn = (PFNRT *)pvEntry; 104 104 DWORD dwOldProtect = 0; 105 105 … … 110 110 } 111 111 112 if (pp vOldVal)113 *pp vOldVal = *ppfn;114 *ppfn = p vValue;112 if (ppfnOldVal) 113 *ppfnOldVal = *ppfn; 114 *ppfn = pfnValue; 115 115 116 116 if (!VirtualProtect(pvEntry, sizeof (pvEntry), dwOldProtect, &dwOldProtect)) … … 123 123 124 124 125 int renderspuIatPatcherPatchFunction(HMODULE hModule, LPCSTR pszLib, LPCSTR pszName, void*pfn)125 int renderspuIatPatcherPatchFunction(HMODULE hModule, LPCSTR pszLib, LPCSTR pszName, PFNRT pfn) 126 126 { 127 127 void* pAdr; … … 144 144 145 145 /* patch */ 146 static HWND __stdcall renderspuAtiQuirk_GetForegroundWindow( )146 static HWND __stdcall renderspuAtiQuirk_GetForegroundWindow(void) 147 147 { 148 148 crDebug("renderspuAtiQuirk_GetForegroundWindow"); … … 279 279 } 280 280 281 rc = renderspuIatPatcherPatchFunction(hAtiDll, "user32.dll", "GetForegroundWindow", ( void*)renderspuAtiQuirk_GetForegroundWindow);281 rc = renderspuIatPatcherPatchFunction(hAtiDll, "user32.dll", "GetForegroundWindow", (PFNRT)renderspuAtiQuirk_GetForegroundWindow); 282 282 if (RT_FAILURE(rc)) 283 283 { … … 311 311 312 312 313 static int renderspuAtiQuirk_Apply( )313 static int renderspuAtiQuirk_Apply(void) 314 314 { 315 315 char aBuf[4096]; … … 337 337 } 338 338 339 static GLboolean renderspuAtiQuirk_Needed( )340 { 341 const char * pszString = render_spu.ws.glGetString(GL_VENDOR);339 static GLboolean renderspuAtiQuirk_Needed(void) 340 { 341 const char * pszString = (const char *)render_spu.ws.glGetString(GL_VENDOR); 342 342 if (pszString && strstr(pszString, "ATI")) 343 343 return GL_TRUE; 344 pszString = render_spu.ws.glGetString(GL_RENDERER);344 pszString = (const char *)render_spu.ws.glGetString(GL_RENDERER); 345 345 if (pszString && strstr(pszString, "ATI")) 346 346 return GL_TRUE; … … 348 348 } 349 349 350 static void renderspuAtiQuirk_ChkApply( )350 static void renderspuAtiQuirk_ChkApply(void) 351 351 { 352 352 static GLboolean fChecked = GL_FALSE; … … 506 506 int attribList[100]; 507 507 float fattribList[] = { 0.0, 0.0 }; 508 intnumFormats;508 unsigned numFormats; 509 509 int i = 0; 510 510 BOOL vis; … … 1400 1400 } 1401 1401 1402 #if 0 1402 1403 if (0/*render_spu.render_to_app_window && nativeWindow*/) 1403 1404 { … … 1439 1440 } 1440 1441 else 1442 #endif 1441 1443 { 1442 1444 if (!context->hRC) { … … 1583 1585 GLboolean renderspu_SystemWindowNeedEmptyPresent(WindowInfo *window) 1584 1586 { 1587 RT_NOREF(window); 1585 1588 return GL_FALSE; 1586 1589 } … … 1642 1645 { 1643 1646 int return_value; 1647 1648 RT_NOREF(flags); 1644 1649 1645 1650 /* peek at the windows message queue */ … … 1721 1726 } 1722 1727 1723 int renderspu_SystemInit( )1728 int renderspu_SystemInit(void) 1724 1729 { 1725 1730 return VINF_SUCCESS; 1726 1731 } 1727 1732 1728 int renderspu_SystemTerm( )1733 int renderspu_SystemTerm(void) 1729 1734 { 1730 1735 return VINF_SUCCESS; … … 1733 1738 void renderspu_SystemDefaultSharedContextChanged(ContextInfo *fromContext, ContextInfo *toContext) 1734 1739 { 1735 1740 RT_NOREF(fromContext, toContext); 1736 1741 } 1737 1742 1738 1743 uint32_t renderspu_SystemPostprocessFunctions(SPUNamedFunctionTable *aFunctions, uint32_t cFunctions, uint32_t cTable) 1739 1744 { 1745 RT_NOREF(aFunctions, cTable); 1740 1746 return cFunctions; 1741 1747 }
Note:
See TracChangeset
for help on using the changeset viewer.