#define NDEBUG
#include <debug.h>
+XCLIPOBJ gxcoTrivial =
+{
+ {0, {LONG_MIN, LONG_MIN, LONG_MAX, LONG_MAX}, DC_TRIVIAL, FC_RECT, TC_RECTANGLES, 0},
+ 0, 0, 0
+};
+
typedef BOOLEAN (APIENTRY *PBLTRECTFUNC)(SURFOBJ* OutputObj,
SURFOBJ* InputObj,
SURFOBJ* Mask,
if (pco->iDComplexity == DC_RECT)
pco = NULL;
}
+ else
+ pco = &gxcoTrivial.ClipObj;
if (ROP4_USES_SOURCE(Rop4))
{
rclSrc.top = pptlSrc->y + rclClipped.top - prclTrg->top;
rclSrc.right = rclSrc.left + rclClipped.right - rclClipped.left;
rclSrc.bottom = rclSrc.top + rclClipped.bottom - rclClipped.top;
+ pptlSrc = (PPOINTL)&rclSrc;
}
else
{
pco,
pxlo,
&rclClipped,
- (POINTL*)&rclSrc,
+ pptlSrc,
pptlMask,
pbo,
pptlBrush ? &ptlBrush : NULL,
#define SURFOBJ_flags(pso) (CONTAINING_RECORD(pso, SURFACE, SurfObj)->flags)
-#define XCLIPOBJ CLIPGDI
-
-XCLIPOBJ gxcoTrivial;
+// FIXME this needs to be updated, once we use the new structure
+XCLIPOBJ gxcoTrivial =
+{
+ {0, {LONG_MIN, LONG_MIN, LONG_MAX, LONG_MAX}, DC_TRIVIAL, FC_RECT, TC_RECTANGLES, 0},
+ 0, 0, 0
+};
static
ENUMRECTS EnumRects;
} CLIPGDI, *PCLIPGDI;
+// HACK, until we use the original structure
+#define XCLIPOBJ CLIPGDI
+
+extern XCLIPOBJ gxcoTrivial;
+
/*ei What is this for? */
typedef struct _DRVFUNCTIONSGDI {
HDEV hdev;
-/*
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* PURPOSE: GDI TransparentBlt Function
ASSERT(psurfDest);
ASSERT(psurfSource);
+ /* If no clip object is given, use trivial one */
+ if (!Clip) Clip = &gxcoTrivial.ClipObj;
+
InputClippedRect = *DestRect;
if(InputClippedRect.right < InputClippedRect.left)
{
InputRect = *SourceRect;
/* Clip against the bounds of the clipping region so we won't try to write
* outside the surface */
- if(Clip)
+ if (Clip->iDComplexity != DC_TRIVIAL)
{
if(!RECTL_bIntersectRect(&OutputRect, &InputClippedRect, &Clip->rclBounds))
{