Changeset 49088 in vbox for trunk/src/VBox/GuestHost/OpenGL/util
- Timestamp:
- Oct 14, 2013 3:38:39 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c
r44529 r49088 1999 1999 { 2000 2000 VBOXUHGSMI_BUFFER_TYPE_FLAGS Flags = {0}; 2001 PVBOXUHGSMI_BUFFER p OldBuf = pClient->pHGBuffer;2001 PVBOXUHGSMI_BUFFER pNewBuf; 2002 2002 CRASSERT(!pClient->pvHGBuffer); 2003 2003 CRASSERT(cbWriteback>pClient->pHGBuffer->cbBuffer); 2004 2004 crDebug("Reallocating host buffer from %d to %d bytes", conn->cbHostBufferAllocated, cbWriteback); 2005 2005 2006 rc = pClient->pHgsmi->pfnBufferCreate(pClient->pHgsmi, CRVBOXHGSMI_PAGE_ALIGN(cbWriteback), Flags, &p Client->pHGBuffer);2006 rc = pClient->pHgsmi->pfnBufferCreate(pClient->pHgsmi, CRVBOXHGSMI_PAGE_ALIGN(cbWriteback), Flags, &pNewBuf); 2007 2007 if (RT_SUCCESS(rc)) 2008 2008 { 2009 rc = p OldBuf->pfnDestroy(pOldBuf);2009 rc = pClient->pHGBuffer->pfnDestroy(pClient->pHGBuffer); 2010 2010 CRASSERT(RT_SUCCESS(rc)); 2011 2012 pClient->pHGBuffer = pNewBuf; 2011 2013 2012 2014 _crVBoxHGSMIReadExact(conn, pClient/*, cbWriteback*/); … … 2015 2017 { 2016 2018 crWarning("_crVBoxHGSMIWriteReadExact: pfnBufferCreate(%d) failed!", CRVBOXHGSMI_PAGE_ALIGN(cbWriteback)); 2017 crFree(conn->pHostBuffer); 2018 conn->cbHostBufferAllocated = cbWriteback; 2019 conn->pHostBuffer = crAlloc(conn->cbHostBufferAllocated); 2019 if (conn->cbHostBufferAllocated < cbWriteback) 2020 { 2021 crFree(conn->pHostBuffer); 2022 conn->cbHostBufferAllocated = cbWriteback; 2023 conn->pHostBuffer = crAlloc(conn->cbHostBufferAllocated); 2024 } 2020 2025 crVBoxHGCMReadExact(conn, NULL, cbWriteback); 2021 2026 }
Note:
See TracChangeset
for help on using the changeset viewer.