Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
3.5 KiB

  1. /*==========================================================================;
  2. *
  3. * Copyright (C) 1994-1999 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: ddheap.h
  6. * Content: Heap manager header file
  7. * History:
  8. * Date By Reason
  9. * ==== == ======
  10. * 03-Feb-98 DrewB Split from ddrawpr.h for user/kernel portability.
  11. *
  12. ***************************************************************************/
  13. #ifndef __DDHEAP_INCLUDED__
  14. #define __DDHEAP_INCLUDED__
  15. #include "dmemmgr.h"
  16. BOOL linVidMemInit( LPVMEMHEAP pvmh, FLATPTR start, FLATPTR end );
  17. void linVidMemFini( LPVMEMHEAP pvmh );
  18. void linVidMemFree( LPVMEMHEAP pvmh, FLATPTR ptr );
  19. FLATPTR linVidMemAlloc( LPVMEMHEAP pvmh, DWORD xsize, DWORD ysize,
  20. LPDWORD lpdwSize, LPSURFACEALIGNMENT lpAlignment,
  21. LPLONG lpNewPitch );
  22. DWORD linVidMemAmountAllocated( LPVMEMHEAP pvmh );
  23. DWORD linVidMemAmountFree( LPVMEMHEAP pvmh );
  24. DWORD linVidMemLargestFree( LPVMEMHEAP pvmh );
  25. BOOL rectVidMemInit( LPVMEMHEAP pvmh, FLATPTR start, DWORD width, DWORD height,
  26. DWORD stride );
  27. void rectVidMemFini( LPVMEMHEAP pvmh );
  28. FLATPTR rectVidMemAlloc( LPVMEMHEAP pvmh, DWORD cxThis, DWORD cyThis,
  29. LPDWORD lpdwSize, LPSURFACEALIGNMENT lpAlignment );
  30. void rectVidMemFree( LPVMEMHEAP pvmh, FLATPTR ptr );
  31. DWORD rectVidMemAmountAllocated( LPVMEMHEAP pvmh );
  32. DWORD rectVidMemAmountFree( LPVMEMHEAP pvmh );
  33. BOOL IsDifferentPixelFormat( LPDDPIXELFORMAT pdpf1, LPDDPIXELFORMAT pdpf2 );
  34. #define DDHA_SKIPRECTANGULARHEAPS 0x0001
  35. #define DDHA_ALLOWNONLOCALMEMORY 0x0002
  36. #define DDHA_ALLOWNONLOCALTEXTURES 0x0004
  37. #define DDHA_USEALTCAPS 0x0008
  38. FLATPTR DdHeapAlloc( DWORD dwNumHeaps,
  39. LPVIDMEM pvmHeaps,
  40. HANDLE hdev,
  41. LPVIDMEMINFO lpVidMemInfo,
  42. DWORD dwWidth,
  43. DWORD dwHeight,
  44. LPDDRAWI_DDRAWSURFACE_LCL lpSurfaceLcl,
  45. DWORD dwFlags,
  46. LPVIDMEM *ppvmHeap,
  47. LPLONG plNewPitch,
  48. LPDWORD pdwNewCaps,
  49. LPDWORD pdwSize);
  50. LPVMEMHEAP WINAPI VidMemInit( DWORD flags, FLATPTR start, FLATPTR end_or_width,
  51. DWORD height, DWORD pitch );
  52. void WINAPI VidMemFini( LPVMEMHEAP pvmh );
  53. DWORD WINAPI VidMemAmountFree( LPVMEMHEAP pvmh );
  54. DWORD WINAPI VidMemAmountAllocated( LPVMEMHEAP pvmh );
  55. DWORD WINAPI VidMemLargestFree( LPVMEMHEAP pvmh );
  56. LPVMEMHEAP WINAPI HeapVidMemInit( LPVIDMEM lpVidMem, DWORD pitch, HANDLE hdev,
  57. LPHEAPALIGNMENT phad);
  58. void WINAPI HeapVidMemFini( LPVIDMEM lpVidMem, HANDLE hdev );
  59. FLATPTR WINAPI HeapVidMemAlloc( LPVIDMEM lpVidMem, DWORD x, DWORD y,
  60. HANDLE hdev, LPSURFACEALIGNMENT lpAlignment,
  61. LPLONG lpNewPitch, LPDWORD pdwSize );
  62. FLATPTR WINAPI DdHeapVidMemAllocAligned(
  63. LPVIDMEM lpVidMem,
  64. DWORD dwWidth,
  65. DWORD dwHeight,
  66. LPSURFACEALIGNMENT lpAlignment ,
  67. LPLONG lpNewPitch );
  68. void WINAPI DdHeapVidMemFree( LPVMEMHEAP pvmh, FLATPTR ptr );
  69. DWORD GetHeapSizeInPages(LPVIDMEM lpVidMem, LONG pitch);
  70. VOID CleanupAgpCommits(LPVIDMEM lpVidMem, HANDLE hdev, EDD_DIRECTDRAW_GLOBAL* peDirectDrawGlobal, int iHeapIndex);
  71. void SwapHeaps(LPVIDMEM pOldVidMem, LPVIDMEM pNewVidMem);
  72. #endif // __DDHEAP_INCLUDED__