2007-10-19 23:21:45 +00:00
|
|
|
/*
|
2009-08-02 15:49:17 +00:00
|
|
|
* PROJECT: Win32 subsystem
|
|
|
|
* LICENSE: See COPYING in the top level directory
|
2015-11-10 17:41:55 +00:00
|
|
|
* FILE: win32ss/gdi/dib/dib32bppc.c
|
2009-08-02 15:49:17 +00:00
|
|
|
* PURPOSE: C language equivalents of asm optimised 32bpp functions
|
|
|
|
* PROGRAMMERS: Jason Filby
|
|
|
|
* Magnus Olsen
|
2006-08-26 23:26:39 +00:00
|
|
|
*/
|
|
|
|
|
2010-04-26 13:58:46 +00:00
|
|
|
#include <win32k.h>
|
2006-08-26 23:26:39 +00:00
|
|
|
|
|
|
|
#define NDEBUG
|
|
|
|
#include <debug.h>
|
|
|
|
|
|
|
|
VOID
|
|
|
|
DIB_32BPP_HLine(SURFOBJ *SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
|
|
|
|
{
|
2009-08-02 15:49:17 +00:00
|
|
|
PBYTE byteaddr = (PBYTE)((ULONG_PTR)SurfObj->pvScan0 + y * SurfObj->lDelta);
|
|
|
|
PDWORD addr = (PDWORD)byteaddr + x1;
|
|
|
|
LONG cx = x1;
|
2007-09-02 16:33:00 +00:00
|
|
|
|
2009-08-02 15:49:17 +00:00
|
|
|
while(cx < x2)
|
|
|
|
{
|
|
|
|
*addr = (DWORD)c;
|
|
|
|
++addr;
|
|
|
|
++cx;
|
|
|
|
}
|
2006-08-26 23:26:39 +00:00
|
|
|
}
|
|
|
|
|
2007-10-19 23:21:45 +00:00
|
|
|
BOOLEAN
|
2006-08-26 23:26:39 +00:00
|
|
|
DIB_32BPP_ColorFill(SURFOBJ* DestSurface, RECTL* DestRect, ULONG color)
|
2007-09-02 16:33:00 +00:00
|
|
|
{
|
2009-08-02 15:49:17 +00:00
|
|
|
ULONG DestY;
|
2006-08-26 23:26:39 +00:00
|
|
|
|
2009-08-02 15:49:17 +00:00
|
|
|
for (DestY = DestRect->top; DestY< DestRect->bottom; DestY++)
|
|
|
|
{
|
|
|
|
DIB_32BPP_HLine (DestSurface, DestRect->left, DestRect->right, DestY, color);
|
|
|
|
}
|
2006-08-26 23:26:39 +00:00
|
|
|
|
2009-08-02 15:49:17 +00:00
|
|
|
return TRUE;
|
2007-09-02 16:33:00 +00:00
|
|
|
}
|