- 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:
Timo Kreuzer 2015-02-11 21:34:42 +00:00
parent aad6643529
commit ab543f2e54
3 changed files with 30 additions and 7 deletions

View file

@ -460,6 +460,19 @@ EngBitBlt(
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)
{
BltRectFunc = BltMask;

View file

@ -210,7 +210,7 @@ EngBitBlt(
if (ROP4_USES_PATTERN(rop4))
{
/* Must have a brush */
ASSERT(pbo); // FIXME: test this!
NT_ASSERT(pbo); // FIXME: test this!
/* Copy the solid color */
bltdata.ulSolidColor = pbo->iSolidColor;
@ -253,12 +253,23 @@ EngBitBlt(
/* Check if the ROP uses a mask */
if (ROP4_USES_MASK(rop4))
{
/* Must have a mask surface and point */
ASSERT(psoMask);
ASSERT(pptlMask);
//__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 */
bltdata.siMsk.iFormat = psoMask->iBitmapFormat;
bltdata.siMsk.pvScan0 = psoMask->pvScan0;

View file

@ -63,9 +63,8 @@ EngPaint(
/* Convert the MIX, consisting of 2 ROP2 codes into a ROP4 */
rop4 = MIX_TO_ROP4(mix);
/* Sanity checks */
/* Sanity check */
NT_ASSERT(!ROP4_USES_SOURCE(rop4));
NT_ASSERT(!ROP4_USES_MASK(rop4));
/* Forward the call to Eng/DrvBitBlt */
return IntEngBitBlt(pso,