mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
[WIN32K]
- Add a trivial XLATEOBJ as a global variable. - Make sure the XLATEOBJ is not NULL, when calling the diblib code - Remove the IntEngMaskBlt stub, its a very special function for font rendering, keep the old one - Add more driver debug assertions - Remove obsolete definition svn path=/trunk/; revision=56216
This commit is contained in:
parent
a19a8e0fa8
commit
3e88d45a04
5 changed files with 33 additions and 30 deletions
|
@ -1,9 +1,5 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifdef _M_IX86
|
|
||||||
#define memset4(dest, value, count) asm volatile("rep stosl" : : "D"(dest), "a"(value), "c"(count) : "memory");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define ROP4_BLACKNESS ((((0x00000042) >> 8) & 0xff00) | (((0x00000042) >> 16) & 0x00ff))
|
#define ROP4_BLACKNESS ((((0x00000042) >> 8) & 0xff00) | (((0x00000042) >> 16) & 0x00ff))
|
||||||
#define ROP4_NOTSRCERASE ((((0x001100A6) >> 8) & 0xff00) | (((0x001100A6) >> 16) & 0x00ff))
|
#define ROP4_NOTSRCERASE ((((0x001100A6) >> 8) & 0xff00) | (((0x001100A6) >> 16) & 0x00ff))
|
||||||
#define ROP4_NOTSRCCOPY ((((0x00330008) >> 8) & 0xff00) | (((0x00330008) >> 16) & 0x00ff))
|
#define ROP4_NOTSRCCOPY ((((0x00330008) >> 8) & 0xff00) | (((0x00330008) >> 16) & 0x00ff))
|
||||||
|
|
|
@ -98,7 +98,6 @@ EngBitBlt(
|
||||||
RECT_ENUM rcenum;
|
RECT_ENUM rcenum;
|
||||||
PSIZEL psizlPat;
|
PSIZEL psizlPat;
|
||||||
|
|
||||||
__debugbreak();
|
|
||||||
|
|
||||||
ASSERT(psoTrg);
|
ASSERT(psoTrg);
|
||||||
ASSERT(psoTrg->iBitmapFormat >= BMF_1BPP);
|
ASSERT(psoTrg->iBitmapFormat >= BMF_1BPP);
|
||||||
|
@ -112,6 +111,7 @@ __debugbreak();
|
||||||
rcTrg = *prclTrg;
|
rcTrg = *prclTrg;
|
||||||
|
|
||||||
bltdata.rop4 = rop4;
|
bltdata.rop4 = rop4;
|
||||||
|
if (!pxlo) pxlo = &gexloTrivial.xlo;
|
||||||
bltdata.pxlo = pxlo;
|
bltdata.pxlo = pxlo;
|
||||||
bltdata.pfnXlate = XLATEOBJ_pfnXlate(pxlo);
|
bltdata.pfnXlate = XLATEOBJ_pfnXlate(pxlo);
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ __debugbreak();
|
||||||
bltdata.siDst.iFormat = psoTrg->iBitmapFormat;
|
bltdata.siDst.iFormat = psoTrg->iBitmapFormat;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check of the ROP uses a pattern / brush */
|
/* Check if the ROP uses a pattern / brush */
|
||||||
if (ROP4_USES_PATTERN(rop4))
|
if (ROP4_USES_PATTERN(rop4))
|
||||||
{
|
{
|
||||||
/* Must have a brush */
|
/* Must have a brush */
|
||||||
|
@ -213,6 +213,8 @@ __debugbreak();
|
||||||
ASSERT(psoMask);
|
ASSERT(psoMask);
|
||||||
ASSERT(pptlMask);
|
ASSERT(pptlMask);
|
||||||
|
|
||||||
|
__debugbreak();
|
||||||
|
|
||||||
bltdata.siMsk.iFormat = psoMask->iBitmapFormat;
|
bltdata.siMsk.iFormat = psoMask->iBitmapFormat;
|
||||||
bltdata.siMsk.pvScan0 = psoMask->pvScan0;
|
bltdata.siMsk.pvScan0 = psoMask->pvScan0;
|
||||||
bltdata.siMsk.lDelta = psoMask->lDelta;
|
bltdata.siMsk.lDelta = psoMask->lDelta;
|
||||||
|
@ -220,17 +222,21 @@ __debugbreak();
|
||||||
bltdata.apfnDoRop[0] = gapfnRop[ROP4_BKGND(rop4)];
|
bltdata.apfnDoRop[0] = gapfnRop[ROP4_BKGND(rop4)];
|
||||||
bltdata.apfnDoRop[1] = gapfnRop[ROP4_FGND(rop4)];
|
bltdata.apfnDoRop[1] = gapfnRop[ROP4_FGND(rop4)];
|
||||||
|
|
||||||
ASSERT(FALSE);
|
/* Calculate the masking function index */
|
||||||
// get masking function!
|
iFunctionIndex = ROP4_USES_PATTERN(rop4) ? 1 : 0;
|
||||||
pfnBitBlt = 0;
|
iFunctionIndex |= ROP4_USES_SOURCE(rop4) ? 2 : 0;
|
||||||
|
iFunctionIndex |= ROP4_USES_DEST(rop4) ? 4 : 0;
|
||||||
|
|
||||||
|
/* Get the masking function */
|
||||||
|
pfnBitBlt = gapfnMaskFunction[iFunctionIndex];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Get the function index from the foreground ROP index*/
|
/* Get the function index from the foreground ROP index*/
|
||||||
iFunctionIndex = aiIndexPerRop[ROP4_FGND(rop4)];
|
iFunctionIndex = gajIndexPerRop[ROP4_FGND(rop4)];
|
||||||
|
|
||||||
/* Get the dib function */
|
/* Get the dib function */
|
||||||
pfnBitBlt = apfnDibFunction[iFunctionIndex];
|
pfnBitBlt = gapfnDibFunction[iFunctionIndex];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If no clip object is given, use trivial one */
|
/* If no clip object is given, use trivial one */
|
||||||
|
@ -557,20 +563,4 @@ NtGdiEngBitBlt(
|
||||||
return bResult;
|
return bResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL
|
|
||||||
NTAPI
|
|
||||||
IntEngMaskBlt(
|
|
||||||
SURFOBJ *psoDest,
|
|
||||||
SURFOBJ *psoMask,
|
|
||||||
CLIPOBJ *pco,
|
|
||||||
XLATEOBJ *pxloDest,
|
|
||||||
XLATEOBJ *pxloSource,
|
|
||||||
RECTL *DestRect,
|
|
||||||
POINTL *pptlMask,
|
|
||||||
BRUSHOBJ *pbo,
|
|
||||||
POINTL *pptlBrushOrigin)
|
|
||||||
{
|
|
||||||
ASSERT(FALSE);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -307,6 +307,8 @@ DbgDrvBitBlt(
|
||||||
ASSERT(prclTrg->right <= psoTrg->sizlBitmap.cx);
|
ASSERT(prclTrg->right <= psoTrg->sizlBitmap.cx);
|
||||||
ASSERT(prclTrg->bottom <= psoTrg->sizlBitmap.cy);
|
ASSERT(prclTrg->bottom <= psoTrg->sizlBitmap.cy);
|
||||||
ASSERT(RECTL_bIsWellOrdered(prclTrg));
|
ASSERT(RECTL_bIsWellOrdered(prclTrg));
|
||||||
|
ASSERT(pco);
|
||||||
|
ASSERT(pco->iDComplexity != DC_RECT);
|
||||||
|
|
||||||
if (ROP4_USES_SOURCE(rop4))
|
if (ROP4_USES_SOURCE(rop4))
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,13 +14,15 @@
|
||||||
|
|
||||||
/** Globals *******************************************************************/
|
/** Globals *******************************************************************/
|
||||||
|
|
||||||
ULONG giUniqueXlate = 0;
|
EXLATEOBJ gexloTrivial = {{0, XO_TRIVIAL, 0, 0, 0, 0}, EXLATEOBJ_iXlateTrivial};
|
||||||
|
|
||||||
const BYTE gajXlate5to8[32] =
|
static ULONG giUniqueXlate = 0;
|
||||||
|
|
||||||
|
static const BYTE gajXlate5to8[32] =
|
||||||
{ 0, 8, 16, 25, 33, 41, 49, 58, 66, 74, 82, 90, 99,107,115,123,
|
{ 0, 8, 16, 25, 33, 41, 49, 58, 66, 74, 82, 90, 99,107,115,123,
|
||||||
132,140,148,156,165,173,181,189,197,206,214,222,231,239,247,255};
|
132,140,148,156,165,173,181,189,197,206,214,222,231,239,247,255};
|
||||||
|
|
||||||
const BYTE gajXlate6to8[64] =
|
static const BYTE gajXlate6to8[64] =
|
||||||
{ 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 45, 49, 52, 57, 61,
|
{ 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 45, 49, 52, 57, 61,
|
||||||
65, 69, 73, 77, 81, 85, 89, 93, 97,101,105,109,113,117,121,125,
|
65, 69, 73, 77, 81, 85, 89, 93, 97,101,105,109,113,117,121,125,
|
||||||
130,134,138,142,146,150,154,158,162,166,170,174,178,182,186,190,
|
130,134,138,142,146,150,154,158,162,166,170,174,178,182,186,190,
|
||||||
|
|
|
@ -38,6 +38,19 @@ typedef struct _EXLATEOBJ
|
||||||
};
|
};
|
||||||
} EXLATEOBJ, *PEXLATEOBJ;
|
} EXLATEOBJ, *PEXLATEOBJ;
|
||||||
|
|
||||||
|
PFN_XLATE
|
||||||
|
FORCEINLINE
|
||||||
|
XLATEOBJ_pfnXlate(XLATEOBJ *pxlo)
|
||||||
|
{
|
||||||
|
return ((PEXLATEOBJ)pxlo)->pfnXlate;
|
||||||
|
}
|
||||||
|
|
||||||
|
extern EXLATEOBJ gexloTrivial;
|
||||||
|
|
||||||
|
ULONG
|
||||||
|
FASTCALL
|
||||||
|
EXLATEOBJ_iXlateTrivial(PEXLATEOBJ pexlo, ULONG iColor);
|
||||||
|
|
||||||
void
|
void
|
||||||
DbgCmpXlate(XLATEOBJ *pxlo1, XLATEOBJ *pxlo2);
|
DbgCmpXlate(XLATEOBJ *pxlo1, XLATEOBJ *pxlo2);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue