17#define DEC_OR_INC(var, decTrue, amount) \
18 ((var) = (decTrue) ? ((var) - (amount)) : ((var) + (amount)))
34 return (
ULONG)(*addr);
42#if defined(_M_IX86) && !defined(_MSC_VER)
56 " test $0x03, %%edi\n"
71 :
"%eax",
"%ecx",
"%edi");
85 cc = ((
c & 0xffff) << 16) | (
c & 0xffff);
102#if defined(_M_IX86) && !defined(_MSC_VER)
104 " testl %2, %2" "\n\t"
106 " movl %2, %%ecx" "\n\t"
107 " shrl $2, %2" "\n\t"
108 " andl $3, %%ecx" "\n\t"
111 " movw %%ax, (%0)" "\n\t"
112 " addl %1, %0" "\n\t"
115 " testl %2, %2" "\n\t"
118 " movw %%ax, (%0)" "\n\t"
119 " addl %1, %0" "\n\t"
120 " movw %%ax, (%0)" "\n\t"
121 " addl %1, %0" "\n\t"
122 " movw %%ax, (%0)" "\n\t"
123 " addl %1, %0" "\n\t"
124 " movw %%ax, (%0)" "\n\t"
125 " addl %1, %0" "\n\t"
132 :
"cc",
"memory",
"%ecx");
153 PBYTE SourceBits, DestBits, SourceLine, DestLine;
154 PBYTE SourceBits_4BPP, SourceLine_4BPP;
155 PWORD Source32, Dest32;
157 BOOLEAN bTopToBottom, bLeftToRight;
159 DPRINT(
"DIB_16BPP_BitBltSrcCopy: SrcSurf cx/cy (%d/%d), DestSuft cx/cy (%d/%d) dstRect: (%d,%d)-(%d,%d)\n",
170 DPRINT(
"BltInfo->SourcePoint.x is '%d' & BltInfo->SourcePoint.y is '%d'.\n",
176 DPRINT(
"BPP is '%d/%d' & BltInfo->SourcePoint.x is '%d' & BltInfo->SourcePoint.y is '%d'.\n",
184 DPRINT(
"1BPP Case Selected with DestRect Width of '%d'.\n",
197 for (
j=BltInfo->
DestRect.
top; j<BltInfo->DestRect.bottom;
j++)
214 for (
i = StartLeft;
i < EndRight;
i++)
233 DPRINT(
"4BPP Case Selected with DestRect Width of '%d'.\n",
247 for (
j=BltInfo->
DestRect.
top; j<BltInfo->DestRect.bottom;
j++)
249 SourceLine_4BPP = SourceBits_4BPP;
280 DPRINT(
"8BPP Case Selected with DestRect Width of '%d'.\n",
296 for (
j = BltInfo->
DestRect.
top; j < BltInfo->DestRect.bottom;
j++)
298 SourceBits = SourceLine;
307 for (
i = BltInfo->
DestRect.
left; i < BltInfo->DestRect.right;
i++)
320 DPRINT(
"16BPP Case Selected with DestRect Width of '%d'.\n",
323 DPRINT(
"BMF_16BPP-dstRect: (%d,%d)-(%d,%d) and Width of '%d'.\n",
330 (!bTopToBottom && !bLeftToRight))
332 DPRINT(
"XO_TRIVIAL is TRUE.\n");
341 for (
j = BltInfo->
DestRect.
top; j < BltInfo->DestRect.bottom;
j++)
379 DPRINT(
"XO_TRIVIAL is NOT TRUE.\n");
380 if (!bTopToBottom && !bLeftToRight)
383 DPRINT(
"Flip is None.\n");
392 for (
j = BltInfo->
DestRect.
top; j < BltInfo->DestRect.bottom;
j++)
394 SourceBits = SourceLine;
401 *((
WORD *)SourceBits));
426 SourceBits = SourceLine;
433 *((
WORD *)SourceBits));
449 DPRINT(
"Flip is bLeftToRight.\n");
456 DPRINT1(
"Storage Allocation Failed.\n");
475 Source32 = (
WORD *) SourceBits;
499 TopToBottomDone =
TRUE;
504 DPRINT(
"Flip is bTopToBottom.\n");
511 DPRINT1(
"Storage Allocation Failed.\n");
532 DPRINT(
"Adjusting DestBits for bLeftToRight.\n");
544 SourceBits = DestBits;
552 Source32 = (
WORD *) SourceBits;
557 for (
i = BltInfo->
DestRect.
top; i <= BltInfo->DestRect.bottom - 1;
i++)
569 *Dest32 = store[
Index];
585 DPRINT(
"BMF_24BPP-dstRect: (%d,%d)-(%d,%d) and Width of '%d'.\n",
602 for (
j = BltInfo->
DestRect.
top; j < BltInfo->DestRect.bottom;
j++)
604 SourceBits = SourceLine;
612 for (
i = BltInfo->
DestRect.
left; i < BltInfo->DestRect.right;
i++)
614 xColor = (*(SourceBits + 2) << 0x10) +
615 (*(SourceBits + 1) << 0x08) + (*(SourceBits));
629 DPRINT(
"32BPP Case Selected with DestRect Width of '%d'.\n",
643 for (
j = BltInfo->
DestRect.
top; j < BltInfo->DestRect.bottom;
j++)
645 SourceBits = SourceLine;
654 for (
i = BltInfo->
DestRect.
left; i < BltInfo->DestRect.right;
i++)
669 DPRINT1(
"DIB_16BPP_BitBltSrcCopy: Unhandled Source BPP: %u\n",
686#if defined(_M_IX86) && !defined(_MSC_VER)
694 for (DestY = DestRect->
top; DestY< DestRect->
bottom; DestY++)
700 "test $0x03, %%edi\n\t"
706 "mov %%ebx,%%ecx\n\t"
709 "test $0x01, %%ebx\n\t"
715 :
"%ecx",
"%ebx",
"%edi");
720 for (DestY = DestRect->
top; DestY< DestRect->
bottom; DestY++)
733 LONG RoundedRight,
X,
Y, SourceX = 0, SourceY = 0, wd;
741 DstHeight = DestRect->
bottom - DestRect->
top;
742 DstWidth = DestRect->
right - DestRect->
left;
743 SrcHeight = SourceRect->
bottom - SourceRect->
top;
744 SrcWidth = SourceRect->
right - SourceRect->
left;
746 RoundedRight = DestRect->
right - ((DestRect->
right - DestRect->
left) & 0x1);
748 (DestRect->
left << 1) +
754 SourceY = SourceRect->
top+(
Y - DestRect->
top) * SrcHeight / DstHeight;
755 for(
X = DestRect->
left;
X < RoundedRight;
X += 2, DestBits++, SourceX += 2)
759 SourceX = SourceRect->
left+(
X - DestRect->
left) * SrcWidth / DstWidth;
760 if (SourceX >= 0 && SourceY >= 0 &&
771 SourceX = SourceRect->
left+(
X+1 - DestRect->
left) * SrcWidth / DstWidth;
772 if (SourceX >= 0 && SourceY >= 0 &&
786 if(X < DestRect->
right)
788 SourceX = SourceRect->
left+(
X - DestRect->
left) * SrcWidth / DstWidth;
789 if (SourceX >= 0 && SourceY >= 0 &&
861 INT DstX, DstY, SrcX, SrcY;
868 DPRINT(
"DIB_16BPP_AlphaBlend: srcRect: (%d,%d)-(%d,%d), dstRect: (%d,%d)-(%d,%d)\n",
875 DPRINT1(
"BlendOp != AC_SRC_OVER\n");
891 DPRINT1(
"Source bitmap must be 32bpp when AC_SRC_ALPHA is set\n");
895 if (!ColorTranslation)
897 DPRINT1(
"ColorTranslation must not be NULL!\n");
908 SrcY = SourceRect->
top;
909 DstY = DestRect->
top;
910 while ( DstY < DestRect->
bottom )
912 SrcX = SourceRect->
left;
913 DstX = DestRect->
left;
914 while(DstX < DestRect->
right)
929 SrcPixel32.
col.red >>= 3;
930 SrcPixel32.
col.green >>= 3;
931 SrcPixel32.
col.blue >>= 3;
934 DstPixel16.
col.red =
Clamp5((DstPixel16.
col.red * (31 - Alpha)) / 31 + SrcPixel32.
col.red);
935 DstPixel16.
col.green =
Clamp5((DstPixel16.
col.green * (31 - Alpha)) / 31 + SrcPixel32.
col.green);
936 DstPixel16.
col.blue =
Clamp5((DstPixel16.
col.blue * (31 - Alpha)) / 31 + SrcPixel32.
col.blue);
941 SrcX = SourceRect->
left + ((DstX-DestRect->
left)*(SourceRect->
right - SourceRect->
left))
945 SrcY = SourceRect->
top + ((DstY-DestRect->
top)*(SourceRect->
bottom - SourceRect->
top))
952 UCHAR Alpha6, Alpha5;
954 SrcY = SourceRect->
top;
955 DstY = DestRect->
top;
956 while ( DstY < DestRect->
bottom )
958 SrcX = SourceRect->
left;
959 DstX = DestRect->
left;
960 while(DstX < DestRect->
right)
976 SrcPixel32.
col.red >>= 3;
977 SrcPixel32.
col.green >>= 2;
978 SrcPixel32.
col.blue >>= 3;
981 DstPixel16.
col.red =
Clamp5((DstPixel16.
col.red * (31 - Alpha5)) / 31 + SrcPixel32.
col.red);
982 DstPixel16.
col.green =
Clamp6((DstPixel16.
col.green * (63 - Alpha6)) / 63 + SrcPixel32.
col.green);
983 DstPixel16.
col.blue =
Clamp5((DstPixel16.
col.blue * (31 - Alpha5)) / 31 + SrcPixel32.
col.blue);
988 SrcX = SourceRect->
left + ((DstX-DestRect->
left)*(SourceRect->
right - SourceRect->
left))
992 SrcY = SourceRect->
top + ((DstY-DestRect->
top)*(SourceRect->
bottom - SourceRect->
top))
BOOLEAN DIB_16BPP_TransparentBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, RECTL *DestRect, RECTL *SourceRect, XLATEOBJ *ColorTranslation, ULONG iTransColor)
#define DEC_OR_INC(var, decTrue, amount)
VOID DIB_16BPP_PutPixel(SURFOBJ *SurfObj, LONG x, LONG y, ULONG c)
VOID DIB_16BPP_HLine(SURFOBJ *SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
BOOLEAN DIB_16BPP_ColorFill(SURFOBJ *DestSurface, RECTL *DestRect, ULONG color)
ULONG DIB_16BPP_GetPixel(SURFOBJ *SurfObj, LONG x, LONG y)
BOOLEAN DIB_16BPP_AlphaBlend(SURFOBJ *Dest, SURFOBJ *Source, RECTL *DestRect, RECTL *SourceRect, CLIPOBJ *ClipRegion, XLATEOBJ *ColorTranslation, BLENDOBJ *BlendObj)
BOOLEAN DIB_16BPP_BitBltSrcCopy(PBLTINFO BltInfo)
static __inline UCHAR Clamp5(ULONG val)
VOID DIB_16BPP_VLine(SURFOBJ *SurfObj, LONG x, LONG y1, LONG y2, ULONG c)
static __inline UCHAR Clamp6(ULONG val)
static const BLENDFUNCTION BlendFunc
#define ExAllocatePoolWithTag(hernya, size, tag)
GLint GLint GLint GLint GLint x
GLclampf GLclampf GLclampf alpha
GLint GLint GLint GLint GLint GLint y
GLint GLint GLsizei width
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
__asm__(".p2align 4, 0x90\n" ".seh_proc __seh2_global_filter_func\n" "__seh2_global_filter_func:\n" "\tsub %rbp, %rax\n" "\tpush %rbp\n" "\t.seh_pushreg %rbp\n" "\tsub $32, %rsp\n" "\t.seh_stackalloc 32\n" "\t.seh_endprologue\n" "\tsub %rax, %rdx\n" "\tmov %rdx, %rbp\n" "\tjmp *%r8\n" "__seh2_global_filter_func_exit:\n" "\t.p2align 4\n" "\tadd $32, %rsp\n" "\tpop %rbp\n" "\tret\n" "\t.seh_endproc")
BLENDFUNCTION BlendFunction
XLATEOBJ * XlateSourceToDest
#define RtlMoveMemory(Destination, Source, Length)
#define CONTAINING_RECORD(address, type, field)
struct NICEPIXEL16_555::@5409 col
struct NICEPIXEL16_565::@5408 col
struct NICEPIXEL32::@5406 col
_In_ WDFCOLLECTION _In_ ULONG Index
unsigned char altnotmask[2]
#define DIB_GetSource(SourceSurf, sx, sy, ColorTranslation)
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
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 y1
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG _In_ LONG y2
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
VOID NTAPI EXLATEOBJ_vInitialize(_Out_ PEXLATEOBJ pexlo, _In_opt_ PALETTE *ppalSrc, _In_opt_ PALETTE *ppalDst, _In_ COLORREF crSrcBackColor, _In_ COLORREF crDstBackColor, _In_ COLORREF crDstForeColor)
VOID NTAPI EXLATEOBJ_vCleanup(_Inout_ PEXLATEOBJ pexlo)