mirror of
https://github.com/reactos/reactos.git
synced 2024-07-06 12:45:16 +00:00
[WIN32K]
- Handle the case where we have a masked ROP, but no mask surface in EngBitBlt - Alloc ROPs with a mask in EngPaint Fixes ASSERT when GoogleEarth is launched. svn path=/trunk/; revision=66229
This commit is contained in:
parent
aad6643529
commit
ab543f2e54
|
@ -460,6 +460,19 @@ EngBitBlt(
|
||||||
clippingType = pco->iDComplexity;
|
clippingType = pco->iDComplexity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Check if we need a mask but have no mask surface */
|
||||||
|
if (UsesMask && (psoMask == NULL))
|
||||||
|
{
|
||||||
|
/* Check if the BRUSHOBJ can provide the mask */
|
||||||
|
psoMask = BRUSHOBJ_psoMask(pbo);
|
||||||
|
if (psoMask == NULL)
|
||||||
|
{
|
||||||
|
/* We have no mask, assume the mask is all foreground */
|
||||||
|
rop4 &= (rop4 & 0xFF) || ((rop4 & 0xFF) << 8);
|
||||||
|
UsesMask = FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (UsesMask)
|
if (UsesMask)
|
||||||
{
|
{
|
||||||
BltRectFunc = BltMask;
|
BltRectFunc = BltMask;
|
||||||
|
|
|
@ -210,7 +210,7 @@ EngBitBlt(
|
||||||
if (ROP4_USES_PATTERN(rop4))
|
if (ROP4_USES_PATTERN(rop4))
|
||||||
{
|
{
|
||||||
/* Must have a brush */
|
/* Must have a brush */
|
||||||
ASSERT(pbo); // FIXME: test this!
|
NT_ASSERT(pbo); // FIXME: test this!
|
||||||
|
|
||||||
/* Copy the solid color */
|
/* Copy the solid color */
|
||||||
bltdata.ulSolidColor = pbo->iSolidColor;
|
bltdata.ulSolidColor = pbo->iSolidColor;
|
||||||
|
@ -253,12 +253,23 @@ EngBitBlt(
|
||||||
/* Check if the ROP uses a mask */
|
/* Check if the ROP uses a mask */
|
||||||
if (ROP4_USES_MASK(rop4))
|
if (ROP4_USES_MASK(rop4))
|
||||||
{
|
{
|
||||||
/* Must have a mask surface and point */
|
|
||||||
ASSERT(psoMask);
|
|
||||||
ASSERT(pptlMask);
|
|
||||||
|
|
||||||
//__debugbreak();
|
//__debugbreak();
|
||||||
|
|
||||||
|
/* Check if we don't have a mask surface */
|
||||||
|
if (psoMask == NULL)
|
||||||
|
{
|
||||||
|
/* Must have a brush */
|
||||||
|
NT_ASSERT(pbo); // FIXME: test this!
|
||||||
|
|
||||||
|
/* Check if the BRUSHOBJ can provide the mask */
|
||||||
|
psoMask = BRUSHOBJ_psoMask(pbo);
|
||||||
|
if (psoMask == NULL)
|
||||||
|
{
|
||||||
|
/* We have no mask, assume the mask is all foreground */
|
||||||
|
rop4 = (rop4 & 0xFF) || ((rop4 & 0xFF) << 8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Set the mask format info */
|
/* Set the mask format info */
|
||||||
bltdata.siMsk.iFormat = psoMask->iBitmapFormat;
|
bltdata.siMsk.iFormat = psoMask->iBitmapFormat;
|
||||||
bltdata.siMsk.pvScan0 = psoMask->pvScan0;
|
bltdata.siMsk.pvScan0 = psoMask->pvScan0;
|
||||||
|
|
|
@ -63,9 +63,8 @@ EngPaint(
|
||||||
/* Convert the MIX, consisting of 2 ROP2 codes into a ROP4 */
|
/* Convert the MIX, consisting of 2 ROP2 codes into a ROP4 */
|
||||||
rop4 = MIX_TO_ROP4(mix);
|
rop4 = MIX_TO_ROP4(mix);
|
||||||
|
|
||||||
/* Sanity checks */
|
/* Sanity check */
|
||||||
NT_ASSERT(!ROP4_USES_SOURCE(rop4));
|
NT_ASSERT(!ROP4_USES_SOURCE(rop4));
|
||||||
NT_ASSERT(!ROP4_USES_MASK(rop4));
|
|
||||||
|
|
||||||
/* Forward the call to Eng/DrvBitBlt */
|
/* Forward the call to Eng/DrvBitBlt */
|
||||||
return IntEngBitBlt(pso,
|
return IntEngBitBlt(pso,
|
||||||
|
|
Loading…
Reference in a new issue