2010-02-26 11:43:19 +00:00
|
|
|
#pragma once
|
2003-11-18 20:49:39 +00:00
|
|
|
|
2011-12-14 04:07:06 +00:00
|
|
|
#define PC_SYS_USED 0x80 /* Palentry is used (both system and logical) */
|
|
|
|
#define PC_SYS_RESERVED 0x40 /* System palentry is not to be mapped to */
|
|
|
|
#define PC_SYS_MAPPED 0x10 /* Logical palentry is a direct alias for system palentry */
|
2005-12-28 20:31:44 +00:00
|
|
|
|
2011-12-14 04:07:06 +00:00
|
|
|
#define NB_RESERVED_COLORS 20 /* Number of fixed colors in system palette */
|
2004-04-09 20:03:21 +00:00
|
|
|
|
2008-05-15 02:15:10 +00:00
|
|
|
typedef struct _COLORSPACE
|
|
|
|
{
|
|
|
|
BASEOBJECT BaseObject;
|
|
|
|
LOGCOLORSPACEW lcsColorSpace;
|
|
|
|
DWORD dwFlags;
|
|
|
|
} COLORSPACE, *PCOLORSPACE;
|
|
|
|
|
|
|
|
|
|
|
|
#define COLORSPACEOBJ_AllocCS() ((PCOLORSPACE) GDIOBJ_AllocObj(GDIObjType_ICMLCS_TYPE))
|
[WIN32K]
Rewrite of the GDI handle manager
- The old handle manager used a completely retarded spinlock in combination with KeDelayExecutionThread() for both exclusive
and shared locks. This is probably the most uneffective algorithm possible. It was also duplicating code everywhere and it was a overall mess It
is now replaced with a lock-free reference counter for shared locks and a pushlock for exclusive locks. -> Better performance and scalability.
- Allocate user mode object attributes from the new gdi pool. This way, we don't need any caching, since the pool serves as a cache. Its also
much faster and uses much less memory.
- Allow object allocations of different size, instead of fixed size from a table. This way a single allocation can take care of actual needs.
- Allow allcoating objects without a handle and insert them into the handle table later
- Properly synchronize the process GDIHandleCount. Now gdiview and taskmanager show the correct number of gdi handles.
- Implement a new event tracking system, that is capable of tracking all reverences and locks of objects and pool allocations to help track
possible leaks
- Make sure that all objects of a process are deleted in cleanup
- Make sure all usermode memory allocations are freed, when cleaning up the process pool.
- Make sure that each object type is using the correct type of lock (either shared or exclusive, not a mixture)
- Fix some object / reference leaks
- Lots of inferface improvements
- Use global variables for certain things instead of members in the mapped gdi handle table
- Make IntSysCreateRectpRgn create a region without a handle
- Fix detection od source and mask use in GreStretchBltMask
- Use GDIOBJ_bLockMultipleObjects in NtGdiCombineRegion to avoid possible deadlocks
- Fix NtGdiAbortPath to reset DCPATH_ACTIVE flag in the dc and only bail out on error, instead of always
- Replace DC_AllocateDcAttr and DC_AllocDcAttr with DC_bAllocDcAttr using the new user mode pool
- Remove DCU_SyncDcAttrtoUser and DCU_SynchDcAttrtoUser. Those functions were unused and didn't do anything useful anyway,
- Replace IntGdiSetDCOwnerEx and DC_SetOwnership with GreSetDCOwner, remove unused NoSetBrush parameter
- Replace GDIOBJ_bValidateHandle and IsObjectDead with GreIsHandleValid
- Chage GDIOBJ_bLockMultipleObjects: pass object type, return a BOOL, whether all objects could be locked, cleanup on failure
svn path=/trunk/; revision=51470
2011-04-28 08:26:46 +00:00
|
|
|
#define COLORSPACEOBJ_AllocCSWithHandle() ((PCOLORSPACE) GDIOBJ_AllocObjWithHandle(GDI_OBJECT_TYPE_COLORSPACE, sizeof(COLORSPACE)))
|
|
|
|
#define COLORSPACEOBJ_LockCS(hCS) ((PCOLORSPACE)GDIOBJ_LockObject((HGDIOBJ)hCS, GDIObjType_ICMLCS_TYPE))
|
|
|
|
#define COLORSPACEOBJ_UnlockCS(pCS) GDIOBJ_vUnlockObject((POBJ)pCS)
|
2008-05-15 02:15:10 +00:00
|
|
|
|
2008-05-15 11:38:46 +00:00
|
|
|
typedef struct _COLORTRANSFORMOBJ
|
|
|
|
{
|
|
|
|
BASEOBJECT BaseObject;
|
2011-03-01 01:03:58 +00:00
|
|
|
HANDLE hColorTransform;
|
2008-05-15 11:38:46 +00:00
|
|
|
} GDICLRXFORM, COLORTRANSFORMOBJ, *PCOLORTRANSFORMOBJ;
|
|
|
|
|
2008-05-15 02:15:10 +00:00
|
|
|
extern HCOLORSPACE hStockColorSpace;
|
|
|
|
|
2011-03-02 22:33:14 +00:00
|
|
|
UINT FASTCALL IntGdiRealizePalette (HDC);
|