1 /* 2 * PROJECT: Win32 subsystem 3 * LICENSE: See COPYING in the top level directory 4 * FILE: win32ss/gdi/dib/dib32bppc.c 5 * PURPOSE: C language equivalents of asm optimised 32bpp functions 6 * PROGRAMMERS: Jason Filby 7 * Magnus Olsen 8 */ 9 10 #include <win32k.h> 11 12 #define NDEBUG 13 #include <debug.h> 14 15 VOID 16 DIB_32BPP_HLine(SURFOBJ *SurfObj, LONG x1, LONG x2, LONG y, ULONG c) 17 { 18 PBYTE byteaddr = (PBYTE)((ULONG_PTR)SurfObj->pvScan0 + y * SurfObj->lDelta); 19 PDWORD addr = (PDWORD)byteaddr + x1; 20 LONG cx = x1; 21 22 while(cx < x2) 23 { 24 *addr = (DWORD)c; 25 ++addr; 26 ++cx; 27 } 28 } 29 30 BOOLEAN 31 DIB_32BPP_ColorFill(SURFOBJ* DestSurface, RECTL* DestRect, ULONG color) 32 { 33 ULONG DestY; 34 35 /* Make WellOrdered by making top < bottom and left < right */ 36 RECTL_vMakeWellOrdered(DestRect); 37 38 for (DestY = DestRect->top; DestY< DestRect->bottom; DestY++) 39 { 40 DIB_32BPP_HLine (DestSurface, DestRect->left, DestRect->right, DestY, color); 41 } 42 43 return TRUE; 44 } 45