mirror of
https://github.com/reactos/reactos.git
synced 2025-05-30 22:49:12 +00:00
[WIN32SS] Use the DCFLAGS and DCTYPE flags defined in ntgdi/dc.h instead of the old ones in include/ntgdihdl.h
The names of these new flags match the documented ones at https://reactos.org/wiki/Techwiki:Win32k/DC https://books.google.hr/books?id=-O92IIF1Bj4C&pg=PA197&lpg=PA197 and the gdikdx debug extension.
This commit is contained in:
parent
1c2b757a64
commit
5e93daa9ce
14 changed files with 54 additions and 76 deletions
|
@ -61,7 +61,7 @@ NtGdiAlphaBlend(
|
||||||
DCDest = apObj[0];
|
DCDest = apObj[0];
|
||||||
DCSrc = apObj[1];
|
DCSrc = apObj[1];
|
||||||
|
|
||||||
if (DCDest->dctype == DC_TYPE_INFO || DCDest->dctype == DCTYPE_INFO)
|
if (DCDest->dctype == DCTYPE_INFO || DCDest->dctype == DCTYPE_INFO)
|
||||||
{
|
{
|
||||||
GDIOBJ_vUnlockObject(&DCSrc->BaseObject);
|
GDIOBJ_vUnlockObject(&DCSrc->BaseObject);
|
||||||
GDIOBJ_vUnlockObject(&DCDest->BaseObject);
|
GDIOBJ_vUnlockObject(&DCDest->BaseObject);
|
||||||
|
@ -239,7 +239,7 @@ NtGdiTransparentBlt(
|
||||||
DCDest = apObj[0];
|
DCDest = apObj[0];
|
||||||
DCSrc = apObj[1];
|
DCSrc = apObj[1];
|
||||||
|
|
||||||
if (DCDest->dctype == DC_TYPE_INFO || DCDest->dctype == DCTYPE_INFO)
|
if (DCDest->dctype == DCTYPE_INFO || DCDest->dctype == DCTYPE_INFO)
|
||||||
{
|
{
|
||||||
GDIOBJ_vUnlockObject(&DCSrc->BaseObject);
|
GDIOBJ_vUnlockObject(&DCSrc->BaseObject);
|
||||||
GDIOBJ_vUnlockObject(&DCDest->BaseObject);
|
GDIOBJ_vUnlockObject(&DCDest->BaseObject);
|
||||||
|
@ -401,7 +401,7 @@ NtGdiMaskBlt(
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DCDest->dctype == DC_TYPE_INFO)
|
if (DCDest->dctype == DCTYPE_INFO)
|
||||||
{
|
{
|
||||||
if(DCSrc) DC_UnlockDc(DCSrc);
|
if(DCSrc) DC_UnlockDc(DCSrc);
|
||||||
DC_UnlockDc(DCDest);
|
DC_UnlockDc(DCDest);
|
||||||
|
@ -413,7 +413,7 @@ NtGdiMaskBlt(
|
||||||
if (UsesSource)
|
if (UsesSource)
|
||||||
{
|
{
|
||||||
ASSERT(DCSrc);
|
ASSERT(DCSrc);
|
||||||
if (DCSrc->dctype == DC_TYPE_INFO)
|
if (DCSrc->dctype == DCTYPE_INFO)
|
||||||
{
|
{
|
||||||
DC_UnlockDc(DCDest);
|
DC_UnlockDc(DCDest);
|
||||||
DC_UnlockDc(DCSrc);
|
DC_UnlockDc(DCSrc);
|
||||||
|
@ -624,7 +624,7 @@ GreStretchBltMask(
|
||||||
DCSrc = apObj[1];
|
DCSrc = apObj[1];
|
||||||
DCMask = apObj[2];
|
DCMask = apObj[2];
|
||||||
|
|
||||||
if (DCDest->dctype == DC_TYPE_INFO)
|
if (DCDest->dctype == DCTYPE_INFO)
|
||||||
{
|
{
|
||||||
if(DCSrc) GDIOBJ_vUnlockObject(&DCSrc->BaseObject);
|
if(DCSrc) GDIOBJ_vUnlockObject(&DCSrc->BaseObject);
|
||||||
if(DCMask) GDIOBJ_vUnlockObject(&DCMask->BaseObject);
|
if(DCMask) GDIOBJ_vUnlockObject(&DCMask->BaseObject);
|
||||||
|
@ -635,7 +635,7 @@ GreStretchBltMask(
|
||||||
|
|
||||||
if (UsesSource)
|
if (UsesSource)
|
||||||
{
|
{
|
||||||
if (DCSrc->dctype == DC_TYPE_INFO)
|
if (DCSrc->dctype == DCTYPE_INFO)
|
||||||
{
|
{
|
||||||
GDIOBJ_vUnlockObject(&DCDest->BaseObject);
|
GDIOBJ_vUnlockObject(&DCDest->BaseObject);
|
||||||
GDIOBJ_vUnlockObject(&DCSrc->BaseObject);
|
GDIOBJ_vUnlockObject(&DCSrc->BaseObject);
|
||||||
|
@ -941,7 +941,7 @@ IntGdiPolyPatBlt(
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pdc->dctype == DC_TYPE_INFO)
|
if (pdc->dctype == DCTYPE_INFO)
|
||||||
{
|
{
|
||||||
DC_UnlockDc(pdc);
|
DC_UnlockDc(pdc);
|
||||||
/* Yes, Windows really returns TRUE in this case */
|
/* Yes, Windows really returns TRUE in this case */
|
||||||
|
|
|
@ -286,7 +286,7 @@ IntCreateCompatibleBitmap(
|
||||||
return NtGdiGetStockObject(DEFAULT_BITMAP);
|
return NtGdiGetStockObject(DEFAULT_BITMAP);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Dc->dctype != DC_TYPE_MEMORY)
|
if (Dc->dctype != DCTYPE_MEMORY)
|
||||||
{
|
{
|
||||||
PSURFACE psurf;
|
PSURFACE psurf;
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ IntGdiReleaseRaoRgn(PDC pDC)
|
||||||
{
|
{
|
||||||
INT Index = GDI_HANDLE_GET_INDEX(pDC->BaseObject.hHmgr);
|
INT Index = GDI_HANDLE_GET_INDEX(pDC->BaseObject.hHmgr);
|
||||||
PGDI_TABLE_ENTRY Entry = &GdiHandleTable->Entries[Index];
|
PGDI_TABLE_ENTRY Entry = &GdiHandleTable->Entries[Index];
|
||||||
pDC->fs |= DC_FLAG_DIRTY_RAO;
|
pDC->fs |= DC_DIRTY_RAO;
|
||||||
Entry->Flags |= GDI_ENTRY_VALIDATE_VIS; // Need to validate Vis.
|
Entry->Flags |= GDI_ENTRY_VALIDATE_VIS; // Need to validate Vis.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ GdiSelectVisRgn(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
dc->fs |= DC_FLAG_DIRTY_RAO;
|
dc->fs |= DC_DIRTY_RAO;
|
||||||
|
|
||||||
ASSERT(dc->prgnVis != NULL);
|
ASSERT(dc->prgnVis != NULL);
|
||||||
ASSERT(prgn != NULL);
|
ASSERT(prgn != NULL);
|
||||||
|
@ -234,7 +234,7 @@ IntGdiExtSelectClipRect(
|
||||||
{
|
{
|
||||||
Ret = IntSelectClipRgn( dc, NULL, RGN_COPY);
|
Ret = IntSelectClipRgn( dc, NULL, RGN_COPY);
|
||||||
|
|
||||||
if (dc->fs & DC_FLAG_DIRTY_RAO)
|
if (dc->fs & DC_DIRTY_RAO)
|
||||||
CLIPPING_UpdateGCRegion(dc);
|
CLIPPING_UpdateGCRegion(dc);
|
||||||
|
|
||||||
if (Ret) // Copy? Return Vis complexity.
|
if (Ret) // Copy? Return Vis complexity.
|
||||||
|
@ -260,7 +260,7 @@ IntGdiExtSelectClipRect(
|
||||||
|
|
||||||
Ret = IntSelectClipRgn( dc, prgn, fnMode);
|
Ret = IntSelectClipRgn( dc, prgn, fnMode);
|
||||||
|
|
||||||
if (dc->fs & DC_FLAG_DIRTY_RAO)
|
if (dc->fs & DC_DIRTY_RAO)
|
||||||
CLIPPING_UpdateGCRegion(dc);
|
CLIPPING_UpdateGCRegion(dc);
|
||||||
|
|
||||||
if (Ret) // In this case NtGdiExtSelectClipRgn tests pass.
|
if (Ret) // In this case NtGdiExtSelectClipRgn tests pass.
|
||||||
|
@ -295,7 +295,7 @@ IntGdiExtSelectClipRgn(
|
||||||
{
|
{
|
||||||
DPRINT("IntGdiExtSelectClipRgn A %d\n",Ret);
|
DPRINT("IntGdiExtSelectClipRgn A %d\n",Ret);
|
||||||
// Update the Rao, it must be this way for now.
|
// Update the Rao, it must be this way for now.
|
||||||
if (dc->fs & DC_FLAG_DIRTY_RAO)
|
if (dc->fs & DC_DIRTY_RAO)
|
||||||
CLIPPING_UpdateGCRegion(dc);
|
CLIPPING_UpdateGCRegion(dc);
|
||||||
|
|
||||||
Ret = REGION_Complexity( dc->prgnRao ? dc->prgnRao : dc->prgnVis );
|
Ret = REGION_Complexity( dc->prgnRao ? dc->prgnRao : dc->prgnVis );
|
||||||
|
@ -376,7 +376,7 @@ GdiGetClipBox(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update RAO region if necessary */
|
/* Update RAO region if necessary */
|
||||||
if (pdc->fs & DC_FLAG_DIRTY_RAO)
|
if (pdc->fs & DC_DIRTY_RAO)
|
||||||
CLIPPING_UpdateGCRegion(pdc);
|
CLIPPING_UpdateGCRegion(pdc);
|
||||||
|
|
||||||
/* Check if we have a RAO region (intersection of API and VIS region) */
|
/* Check if we have a RAO region (intersection of API and VIS region) */
|
||||||
|
@ -577,7 +577,7 @@ NtGdiOffsetClipRgn(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Mark the RAO region as dirty */
|
/* Mark the RAO region as dirty */
|
||||||
pdc->fs |= DC_FLAG_DIRTY_RAO;
|
pdc->fs |= DC_DIRTY_RAO;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -656,7 +656,7 @@ NtGdiRectVisible(
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dc->fs & DC_FLAG_DIRTY_RAO)
|
if (dc->fs & DC_DIRTY_RAO)
|
||||||
CLIPPING_UpdateGCRegion(dc);
|
CLIPPING_UpdateGCRegion(dc);
|
||||||
|
|
||||||
prgn = dc->prgnRao ? dc->prgnRao : dc->prgnVis;
|
prgn = dc->prgnRao ? dc->prgnRao : dc->prgnVis;
|
||||||
|
@ -765,7 +765,7 @@ CLIPPING_UpdateGCRegion(PDC pDC)
|
||||||
|
|
||||||
REGION_bOffsetRgn(pDC->prgnVis, -pDC->ptlDCOrig.x, -pDC->ptlDCOrig.y);
|
REGION_bOffsetRgn(pDC->prgnVis, -pDC->ptlDCOrig.x, -pDC->ptlDCOrig.y);
|
||||||
|
|
||||||
pDC->fs &= ~DC_FLAG_DIRTY_RAO;
|
pDC->fs &= ~DC_DIRTY_RAO;
|
||||||
UpdateVisRgn(pDC);
|
UpdateVisRgn(pDC);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -823,7 +823,7 @@ CLIPPING_UpdateGCRegion(PDC pDC)
|
||||||
&pDC->prgnRao->rdh.rcBound,
|
&pDC->prgnRao->rdh.rcBound,
|
||||||
sizeof(RECTL));
|
sizeof(RECTL));
|
||||||
|
|
||||||
pDC->fs &= ~DC_FLAG_DIRTY_RAO;
|
pDC->fs &= ~DC_DIRTY_RAO;
|
||||||
UpdateVisRgn(pDC);
|
UpdateVisRgn(pDC);
|
||||||
|
|
||||||
// pDC->co should be used. Example, CLIPOBJ_cEnumStart uses XCLIPOBJ to build
|
// pDC->co should be used. Example, CLIPOBJ_cEnumStart uses XCLIPOBJ to build
|
||||||
|
|
|
@ -14,7 +14,7 @@ enum _FONT_STATE
|
||||||
/* fl */
|
/* fl */
|
||||||
#define DC_FL_PAL_BACK 1
|
#define DC_FL_PAL_BACK 1
|
||||||
|
|
||||||
enum _DCFLAGS
|
typedef enum _DCFLAGS
|
||||||
{
|
{
|
||||||
DC_DISPLAY = 0x0001,
|
DC_DISPLAY = 0x0001,
|
||||||
DC_DIRECT = 0x0002,
|
DC_DIRECT = 0x0002,
|
||||||
|
@ -34,13 +34,13 @@ enum _DCFLAGS
|
||||||
#if DBG
|
#if DBG
|
||||||
DC_PREPARED = 0x8000
|
DC_PREPARED = 0x8000
|
||||||
#endif
|
#endif
|
||||||
};
|
} DCFLAGS;
|
||||||
|
|
||||||
typedef enum _DCTYPE
|
typedef enum _DCTYPE
|
||||||
{
|
{
|
||||||
DCTYPE_DIRECT = 0,
|
DCTYPE_DIRECT = 0, /* Normal device context */
|
||||||
DCTYPE_MEMORY = 1,
|
DCTYPE_MEMORY = 1, /* Memory device context */
|
||||||
DCTYPE_INFO = 2,
|
DCTYPE_INFO = 2, /* Information context */
|
||||||
} DCTYPE;
|
} DCTYPE;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -546,7 +546,7 @@ DC_vPrepareDCsForBlit(
|
||||||
prcSecond = NULL;
|
prcSecond = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pdcDest->fs & DC_FLAG_DIRTY_RAO)
|
if (pdcDest->fs & DC_DIRTY_RAO)
|
||||||
CLIPPING_UpdateGCRegion(pdcDest);
|
CLIPPING_UpdateGCRegion(pdcDest);
|
||||||
|
|
||||||
/* Lock and update first DC */
|
/* Lock and update first DC */
|
||||||
|
@ -905,7 +905,7 @@ IntGdiDeleteDC(HDC hDC, BOOL Force)
|
||||||
* For some reason, it's still a valid handle, pointing to some kernel data.
|
* For some reason, it's still a valid handle, pointing to some kernel data.
|
||||||
* Not sure if this is a bug, a feature, some cache stuff... Who knows?
|
* Not sure if this is a bug, a feature, some cache stuff... Who knows?
|
||||||
* See NtGdiDeleteObjectApp test for details */
|
* See NtGdiDeleteObjectApp test for details */
|
||||||
if (DCToDelete->fs & DC_FLAG_PERMANENT)
|
if (DCToDelete->fs & DC_PERMANANT)
|
||||||
{
|
{
|
||||||
DC_UnlockDc(DCToDelete);
|
DC_UnlockDc(DCToDelete);
|
||||||
if(UserReleaseDC(NULL, hDC, FALSE))
|
if(UserReleaseDC(NULL, hDC, FALSE))
|
||||||
|
@ -972,16 +972,16 @@ MakeInfoDC(PDC pdc, BOOL bSet)
|
||||||
SIZEL sizl;
|
SIZEL sizl;
|
||||||
|
|
||||||
/* Can not be a display DC. */
|
/* Can not be a display DC. */
|
||||||
if (pdc->fs & DC_FLAG_DISPLAY) return FALSE;
|
if (pdc->fs & DC_DISPLAY) return FALSE;
|
||||||
if (bSet)
|
if (bSet)
|
||||||
{
|
{
|
||||||
if (pdc->fs & DC_FLAG_TEMPINFODC || pdc->dctype == DC_TYPE_DIRECT)
|
if (pdc->fs & DC_TEMPINFODC || pdc->dctype == DCTYPE_DIRECT)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
pSurface = pdc->dclevel.pSurface;
|
pSurface = pdc->dclevel.pSurface;
|
||||||
pdc->fs |= DC_FLAG_TEMPINFODC;
|
pdc->fs |= DC_TEMPINFODC;
|
||||||
pdc->pSurfInfo = pSurface;
|
pdc->pSurfInfo = pSurface;
|
||||||
pdc->dctype = DC_TYPE_INFO;
|
pdc->dctype = DCTYPE_INFO;
|
||||||
pdc->dclevel.pSurface = NULL;
|
pdc->dclevel.pSurface = NULL;
|
||||||
|
|
||||||
PDEVOBJ_sizl(pdc->ppdev, &sizl);
|
PDEVOBJ_sizl(pdc->ppdev, &sizl);
|
||||||
|
@ -995,13 +995,13 @@ MakeInfoDC(PDC pdc, BOOL bSet)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!(pdc->fs & DC_FLAG_TEMPINFODC) || pdc->dctype != DC_TYPE_INFO)
|
if (!(pdc->fs & DC_TEMPINFODC) || pdc->dctype != DCTYPE_INFO)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
pSurface = pdc->pSurfInfo;
|
pSurface = pdc->pSurfInfo;
|
||||||
pdc->fs &= ~DC_FLAG_TEMPINFODC;
|
pdc->fs &= ~DC_TEMPINFODC;
|
||||||
pdc->dclevel.pSurface = pSurface;
|
pdc->dclevel.pSurface = pSurface;
|
||||||
pdc->dctype = DC_TYPE_DIRECT;
|
pdc->dctype = DCTYPE_DIRECT;
|
||||||
pdc->pSurfInfo = NULL;
|
pdc->pSurfInfo = NULL;
|
||||||
|
|
||||||
if ( !pSurface ||
|
if ( !pSurface ||
|
||||||
|
@ -1050,7 +1050,7 @@ IntGdiCreateDC(
|
||||||
pdmInit,
|
pdmInit,
|
||||||
NULL,
|
NULL,
|
||||||
CreateAsIC ? DCTYPE_INFO :
|
CreateAsIC ? DCTYPE_INFO :
|
||||||
(Driver ? DC_TYPE_DIRECT : DC_TYPE_DIRECT),
|
(Driver ? DCTYPE_DIRECT : DCTYPE_DIRECT),
|
||||||
TRUE,
|
TRUE,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -1065,10 +1065,10 @@ IntGdiCreateDisplayDC(HDEV hDev, ULONG DcType, BOOL EmptyDC)
|
||||||
HDC hDC;
|
HDC hDC;
|
||||||
UNIMPLEMENTED;
|
UNIMPLEMENTED;
|
||||||
|
|
||||||
if (DcType == DC_TYPE_MEMORY)
|
if (DcType == DCTYPE_MEMORY)
|
||||||
hDC = NtGdiCreateCompatibleDC(NULL); // OH~ Yuck! I think I taste vomit in my mouth!
|
hDC = NtGdiCreateCompatibleDC(NULL); // OH~ Yuck! I think I taste vomit in my mouth!
|
||||||
else
|
else
|
||||||
hDC = IntGdiCreateDC(NULL, NULL, NULL, NULL, (DcType == DC_TYPE_INFO));
|
hDC = IntGdiCreateDC(NULL, NULL, NULL, NULL, (DcType == DCTYPE_INFO));
|
||||||
|
|
||||||
return hDC;
|
return hDC;
|
||||||
}
|
}
|
||||||
|
|
|
@ -361,7 +361,7 @@ NtGdiSelectBitmap(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Must be a memory dc to select a bitmap */
|
/* Must be a memory dc to select a bitmap */
|
||||||
if (pdc->dctype != DC_TYPE_MEMORY)
|
if (pdc->dctype != DCTYPE_MEMORY)
|
||||||
{
|
{
|
||||||
DC_UnlockDc(pdc);
|
DC_UnlockDc(pdc);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -462,7 +462,7 @@ NtGdiSelectBitmap(
|
||||||
|
|
||||||
/* Mark the DC brushes and the RAO region invalid */
|
/* Mark the DC brushes and the RAO region invalid */
|
||||||
pdc->pdcattr->ulDirty_ |= DIRTY_FILL | DIRTY_LINE;
|
pdc->pdcattr->ulDirty_ |= DIRTY_FILL | DIRTY_LINE;
|
||||||
pdc->fs |= DC_FLAG_DIRTY_RAO;
|
pdc->fs |= DC_DIRTY_RAO;
|
||||||
|
|
||||||
/* Update the system region */
|
/* Update the system region */
|
||||||
REGION_SetRectRgn(pdc->prgnVis,
|
REGION_SetRectRgn(pdc->prgnVis,
|
||||||
|
@ -733,7 +733,7 @@ NtGdiGetRandomRgn(
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case APIRGN:
|
case APIRGN:
|
||||||
if (pdc->fs & DC_FLAG_DIRTY_RAO)
|
if (pdc->fs & DC_DIRTY_RAO)
|
||||||
CLIPPING_UpdateGCRegion(pdc);
|
CLIPPING_UpdateGCRegion(pdc);
|
||||||
if (pdc->prgnAPI)
|
if (pdc->prgnAPI)
|
||||||
{
|
{
|
||||||
|
|
|
@ -63,7 +63,7 @@ DC_vCopyState(PDC pdcSrc, PDC pdcDst, BOOL To)
|
||||||
pdcDst->dclevel.prgnMeta = IntSysCreateRectpRgn(0, 0, 0, 0);
|
pdcDst->dclevel.prgnMeta = IntSysCreateRectpRgn(0, 0, 0, 0);
|
||||||
IntGdiCombineRgn(pdcDst->dclevel.prgnMeta, pdcSrc->dclevel.prgnMeta, NULL, RGN_COPY);
|
IntGdiCombineRgn(pdcDst->dclevel.prgnMeta, pdcSrc->dclevel.prgnMeta, NULL, RGN_COPY);
|
||||||
}
|
}
|
||||||
pdcDst->fs |= DC_FLAG_DIRTY_RAO;
|
pdcDst->fs |= DC_DIRTY_RAO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ IntGdiCleanDC(HDC hDC)
|
||||||
REGION_Delete(dc->prgnAPI);
|
REGION_Delete(dc->prgnAPI);
|
||||||
dc->prgnRao = dc->prgnAPI = NULL;
|
dc->prgnRao = dc->prgnAPI = NULL;
|
||||||
|
|
||||||
dc->fs |= DC_FLAG_DIRTY_RAO;
|
dc->fs |= DC_DIRTY_RAO;
|
||||||
|
|
||||||
DC_UnlockDc(dc);
|
DC_UnlockDc(dc);
|
||||||
|
|
||||||
|
|
|
@ -328,7 +328,7 @@ DCU_SetDcUndeletable(HDC hDC)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
dc->fs |= DC_FLAG_PERMANENT;
|
dc->fs |= DC_PERMANANT;
|
||||||
DC_UnlockDc(dc);
|
DC_UnlockDc(dc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -430,7 +430,7 @@ IntGdiSetHookFlags(HDC hDC, WORD Flags)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
wRet = dc->fs & DC_FLAG_DIRTY_RAO; // FIXME: Wrong flag!
|
wRet = dc->fs & DC_DIRTY_RAO; // FIXME: Wrong flag!
|
||||||
|
|
||||||
/* Info in "Undocumented Windows" is slightly confusing. */
|
/* Info in "Undocumented Windows" is slightly confusing. */
|
||||||
DPRINT("DC %p, Flags %04x\n", hDC, Flags);
|
DPRINT("DC %p, Flags %04x\n", hDC, Flags);
|
||||||
|
@ -438,11 +438,11 @@ IntGdiSetHookFlags(HDC hDC, WORD Flags)
|
||||||
if (Flags & DCHF_INVALIDATEVISRGN)
|
if (Flags & DCHF_INVALIDATEVISRGN)
|
||||||
{
|
{
|
||||||
/* hVisRgn has to be updated */
|
/* hVisRgn has to be updated */
|
||||||
dc->fs |= DC_FLAG_DIRTY_RAO;
|
dc->fs |= DC_DIRTY_RAO;
|
||||||
}
|
}
|
||||||
else if (Flags & DCHF_VALIDATEVISRGN || 0 == Flags)
|
else if (Flags & DCHF_VALIDATEVISRGN || 0 == Flags)
|
||||||
{
|
{
|
||||||
//dc->fs &= ~DC_FLAG_DIRTY_RAO;
|
//dc->fs &= ~DC_DIRTY_RAO;
|
||||||
}
|
}
|
||||||
|
|
||||||
DC_UnlockDc(dc);
|
DC_UnlockDc(dc);
|
||||||
|
@ -729,7 +729,7 @@ NtGdiGetBoundsRect(
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RECTL rcRgn;
|
RECTL rcRgn;
|
||||||
if (pdc->fs & DC_FLAG_DIRTY_RAO) CLIPPING_UpdateGCRegion(pdc);
|
if (pdc->fs & DC_DIRTY_RAO) CLIPPING_UpdateGCRegion(pdc);
|
||||||
if(!REGION_GetRgnBox(pdc->prgnRao, &rcRgn))
|
if(!REGION_GetRgnBox(pdc->prgnRao, &rcRgn))
|
||||||
{
|
{
|
||||||
REGION_GetRgnBox(pdc->prgnVis, &rcRgn);
|
REGION_GetRgnBox(pdc->prgnVis, &rcRgn);
|
||||||
|
|
|
@ -529,7 +529,7 @@ NtGdiSetDIBitsToDeviceInternal(
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pDC->dctype == DC_TYPE_INFO)
|
if (pDC->dctype == DCTYPE_INFO)
|
||||||
{
|
{
|
||||||
ret = 0;
|
ret = 0;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
|
@ -714,7 +714,7 @@ GreGetDIBitsInternal(
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
pDC = DC_LockDc(hDC);
|
pDC = DC_LockDc(hDC);
|
||||||
if (pDC == NULL || pDC->dctype == DC_TYPE_INFO)
|
if (pDC == NULL || pDC->dctype == DCTYPE_INFO)
|
||||||
{
|
{
|
||||||
ScanLines = 0;
|
ScanLines = 0;
|
||||||
goto done;
|
goto done;
|
||||||
|
|
|
@ -770,7 +770,7 @@ IntGdiRealizePalette(HDC hDC)
|
||||||
ASSERT(ppalDC->flFlags & PAL_INDEXED);
|
ASSERT(ppalDC->flFlags & PAL_INDEXED);
|
||||||
|
|
||||||
DPRINT1("RealizePalette unimplemented for %s\n",
|
DPRINT1("RealizePalette unimplemented for %s\n",
|
||||||
(pdc->dctype == DC_TYPE_MEMORY ? "memory managed DCs" : "device DCs"));
|
(pdc->dctype == DCTYPE_MEMORY ? "memory managed DCs" : "device DCs"));
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
DC_UnlockDc(pdc);
|
DC_UnlockDc(pdc);
|
||||||
|
|
|
@ -119,28 +119,6 @@
|
||||||
#define GDI_OBJ_HMGR_RESTRICTED 0x80000022 /* Restricted? */
|
#define GDI_OBJ_HMGR_RESTRICTED 0x80000022 /* Restricted? */
|
||||||
|
|
||||||
|
|
||||||
/* DC OBJ Types */
|
|
||||||
#define DC_TYPE_DIRECT 0 /* normal device context */
|
|
||||||
#define DC_TYPE_MEMORY 1 /* memory device context */
|
|
||||||
#define DC_TYPE_INFO 2 /* information context */
|
|
||||||
|
|
||||||
/* DC OBJ Flags */
|
|
||||||
#define DC_FLAG_DISPLAY 0x0001
|
|
||||||
#define DC_FLAG_DIRECT 0x0002
|
|
||||||
#define DC_FLAG_CANCELLED 0x0004
|
|
||||||
#define DC_FLAG_PERMANENT 0x0008
|
|
||||||
#define DC_FLAG_DIRTY_RAO 0x0010
|
|
||||||
#define DC_FLAG_ACCUM_WMGR 0x0020
|
|
||||||
#define DC_FLAG_ACCUM_APP 0x0040
|
|
||||||
#define DC_FLAG_RESET 0x0080
|
|
||||||
#define DC_FLAG_SYNCHRONIZEACCESS 0x0100
|
|
||||||
#define DC_FLAG_EPSPRINTINGESCAPE 0x0200
|
|
||||||
#define DC_FLAG_TEMPINFODC 0x0400
|
|
||||||
#define DC_FLAG_FULLSCREEN 0x0800
|
|
||||||
#define DC_FLAG_IN_CLONEPDEV 0x1000
|
|
||||||
#define DC_FLAG_REDIRECTION 0x2000
|
|
||||||
#define DC_FLAG_SHAREACCESS 0x4000
|
|
||||||
|
|
||||||
/* DC_ATTR Dirty Flags */
|
/* DC_ATTR Dirty Flags */
|
||||||
#define DIRTY_FILL 0x00000001
|
#define DIRTY_FILL 0x00000001
|
||||||
#define DIRTY_LINE 0x00000002
|
#define DIRTY_LINE 0x00000002
|
||||||
|
|
|
@ -461,7 +461,7 @@ DxEngGetDCState(HDC hDC,
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
retVal = (DWORD_PTR) pDC->fs & DC_FLAG_FULLSCREEN;
|
retVal = (DWORD_PTR) pDC->fs & DC_FULLSCREEN;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
/* Return the complexity of the visible region. */
|
/* Return the complexity of the visible region. */
|
||||||
|
@ -656,7 +656,7 @@ HDC
|
||||||
APIENTRY
|
APIENTRY
|
||||||
DxEngCreateMemoryDC(HDEV hDev)
|
DxEngCreateMemoryDC(HDEV hDev)
|
||||||
{
|
{
|
||||||
return IntGdiCreateDisplayDC(hDev, DC_TYPE_MEMORY, FALSE);
|
return IntGdiCreateDisplayDC(hDev, DCTYPE_MEMORY, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
@ -748,9 +748,9 @@ DxEngSetDCState(HDC hDC, DWORD SetType, DWORD Set)
|
||||||
if (SetType == 1)
|
if (SetType == 1)
|
||||||
{
|
{
|
||||||
if ( Set )
|
if ( Set )
|
||||||
pDC->fs |= DC_FLAG_FULLSCREEN;
|
pDC->fs |= DC_FULLSCREEN;
|
||||||
else
|
else
|
||||||
pDC->fs &= ~DC_FLAG_FULLSCREEN;
|
pDC->fs &= ~DC_FULLSCREEN;
|
||||||
Ret = TRUE;
|
Ret = TRUE;
|
||||||
}
|
}
|
||||||
DC_UnlockDc(pDC);
|
DC_UnlockDc(pDC);
|
||||||
|
|
|
@ -1550,7 +1550,7 @@ UserGetDesktopDC(ULONG DcType, BOOL bAltDc, BOOL ValidatehWnd)
|
||||||
/* This can be called from GDI/DX, so acquire the USER lock */
|
/* This can be called from GDI/DX, so acquire the USER lock */
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (DcType == DC_TYPE_DIRECT)
|
if (DcType == DCTYPE_DIRECT)
|
||||||
{
|
{
|
||||||
DesktopObject = UserGetDesktopWindow();
|
DesktopObject = UserGetDesktopWindow();
|
||||||
DesktopHDC = (HDC)UserGetWindowDC(DesktopObject);
|
DesktopHDC = (HDC)UserGetWindowDC(DesktopObject);
|
||||||
|
|
|
@ -874,7 +874,7 @@ DceResetActiveDCEs(PWND Window)
|
||||||
if (NULL != dc->dclevel.prgnClip)
|
if (NULL != dc->dclevel.prgnClip)
|
||||||
{
|
{
|
||||||
REGION_bOffsetRgn(dc->dclevel.prgnClip, DeltaX, DeltaY);
|
REGION_bOffsetRgn(dc->dclevel.prgnClip, DeltaX, DeltaY);
|
||||||
dc->fs |= DC_FLAG_DIRTY_RAO;
|
dc->fs |= DC_DIRTY_RAO;
|
||||||
}
|
}
|
||||||
if (NULL != pDCE->hrgnClip)
|
if (NULL != pDCE->hrgnClip)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue