1 /* 2 * COPYRIGHT: See COPYING in the top level directory 3 * PROJECT: ReactOS kernel 4 * PURPOSE: Native DirectDraw implementation 5 * FILE: win32ss/reactx/ntddraw/mocomp.c 6 * PROGRAMER: Magnus Olsen (magnus@greatlord.com) 7 * REVISION HISTORY: 8 * 19/1-2006 Magnus Olsen 9 */ 10 11 #include <win32k.h> 12 13 // #define NDEBUG 14 #include <debug.h> 15 16 /************************************************************************/ 17 /* NtGdiDdBeginMoCompFrame */ 18 /************************************************************************/ 19 DWORD 20 APIENTRY 21 NtGdiDdBeginMoCompFrame(HANDLE hMoComp, 22 PDD_BEGINMOCOMPFRAMEDATA puBeginFrameData) 23 { 24 PGD_DDBEGINMOCOMPFRAME pfnDdBeginMoCompFrame = (PGD_DDBEGINMOCOMPFRAME)gpDxFuncs[DXG_INDEX_DxDdBeginMoCompFrame].pfn; 25 26 if (pfnDdBeginMoCompFrame == NULL) 27 { 28 DPRINT1("Warning: no pfnDdBeginMoCompFrame\n"); 29 return DDHAL_DRIVER_NOTHANDLED; 30 } 31 32 DPRINT("Calling dxg.sys pfnDdBeginMoCompFrame\n"); 33 return pfnDdBeginMoCompFrame(hMoComp,puBeginFrameData); 34 } 35 36 /************************************************************************/ 37 /* NtGdiDdCreateMoComp */ 38 /************************************************************************/ 39 HANDLE 40 APIENTRY 41 NtGdiDdCreateMoComp(HANDLE hDirectDraw, PDD_CREATEMOCOMPDATA puCreateMoCompData) 42 { 43 PGD_DXDDCREATEMOCOMP pfnDdCreateMoComp = (PGD_DXDDCREATEMOCOMP)gpDxFuncs[DXG_INDEX_DxDdCreateMoComp].pfn; 44 45 if (pfnDdCreateMoComp == NULL) 46 { 47 DPRINT1("Warning: no pfnDdCreateMoComp\n"); 48 return DDHAL_DRIVER_NOTHANDLED; 49 } 50 51 DPRINT("Calling dxg.sys pfnDdCreateMoComp\n"); 52 return pfnDdCreateMoComp(hDirectDraw, puCreateMoCompData); 53 } 54 55 /************************************************************************/ 56 /* NtGdiDdDestroyMoComp */ 57 /************************************************************************/ 58 DWORD 59 APIENTRY 60 NtGdiDdDestroyMoComp(HANDLE hMoComp, 61 PDD_DESTROYMOCOMPDATA puBeginFrameData) 62 { 63 PGD_DXDDDESTROYMOCOMP pfnDdDestroyMoComp = 64 (PGD_DXDDDESTROYMOCOMP)gpDxFuncs[DXG_INDEX_DxDdDestroyMoComp].pfn; 65 66 if (pfnDdDestroyMoComp == NULL) 67 { 68 DPRINT1("Warning: no pfnDdDestroyMoComp\n"); 69 return DDHAL_DRIVER_NOTHANDLED; 70 } 71 72 DPRINT("Calling dxg.sys pfnDdDestroyMoComp\n"); 73 return pfnDdDestroyMoComp(hMoComp, puBeginFrameData); 74 } 75 76 /************************************************************************/ 77 /* NtGdiDdEndMoCompFrame */ 78 /************************************************************************/ 79 DWORD 80 APIENTRY 81 NtGdiDdEndMoCompFrame(HANDLE hMoComp, 82 PDD_ENDMOCOMPFRAMEDATA puEndFrameData) 83 { 84 PGD_DXDDENDMOCOMPFRAME pfnDdEndMoCompFrame = (PGD_DXDDENDMOCOMPFRAME)gpDxFuncs[DXG_INDEX_DxDdEndMoCompFrame].pfn; 85 86 if (pfnDdEndMoCompFrame == NULL) 87 { 88 DPRINT1("Warning: no pfnDdEndMoCompFrame\n"); 89 return DDHAL_DRIVER_NOTHANDLED; 90 } 91 92 DPRINT("Calling dxg.sys pfnDdEndMoCompFrame\n"); 93 return pfnDdEndMoCompFrame(hMoComp, puEndFrameData); 94 } 95 96 /************************************************************************/ 97 /* NtGdiDdGetInternalMoCompInfo */ 98 /************************************************************************/ 99 DWORD 100 APIENTRY 101 NtGdiDdGetInternalMoCompInfo(HANDLE hDirectDraw, 102 PDD_GETINTERNALMOCOMPDATA puGetInternalData) 103 { 104 PGD_DXDDGETINTERNALMOCOMPINFO pfnDdGetInternalMoCompInfo = (PGD_DXDDGETINTERNALMOCOMPINFO)gpDxFuncs[DXG_INDEX_DxDdGetInternalMoCompInfo].pfn; 105 106 if (pfnDdGetInternalMoCompInfo == NULL) 107 { 108 DPRINT1("Warning: no pfnDdGetInternalMoCompInfo\n"); 109 return DDHAL_DRIVER_NOTHANDLED; 110 } 111 112 DPRINT("Calling dxg.sys pfnDdGetInternalMoCompInfo\n"); 113 return pfnDdGetInternalMoCompInfo(hDirectDraw, puGetInternalData); 114 } 115 116 /************************************************************************/ 117 /* NtGdiDdGetMoCompBuffInfo */ 118 /************************************************************************/ 119 DWORD 120 APIENTRY 121 NtGdiDdGetMoCompBuffInfo(HANDLE hDirectDraw, 122 PDD_GETMOCOMPCOMPBUFFDATA puGetBuffData) 123 { 124 PGD_DXDDGETMOCOMPBUFFINFO pfnDdGetMoCompBuffInfo = (PGD_DXDDGETMOCOMPBUFFINFO)gpDxFuncs[DXG_INDEX_DxDdGetMoCompBuffInfo].pfn; 125 126 if (pfnDdGetMoCompBuffInfo == NULL) 127 { 128 DPRINT1("Warning: no pfnDdGetMoCompBuffInfo\n"); 129 return DDHAL_DRIVER_NOTHANDLED; 130 } 131 132 DPRINT("Calling dxg.sys pfnDdGetMoCompBuffInfo\n"); 133 return pfnDdGetMoCompBuffInfo(hDirectDraw, puGetBuffData); 134 } 135 136 /************************************************************************/ 137 /* NtGdiDdGetMoCompFormats */ 138 /************************************************************************/ 139 DWORD 140 APIENTRY 141 NtGdiDdGetMoCompFormats(HANDLE hDirectDraw, 142 PDD_GETMOCOMPFORMATSDATA puGetMoCompFormatsData) 143 { 144 PGD_DXDDGETMOCOMPFORMATS pfnDdGetMoCompFormats = (PGD_DXDDGETMOCOMPFORMATS)gpDxFuncs[DXG_INDEX_DxDdGetMoCompFormats].pfn; 145 146 if (pfnDdGetMoCompFormats == NULL) 147 { 148 DPRINT1("Warning: no pfnDdGetMoCompFormats\n"); 149 return DDHAL_DRIVER_NOTHANDLED; 150 } 151 152 DPRINT("Calling dxg.sys pfnDdGetMoCompFormats\n"); 153 return pfnDdGetMoCompFormats(hDirectDraw, puGetMoCompFormatsData); 154 } 155 156 /************************************************************************/ 157 /* NtGdiDdGetMoCompGuids */ 158 /************************************************************************/ 159 DWORD 160 APIENTRY 161 NtGdiDdGetMoCompGuids(HANDLE hDirectDraw, 162 PDD_GETMOCOMPGUIDSDATA puGetMoCompGuidsData) 163 { 164 PGD_DXDDGETMOCOMPGUIDS pfnDdGetMoCompGuids = (PGD_DXDDGETMOCOMPGUIDS)gpDxFuncs[DXG_INDEX_DxDdGetMoCompGuids].pfn; 165 166 if (pfnDdGetMoCompGuids == NULL) 167 { 168 DPRINT1("Warning: no pfnDdGetMoCompGuids\n"); 169 return DDHAL_DRIVER_NOTHANDLED; 170 } 171 172 DPRINT("Calling dxg.sys pfnDdGetMoCompGuids\n"); 173 return pfnDdGetMoCompGuids(hDirectDraw, puGetMoCompGuidsData); 174 } 175 176 /************************************************************************/ 177 /* NtGdiDdQueryMoCompStatus */ 178 /************************************************************************/ 179 DWORD 180 APIENTRY 181 NtGdiDdQueryMoCompStatus(HANDLE hMoComp, 182 PDD_QUERYMOCOMPSTATUSDATA puQueryMoCompStatusData) 183 { 184 PGD_DXDDQUERYMOCOMPSTATUS pfnDdQueryMoCompStatus = (PGD_DXDDQUERYMOCOMPSTATUS)gpDxFuncs[DXG_INDEX_DxDdQueryMoCompStatus].pfn; 185 186 if (pfnDdQueryMoCompStatus == NULL) 187 { 188 DPRINT1("Warning: no pfnDdQueryMoCompStatus\n"); 189 return DDHAL_DRIVER_NOTHANDLED; 190 } 191 192 DPRINT("Calling dxg.sys pfnDdQueryMoCompStatus\n"); 193 return pfnDdQueryMoCompStatus(hMoComp, puQueryMoCompStatusData); 194 } 195 196 /************************************************************************/ 197 /* NtGdiDdRenderMoComp */ 198 /************************************************************************/ 199 DWORD 200 APIENTRY 201 NtGdiDdRenderMoComp(HANDLE hMoComp, 202 PDD_RENDERMOCOMPDATA puRenderMoCompData) 203 { 204 PGD_DXDDRENDERMOCOMP pfnDdRenderMoComp = (PGD_DXDDRENDERMOCOMP)gpDxFuncs[DXG_INDEX_DxDdRenderMoComp].pfn; 205 206 if (pfnDdRenderMoComp == NULL) 207 { 208 DPRINT1("Warning: no pfnDdRenderMoComp\n"); 209 return DDHAL_DRIVER_NOTHANDLED; 210 } 211 212 DPRINT("Calling dxg.sys pfnDdRenderMoComp\n"); 213 return pfnDdRenderMoComp(hMoComp, puRenderMoCompData); 214 } 215