Changeset 40387 in vbox for trunk/src/VBox/Additions/common/VBoxVideo
- Timestamp:
- Mar 6, 2012 8:38:49 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxVideo/HGSMIBase.cpp
r35398 r40387 128 128 uint16_t u16Op) 129 129 { 130 #ifdef VBOX_WITH_WDDM 131 /* @todo: add synchronization */ 130 #ifdef VBOX_WDDM_MINIPORT 131 return VBoxSHGSMIHeapAlloc (&pCtx->heapCtx, cbData, u8Ch, u16Op); 132 #else 133 return HGSMIHeapAlloc (&pCtx->heapCtx, cbData, u8Ch, u16Op); 132 134 #endif 133 return HGSMIHeapAlloc (&pCtx->heapCtx, cbData, u8Ch, u16Op);134 135 } 135 136 … … 144 145 void *pvBuffer) 145 146 { 146 #ifdef VBOX_WITH_WDDM 147 /* @todo: add synchronization */ 147 #ifdef VBOX_WDDM_MINIPORT 148 VBoxSHGSMIHeapFree (&pCtx->heapCtx, pvBuffer); 149 #else 150 HGSMIHeapFree (&pCtx->heapCtx, pvBuffer); 148 151 #endif 149 HGSMIHeapFree (&pCtx->heapCtx, pvBuffer);150 152 } 151 153 … … 161 163 { 162 164 /* Initialize the buffer and get the offset for port IO. */ 163 HGSMIOFFSET offBuffer = HGSMIHeapBufferOffset ( &pCtx->heapCtx, pvBuffer);165 HGSMIOFFSET offBuffer = HGSMIHeapBufferOffset (HGSMIGUESTCMDHEAP_GET(&pCtx->heapCtx), pvBuffer); 164 166 165 167 Assert(offBuffer != HGSMIOFFSET_VOID); … … 184 186 185 187 /* Allocate the IO buffer. */ 186 p = (HGSMIBUFFERLOCATION *) HGSMIHeapAlloc(&pCtx->heapCtx,188 p = (HGSMIBUFFERLOCATION *)VBoxHGSMIBufferAlloc(pCtx, 187 189 sizeof(HGSMIBUFFERLOCATION), 188 190 HGSMI_CH_HGSMI, … … 195 197 rc = VBoxHGSMIBufferSubmit(pCtx, p); 196 198 /* Free the IO buffer. */ 197 HGSMIHeapFree (&pCtx->heapCtx, p);199 VBoxHGSMIBufferFree(pCtx, p); 198 200 } 199 201 else … … 212 214 213 215 /* Allocate the IO buffer. */ 214 pCaps = (VBVACAPS *) HGSMIHeapAlloc(&pCtx->heapCtx,216 pCaps = (VBVACAPS *)VBoxHGSMIBufferAlloc(pCtx, 215 217 sizeof(VBVACAPS), HGSMI_CH_VBVA, 216 218 VBVA_INFO_CAPS); … … 228 230 } 229 231 /* Free the IO buffer. */ 230 HGSMIHeapFree(&pCtx->heapCtx, pCaps);232 VBoxHGSMIBufferFree(pCtx, pCaps); 231 233 } 232 234 else … … 245 247 246 248 /* Allocate the IO buffer. */ 247 p = (VBVAINFOHEAP *) HGSMIHeapAlloc(&pCtx->heapCtx,249 p = (VBVAINFOHEAP *)VBoxHGSMIBufferAlloc(pCtx, 248 250 sizeof (VBVAINFOHEAP), HGSMI_CH_VBVA, 249 251 VBVA_INFO_HEAP); … … 255 257 rc = VBoxHGSMIBufferSubmit(pCtx, p); 256 258 /* Free the IO buffer. */ 257 HGSMIHeapFree(&pCtx->heapCtx, p);259 VBoxHGSMIBufferFree(pCtx, p); 258 260 } 259 261 else … … 322 324 /** @todo should we be using a fixed ISA port value here? */ 323 325 pCtx->port = (RTIOPORT)VGA_PORT_HGSMI_GUEST; 326 #ifdef VBOX_WDDM_MINIPORT 327 return VBoxSHGSMIInit(&pCtx->heapCtx, pvGuestHeapMemory, 328 cbGuestHeapMemory, offVRAMGuestHeapMemory, 329 false /*fOffsetBased*/); 330 #else 324 331 return HGSMIHeapSetup(&pCtx->heapCtx, pvGuestHeapMemory, 325 332 cbGuestHeapMemory, offVRAMGuestHeapMemory, 326 333 false /*fOffsetBased*/); 334 #endif 327 335 } 328 336 … … 460 468 461 469 /* Allocate the IO buffer. */ 462 p = (VBVACONF32 *) HGSMIHeapAlloc(&pCtx->heapCtx,470 p = (VBVACONF32 *)VBoxHGSMIBufferAlloc(pCtx, 463 471 sizeof(VBVACONF32), HGSMI_CH_VBVA, 464 472 VBVA_QUERY_CONF32); … … 475 483 } 476 484 /* Free the IO buffer. */ 477 HGSMIHeapFree(&pCtx->heapCtx, p);485 VBoxHGSMIBufferFree(pCtx, p); 478 486 } 479 487 else … … 528 536 } 529 537 /* Allocate the IO buffer. */ 530 p = (VBVAMOUSEPOINTERSHAPE *) HGSMIHeapAlloc(&pCtx->heapCtx,538 p = (VBVAMOUSEPOINTERSHAPE *)VBoxHGSMIBufferAlloc(pCtx, 531 539 sizeof(VBVAMOUSEPOINTERSHAPE) 532 540 + cbData, … … 551 559 rc = p->i32Result; 552 560 /* Free the IO buffer. */ 553 HGSMIHeapFree(&pCtx->heapCtx, p);561 VBoxHGSMIBufferFree(pCtx, p); 554 562 } 555 563 else
Note:
See TracChangeset
for help on using the changeset viewer.