5 static void SetupSurface(SURFOBJ
* surface
, RECTL
* rect
)
12 RtlZeroMemory(surface
, sizeof(SURFOBJ
));
13 depth
= BitsPerFormat(BMF_24BPP
);
14 sizex
= rect
->right
- rect
->left
;
15 sizey
= rect
->bottom
- rect
->top
;
16 size
= sizey
* sizex
* depth
;
17 surface
->pvScan0
= malloc(size
);
18 surface
->lDelta
= DIB_GetDIBWidthBytes(sizex
, depth
);
21 static void CleanupSurface(SURFOBJ
* surface
)
23 free(surface
->pvScan0
);
28 static RECTL rect
= { 0, 0, 100, 100 };
33 SetupSurface(&surface
, &rect
);
34 for (i
= 0; i
< 10000; i
++)
36 BOOLEAN success
= DIB_24BPP_ColorFill(&surface
, &rect
, color
);
41 CleanupSurface(&surface
);
44 _DispatcherType(Dib_24bpp_colorfill_performanceTest
, "DIB_24BPP_ColorFill performance", TT_PERFORMANCE
)