17#define DEC_OR_INC(var, decTrue, amount) \
18 ((var) = (decTrue) ? ((var) - (amount)) : ((var) + (amount)))
62 PBYTE SourceBits, DestBits, SourceLine, DestLine;
63 PBYTE SourceBits_4BPP, SourceLine_4BPP;
64 BOOLEAN bTopToBottom, bLeftToRight;
66 DPRINT(
"DIB_8BPP_BitBltSrcCopy: SrcSurf cx/cy (%d/%d), DestSuft cx/cy (%d/%d) dstRect: (%d,%d)-(%d,%d)\n",
77 DPRINT(
"bTopToBottom is '%d' and bLeftToRight is '%d'.\n", bTopToBottom, bLeftToRight);
82 DPRINT(
"BPP is '%d' & BltInfo->SourcePoint.x is '%d' & BltInfo->SourcePoint.y is '%d'.\n",
90 DPRINT(
"1BPP Case Selected with DestRect Width of '%d'.\n",
104 for (
j=BltInfo->
DestRect.
top; j<BltInfo->DestRect.bottom;
j++)
131 DPRINT(
"4BPP Case Selected with DestRect Width of '%d'.\n",
143 for (
j=BltInfo->
DestRect.
top; j<BltInfo->DestRect.bottom;
j++)
145 SourceLine_4BPP = SourceBits_4BPP;
178 DPRINT(
"8BPP-dstRect: (%d,%d)-(%d,%d) and Width of '%d'.\n",
185 (!bTopToBottom && !bLeftToRight))
189 DPRINT(
"BltInfo->DestRect.top < BltInfo->SourcePoint.y.\n");
191 for (
j = BltInfo->
DestRect.
top; j < BltInfo->DestRect.bottom;
j++)
200 DPRINT(
"BltInfo->DestRect.top >= BltInfo->SourcePoint.y.\n");
213 DPRINT(
"XO_TRIVIAL is NOT TRUE or we have flips.\n");
215 if (!bTopToBottom && !bLeftToRight)
220 DPRINT(
"Dest.top < SourcePoint.y.\n");
223 for (
j = BltInfo->
DestRect.
top; j < BltInfo->DestRect.bottom;
j++)
225 SourceBits = SourceLine;
237 DPRINT(
"Dest.top >= SourcePoint.y.\n");
242 SourceBits = SourceLine;
260 DPRINT(
"Flip is bLeftToRight.\n");
267 DPRINT1(
"Storage Allocation Failed.\n");
283 for (
j = BltInfo->
DestRect.
top; j < BltInfo->DestRect.bottom;
j++)
285 SourceBits = SourceLine;
293 for (
i = BltInfo->
DestRect.
left; i < BltInfo->DestRect.right;
i++)
304 for (
i = BltInfo->
DestRect.
left; i < BltInfo->DestRect.right;
i++)
306 *DestBits = store[
Index];
320 DPRINT(
"Flip is bTopToBottom.\n");
329 DPRINT1(
"Storage Allocation Failed.\n");
360 for (
i = BltInfo->
DestRect.
left; i < BltInfo->DestRect.right;
i++)
364 SourceBits = SourceLine;
369 for (
j = BltInfo->
DestRect.
top; j < BltInfo->DestRect.bottom;
j++)
380 for (
j = BltInfo->
DestRect.
top; j < BltInfo->DestRect.bottom;
j++)
382 *DestBits = store[
Index];
399 DPRINT(
"16BPP Case Selected with DestRect Width of '%d'.\n",
402 DPRINT(
"BMF_16BPP-dstRect: (%d,%d)-(%d,%d) and Width of '%d'.\n",
416 for (
j = BltInfo->
DestRect.
top; j < BltInfo->DestRect.bottom;
j++)
418 SourceBits = SourceLine;
427 for (
i = BltInfo->
DestRect.
left; i < BltInfo->DestRect.right;
i++)
429 xColor = *((
PWORD) SourceBits);
441 DPRINT(
"24BPP-dstRect: (%d,%d)-(%d,%d) and Width of '%d'.\n",
455 for (
j = BltInfo->
DestRect.
top; j < BltInfo->DestRect.bottom;
j++)
457 SourceBits = SourceLine;
466 for (
i = BltInfo->
DestRect.
left; i < BltInfo->DestRect.right;
i++)
468 xColor = (*(SourceBits + 2) << 0x10) +
469 (*(SourceBits + 1) << 0x08) +
481 DPRINT(
"32BPP Case Selected with DestRect Width of '%d'.\n",
493 for (
j = BltInfo->
DestRect.
top; j < BltInfo->DestRect.bottom;
j++)
495 SourceBits = SourceLine;
504 for (
i = BltInfo->
DestRect.
left; i < BltInfo->DestRect.right;
i++)
506 xColor = *((
PDWORD) SourceBits);
534 for (DestY = DestRect->
top; DestY< DestRect->
bottom; DestY++)
547 LONG RoundedRight,
X,
Y, SourceX = 0, SourceY = 0;
555 DstHeight = DestRect->
bottom - DestRect->
top;
556 DstWidth = DestRect->
right - DestRect->
left;
557 SrcHeight = SourceRect->
bottom - SourceRect->
top;
558 SrcWidth = SourceRect->
right - SourceRect->
left;
560 RoundedRight = DestRect->
right - ((DestRect->
right - DestRect->
left) & 0x3);
568 SourceY = SourceRect->
top+(
Y - DestRect->
top) * SrcHeight / DstHeight;
569 for (
X = DestRect->
left;
X < RoundedRight;
X += 4, DestBits++)
573 SourceX = SourceRect->
left+(
X - DestRect->
left) * SrcWidth / DstWidth;
574 if (SourceX >= 0 && SourceY >= 0 &&
585 SourceX = SourceRect->
left+(
X+1 - DestRect->
left) * SrcWidth / DstWidth;
586 if (SourceX >= 0 && SourceY >= 0 &&
597 SourceX = SourceRect->
left+(
X+2 - DestRect->
left) * SrcWidth / DstWidth;
598 if (SourceX >= 0 && SourceY >= 0 &&
609 SourceX = SourceRect->
left+(
X+3 - DestRect->
left) * SrcWidth / DstWidth;
610 if (SourceX >= 0 && SourceY >= 0 &&
624 if(X < DestRect->
right)
626 for (;
X < DestRect->
right;
X++)
628 SourceX = SourceRect->
left+(
X - DestRect->
left) * SrcWidth / DstWidth;
629 if (SourceX >= 0 && SourceY >= 0 &&
ULONG DIB_8BPP_GetPixel(SURFOBJ *SurfObj, LONG x, LONG y)
BOOLEAN DIB_8BPP_BitBltSrcCopy(PBLTINFO BltInfo)
#define DEC_OR_INC(var, decTrue, amount)
BOOLEAN DIB_8BPP_ColorFill(SURFOBJ *DestSurface, RECTL *DestRect, ULONG color)
BOOLEAN DIB_8BPP_TransparentBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, RECTL *DestRect, RECTL *SourceRect, XLATEOBJ *ColorTranslation, ULONG iTransColor)
VOID DIB_8BPP_HLine(SURFOBJ *SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
VOID DIB_8BPP_VLine(SURFOBJ *SurfObj, LONG x, LONG y1, LONG y2, ULONG c)
VOID DIB_8BPP_PutPixel(SURFOBJ *SurfObj, LONG x, LONG y, ULONG c)
#define ExAllocatePoolWithTag(hernya, size, tag)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLenum const GLvoid * addr
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
#define ExFreePoolWithTag(_P, _T)
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
XLATEOBJ * XlateSourceToDest
#define RtlMoveMemory(Destination, Source, Length)
_In_ WDFCOLLECTION _In_ ULONG Index
unsigned char altnotmask[2]
ULONG DIB_1BPP_GetPixel(SURFOBJ *, LONG, LONG)
#define DIB_GetSourceIndex(SourceSurf, sx, sy)
#define BitsPerFormat(Format)
VOID FASTCALL RECTL_vMakeWellOrdered(_Inout_ RECTL *prcl)
_In_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL _In_ RECTL _In_ ULONG iTransColor
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG y1
ENGAPI ULONG APIENTRY XLATEOBJ_iXlate(_In_ XLATEOBJ *pxlo, _In_ ULONG iColor)
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG _In_ LONG y2