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)
53 " test $0x03, %%edi\n"
68 :
"%eax",
"%ecx",
"%edi");
79 cc = ((
c & 0xffff) << 16) | (
c & 0xffff);
96#if defined(_M_IX86) && !defined(_MSC_VER)
98 " testl %2, %2" "\n\t"
100 " movl %2, %%ecx" "\n\t"
101 " shrl $2, %2" "\n\t"
102 " andl $3, %%ecx" "\n\t"
105 " movw %%ax, (%0)" "\n\t"
106 " addl %1, %0" "\n\t"
109 " testl %2, %2" "\n\t"
112 " movw %%ax, (%0)" "\n\t"
113 " addl %1, %0" "\n\t"
114 " movw %%ax, (%0)" "\n\t"
115 " addl %1, %0" "\n\t"
116 " movw %%ax, (%0)" "\n\t"
117 " addl %1, %0" "\n\t"
118 " movw %%ax, (%0)" "\n\t"
119 " addl %1, %0" "\n\t"
126 :
"cc",
"memory",
"%ecx");
147 PBYTE SourceBits, DestBits, SourceLine, DestLine;
148 PBYTE SourceBits_4BPP, SourceLine_4BPP;
149 PWORD Source32, Dest32;
151 BOOLEAN bTopToBottom, bLeftToRight;
153 DPRINT(
"DIB_16BPP_BitBltSrcCopy: SrcSurf cx/cy (%d/%d), DestSuft cx/cy (%d/%d) dstRect: (%d,%d)-(%d,%d)\n",
164 DPRINT(
"BltInfo->SourcePoint.x is '%d' & BltInfo->SourcePoint.y is '%d'.\n",
170 DPRINT(
"BPP is '%d/%d' & BltInfo->SourcePoint.x is '%d' & BltInfo->SourcePoint.y is '%d'.\n",
178 DPRINT(
"1BPP Case Selected with DestRect Width of '%d'.\n",
191 for (
j=BltInfo->
DestRect.
top; j<BltInfo->DestRect.bottom;
j++)
208 for (
i = StartLeft;
i < EndRight;
i++)
227 DPRINT(
"4BPP Case Selected with DestRect Width of '%d'.\n",
241 for (
j=BltInfo->
DestRect.
top; j<BltInfo->DestRect.bottom;
j++)
243 SourceLine_4BPP = SourceBits_4BPP;
274 DPRINT(
"8BPP Case Selected with DestRect Width of '%d'.\n",
290 for (
j = BltInfo->
DestRect.
top; j < BltInfo->DestRect.bottom;
j++)
292 SourceBits = SourceLine;
301 for (
i = BltInfo->
DestRect.
left; i < BltInfo->DestRect.right;
i++)
314 DPRINT(
"16BPP Case Selected with DestRect Width of '%d'.\n",
317 DPRINT(
"BMF_16BPP-dstRect: (%d,%d)-(%d,%d) and Width of '%d'.\n",
324 (!bTopToBottom && !bLeftToRight))
326 DPRINT(
"XO_TRIVIAL is TRUE.\n");
335 for (
j = BltInfo->
DestRect.
top; j < BltInfo->DestRect.bottom;
j++)
373 DPRINT(
"XO_TRIVIAL is NOT TRUE.\n");
374 if (!bTopToBottom && !bLeftToRight)
377 DPRINT(
"Flip is None.\n");
386 for (
j = BltInfo->
DestRect.
top; j < BltInfo->DestRect.bottom;
j++)
388 SourceBits = SourceLine;
395 *((
WORD *)SourceBits));
420 SourceBits = SourceLine;
427 *((
WORD *)SourceBits));
443 DPRINT(
"Flip is bLeftToRight.\n");
450 DPRINT1(
"Storage Allocation Failed.\n");
469 Source32 = (
WORD *) SourceBits;
493 TopToBottomDone =
TRUE;
498 DPRINT(
"Flip is bTopToBottom.\n");
505 DPRINT1(
"Storage Allocation Failed.\n");
526 DPRINT(
"Adjusting DestBits for bLeftToRight.\n");
538 SourceBits = DestBits;
546 Source32 = (
WORD *) SourceBits;
551 for (
i = BltInfo->
DestRect.
top; i <= BltInfo->DestRect.bottom - 1;
i++)
563 *Dest32 = store[
Index];
579 DPRINT(
"BMF_24BPP-dstRect: (%d,%d)-(%d,%d) and Width of '%d'.\n",
596 for (
j = BltInfo->
DestRect.
top; j < BltInfo->DestRect.bottom;
j++)
598 SourceBits = SourceLine;
606 for (
i = BltInfo->
DestRect.
left; i < BltInfo->DestRect.right;
i++)
608 xColor = (*(SourceBits + 2) << 0x10) +
609 (*(SourceBits + 1) << 0x08) + (*(SourceBits));
623 DPRINT(
"32BPP Case Selected with DestRect Width of '%d'.\n",
637 for (
j = BltInfo->
DestRect.
top; j < BltInfo->DestRect.bottom;
j++)
639 SourceBits = SourceLine;
648 for (
i = BltInfo->
DestRect.
left; i < BltInfo->DestRect.right;
i++)
663 DPRINT1(
"DIB_16BPP_BitBltSrcCopy: Unhandled Source BPP: %u\n",
680#if defined(_M_IX86) && !defined(_MSC_VER)
688 for (DestY = DestRect->
top; DestY< DestRect->
bottom; DestY++)
694 "test $0x03, %%edi\n\t"
700 "mov %%ebx,%%ecx\n\t"
703 "test $0x01, %%ebx\n\t"
709 :
"%ecx",
"%ebx",
"%edi");
714 for (DestY = DestRect->
top; DestY< DestRect->
bottom; DestY++)
727 LONG RoundedRight,
X,
Y, SourceX = 0, SourceY = 0, wd;
735 DstHeight = DestRect->
bottom - DestRect->
top;
736 DstWidth = DestRect->
right - DestRect->
left;
737 SrcHeight = SourceRect->
bottom - SourceRect->
top;
738 SrcWidth = SourceRect->
right - SourceRect->
left;
740 RoundedRight = DestRect->
right - ((DestRect->
right - DestRect->
left) & 0x1);
742 (DestRect->
left << 1) +
748 SourceY = SourceRect->
top+(
Y - DestRect->
top) * SrcHeight / DstHeight;
749 for(
X = DestRect->
left;
X < RoundedRight;
X += 2, DestBits++, SourceX += 2)
753 SourceX = SourceRect->
left+(
X - DestRect->
left) * SrcWidth / DstWidth;
754 if (SourceX >= 0 && SourceY >= 0 &&
765 SourceX = SourceRect->
left+(
X+1 - DestRect->
left) * SrcWidth / DstWidth;
766 if (SourceX >= 0 && SourceY >= 0 &&
780 if(X < DestRect->
right)
782 SourceX = SourceRect->
left+(
X - DestRect->
left) * SrcWidth / DstWidth;
783 if (SourceX >= 0 && SourceY >= 0 &&
855 INT DstX, DstY, SrcX, SrcY;
862 DPRINT(
"DIB_16BPP_AlphaBlend: srcRect: (%d,%d)-(%d,%d), dstRect: (%d,%d)-(%d,%d)\n",
869 DPRINT1(
"BlendOp != AC_SRC_OVER\n");
885 DPRINT1(
"Source bitmap must be 32bpp when AC_SRC_ALPHA is set\n");
889 if (!ColorTranslation)
891 DPRINT1(
"ColorTranslation must not be NULL!\n");
902 SrcY = SourceRect->
top;
903 DstY = DestRect->
top;
904 while ( DstY < DestRect->
bottom )
906 SrcX = SourceRect->
left;
907 DstX = DestRect->
left;
908 while(DstX < DestRect->
right)
923 SrcPixel32.
col.red >>= 3;
924 SrcPixel32.
col.green >>= 3;
925 SrcPixel32.
col.blue >>= 3;
928 DstPixel16.
col.red =
Clamp5((DstPixel16.
col.red * (31 - Alpha)) / 31 + SrcPixel32.
col.red);
929 DstPixel16.
col.green =
Clamp5((DstPixel16.
col.green * (31 - Alpha)) / 31 + SrcPixel32.
col.green);
930 DstPixel16.
col.blue =
Clamp5((DstPixel16.
col.blue * (31 - Alpha)) / 31 + SrcPixel32.
col.blue);
935 SrcX = SourceRect->
left + ((DstX-DestRect->
left)*(SourceRect->
right - SourceRect->
left))
939 SrcY = SourceRect->
top + ((DstY-DestRect->
top)*(SourceRect->
bottom - SourceRect->
top))
946 UCHAR Alpha6, Alpha5;
948 SrcY = SourceRect->
top;
949 DstY = DestRect->
top;
950 while ( DstY < DestRect->
bottom )
952 SrcX = SourceRect->
left;
953 DstX = DestRect->
left;
954 while(DstX < DestRect->
right)
970 SrcPixel32.
col.red >>= 3;
971 SrcPixel32.
col.green >>= 2;
972 SrcPixel32.
col.blue >>= 3;
975 DstPixel16.
col.red =
Clamp5((DstPixel16.
col.red * (31 - Alpha5)) / 31 + SrcPixel32.
col.red);
976 DstPixel16.
col.green =
Clamp6((DstPixel16.
col.green * (63 - Alpha6)) / 63 + SrcPixel32.
col.green);
977 DstPixel16.
col.blue =
Clamp5((DstPixel16.
col.blue * (31 - Alpha5)) / 31 + SrcPixel32.
col.blue);
982 SrcX = SourceRect->
left + ((DstX-DestRect->
left)*(SourceRect->
right - SourceRect->
left))
986 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::@5084 col
struct NICEPIXEL16_565::@5083 col
struct NICEPIXEL32::@5081 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
_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
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)