28{
44
45 DPRINT(
"EngAlphaBlend(psoDest:0x%p, psoSource:0x%p, ClipRegion:0x%p, ColorTranslation:0x%p,\n", psoDest, psoSource, ClipRegion, ColorTranslation);
46 DPRINT(
" DestRect:{0x%x, 0x%x, 0x%x, 0x%x}, SourceRect:{0x%x, 0x%x, 0x%x, 0x%x},\n",
47 DestRect->left, DestRect->top, DestRect->right, DestRect->bottom,
48 SourceRect->left, SourceRect->top, SourceRect->right, SourceRect->bottom);
49 DPRINT(
" BlendObj:{0x%x, 0x%x, 0x%x, 0x%x}\n", BlendObj->BlendFunction.BlendOp,
50 BlendObj->BlendFunction.BlendFlags, BlendObj->BlendFunction.SourceConstantAlpha,
51 BlendObj->BlendFunction.AlphaFormat);
52
53
54 OutputRect = *DestRect;
56
57
58 InputRect = *SourceRect;
60 if ( (InputRect.
top < 0) || (InputRect.
bottom < 0) ||
61 (InputRect.
left < 0) || (InputRect.
right < 0) ||
62 InputRect.
right > psoSource->sizlBitmap.cx ||
63 InputRect.
bottom > psoSource->sizlBitmap.cy )
64 {
67 }
68
69 if (psoDest == psoSource &&
70 !(OutputRect.
left >= SourceRect->right || InputRect.
left >= OutputRect.
right ||
71 OutputRect.
top >= SourceRect->bottom || InputRect.
top >= OutputRect.
bottom))
72 {
73 DPRINT1(
"Source and destination rectangles overlap!\n");
75 }
76
78 {
79 DPRINT1(
"BlendOp != AC_SRC_OVER (0x%x)\n", BlendObj->BlendFunction.BlendOp);
81 }
82 if (BlendObj->BlendFunction.BlendFlags != 0)
83 {
84 DPRINT1(
"BlendFlags != 0 (0x%x)\n", BlendObj->BlendFunction.BlendFlags);
86 }
87 if ((BlendObj->BlendFunction.AlphaFormat & ~
AC_SRC_ALPHA) != 0)
88 {
89 DPRINT1(
"Unsupported AlphaFormat (0x%x)\n", BlendObj->BlendFunction.AlphaFormat);
91 }
92
93
94 if (ClipRegion !=
NULL &&
95 (ClipRegion->rclBounds.left >= ClipRegion->rclBounds.right ||
96 ClipRegion->rclBounds.top >= ClipRegion->rclBounds.bottom))
97 {
98
100 }
101
102
103 if (!
IntEngEnter(&EnterLeaveSource, psoSource, &InputRect,
TRUE, &Translate, &InputObj))
104 {
106 }
107 InputRect.
left += Translate.
x;
108 InputRect.
right += Translate.
x;
109 InputRect.
top += Translate.
y;
110 InputRect.
bottom += Translate.
y;
111
112 if (!
IntEngEnter(&EnterLeaveDest, psoDest, &OutputRect,
FALSE, &Translate, &OutputObj))
113 {
116 }
117 OutputRect.
left += Translate.
x;
118 OutputRect.
right += Translate.
x;
119 OutputRect.
top += Translate.
y;
120 OutputRect.
bottom += Translate.
y;
121
123
125 ClippingType = (ClipRegion ==
NULL) ?
DC_TRIVIAL : ClipRegion->iDComplexity;
127 {
130 OutputObj, InputObj, &OutputRect, &InputRect, ClipRegion, ColorTranslation, BlendObj);
131 break;
132
135 ClipRect.
left = ClipRegion->rclBounds.left + Translate.
x;
136 ClipRect.
right = ClipRegion->rclBounds.right + Translate.
x;
137 ClipRect.
top = ClipRegion->rclBounds.top + Translate.
y;
138 ClipRect.
bottom = ClipRegion->rclBounds.bottom + Translate.
y;
140 {
141
146
147
149 OutputObj, InputObj, &CombinedRect, &
Rect, ClipRegion, ColorTranslation, BlendObj);
150 }
151 break;
152
156 do
157 {
160
161 for (
i = 0;
i < RectEnum.
c;
i++)
162 {
168 {
169
174
175
177 OutputObj, InputObj, &CombinedRect, &
Rect, ClipRegion, ColorTranslation, BlendObj) && Ret;
178 }
179 }
180 }
181 while (EnumMore);
182 break;
183
184 default:
187 break;
188 }
189
192
193 return Ret;
194}
#define ERROR_INVALID_PARAMETER
BOOL APIENTRY IntEngEnter(PINTENG_ENTER_LEAVE EnterLeave, SURFOBJ *psoDest, RECTL *DestRect, BOOL ReadOnly, POINTL *Translate, SURFOBJ **ppsoOutput)
BOOL APIENTRY IntEngLeave(PINTENG_ENTER_LEAVE EnterLeave)
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
PFN_DIB_AlphaBlend DIB_AlphaBlend
RECTL arcl[ENUM_RECT_LIMIT]
DIB_FUNCTIONS DibFunctionsForBitmapFormat[]
VOID FASTCALL RECTL_vMakeWellOrdered(_Inout_ RECTL *prcl)
BOOL FASTCALL RECTL_bIntersectRect(_Out_ RECTL *prclDst, _In_ const RECTL *prcl1, _In_ const RECTL *prcl2)
ENGAPI BOOL APIENTRY CLIPOBJ_bEnum(_In_ CLIPOBJ *pco, _In_ ULONG cj, _Out_bytecap_(cj) ULONG *pul)
ENGAPI ULONG APIENTRY CLIPOBJ_cEnumStart(_Inout_ CLIPOBJ *pco, _In_ BOOL bAll, _In_ ULONG iType, _In_ ULONG iDirection, _In_ ULONG cLimit)
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)