Fix brush attribute structure and add flags. Add gdi handle cache structures.

svn path=/trunk/; revision=33424
This commit is contained in:
James Tabor 2008-05-11 05:32:50 +00:00
parent b8f704d4aa
commit 63466eec38
3 changed files with 36 additions and 7 deletions

View file

@ -12,6 +12,7 @@
extern HGDIOBJ stock_objects[];
BOOL SetStockObjects = FALSE;
PDEVCAPS GdiDevCaps = NULL;
PGDIHANDLECACHE GdiHandleCache = NULL;
/*
* GDI32.DLL doesn't have an entry point. The initialization is done by a call
@ -41,6 +42,7 @@ GdiProcessSetup (VOID)
GdiDevCaps = &GdiSharedHandleTable->DevCaps;
CurrentProcessId = NtCurrentTeb()->Cid.UniqueProcess;
GDI_BatchLimit = (DWORD) NtCurrentTeb()->ProcessEnvironmentBlock->GdiDCAttributeList;
GdiHandleCache = (PGDIHANDLECACHE)NtCurrentTeb()->ProcessEnvironmentBlock->GdiHandleBuffer;
}

View file

@ -186,8 +186,13 @@
#define PAGE_EXTENTS_CHANGED 0x00004000
#define WORLD_XFORM_CHANGED 0x00008000
/* RGN_ATTR Flags */
#define DIRTY_RGNATTR 0x00000020
/* BRUSH/RGN_ATTR Flags */
#define ATTR_CACHED 0x00000001
#define ATTR_TO_BE_DELETED 0x00000002
#define ATTR_NEW_COLOR 0x00000004
#define ATTR_CANT_SELECT 0x00000008
#define ATTR_RGN_VALID 0x00000010
#define ATTR_RGN_DIRTY 0x00000020
/* TYPES *********************************************************************/
@ -302,10 +307,10 @@ typedef struct _DC_ATTR
RGN_ATTR VisRectRegion;
} DC_ATTR, *PDC_ATTR;
typedef struct _BRUSH_ATTR
typedef struct _BRUSH_ATTR // Used with pen too.
{
LOGBRUSH logbrush;
DWORD dwUnused[3];
FLONG AttrFlags;
COLORREF lbColor;
} BRUSH_ATTR, *PBRUSH_ATTR;
typedef struct _FONT_ATTR

View file

@ -159,8 +159,8 @@ typedef enum GDILoObjType
typedef DWORD FULLSCREENCONTROL;
typedef DWORD LFTYPE;
/* Public LAST_STOCK = 19, plus 2 more internal entries */
#define NB_STOCK_OBJECTS 22
/* Public LAST_STOCK = 19, plus 2 more internal entries */
#define NB_STOCK_OBJECTS 22
/* extra stock object: default 1x1 bitmap for memory DCs */
#define DEFAULT_BITMAP (21)
@ -270,6 +270,28 @@ typedef struct _DEVCAPS // Very similar to GDIINFO
ULONG ulColorMgmtCaps;
} DEVCAPS, *PDEVCAPS;
/* Gdi Handle Cache Types and Structures */
#define GDI_CACHED_HADNLE_TYPES 4
#define CACHE_BRUSH_ENTRIES 10
#define CACHE_PEN_ENTRIES 8
#define CACHE_REGION_ENTRIES 8
#define CACHE_LFONT_ENTRIES 1
typedef enum _HANDLECACHETYPE
{
hctBrushHandle,
hctPenHandle,
hctRegionHandle,
hctLFontHandle
} HANDLECACHETYPE,*PHANDLECACHETYPE;
typedef struct _GDIHANDLECACHE
{
ULONG ulLock;
ULONG ulNumHandles[GDI_CACHED_HADNLE_TYPES];
HANDLE Handle[CACHE_BRUSH_ENTRIES+CACHE_PEN_ENTRIES+CACHE_REGION_ENTRIES+CACHE_LFONT_ENTRIES];
} GDIHANDLECACHE, *PGDIHANDLECACHE;
/* Font Structures */
typedef struct _TMDIFF
{