mirror of
https://github.com/reactos/reactos.git
synced 2024-10-01 23:14:53 +00:00
[WIN32K]
- Use a global trivial CLIPOBJ if a NULL one is passed - Don't pass a pointer to uninitialized memory to DrvBitBlt svn path=/trunk/; revision=57007
This commit is contained in:
parent
1896c7326a
commit
299f58b5fa
|
@ -12,6 +12,12 @@
|
|||
#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,
|
||||
|
@ -590,6 +596,8 @@ IntEngBitBlt(
|
|||
if (pco->iDComplexity == DC_RECT)
|
||||
pco = NULL;
|
||||
}
|
||||
else
|
||||
pco = &gxcoTrivial.ClipObj;
|
||||
|
||||
if (ROP4_USES_SOURCE(Rop4))
|
||||
{
|
||||
|
@ -601,6 +609,7 @@ IntEngBitBlt(
|
|||
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
|
||||
{
|
||||
|
@ -647,7 +656,7 @@ IntEngBitBlt(
|
|||
pco,
|
||||
pxlo,
|
||||
&rclClipped,
|
||||
(POINTL*)&rclSrc,
|
||||
pptlSrc,
|
||||
pptlMask,
|
||||
pbo,
|
||||
pptlBrush ? &ptlBrush : NULL,
|
||||
|
|
|
@ -5,9 +5,12 @@ DBG_DEFAULT_CHANNEL(GdiFont);
|
|||
|
||||
#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
|
||||
|
|
|
@ -75,6 +75,11 @@ typedef struct _CLIPGDI {
|
|||
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;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* PURPOSE: GDI TransparentBlt Function
|
||||
|
@ -226,6 +226,9 @@ IntEngTransparentBlt(SURFOBJ *psoDest,
|
|||
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)
|
||||
{
|
||||
|
@ -241,7 +244,7 @@ IntEngTransparentBlt(SURFOBJ *psoDest,
|
|||
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))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue