[ros-dev] [ros-diffs] [jimtabor] 46758: [Win32k|Gdi32] - Enable font batch and fixed setting brush origion. Use the new delete object functions in win32k.

Timo Kreuzer timo.kreuzer at web.de
Wed Apr 7 16:29:30 CEST 2010


> +
> +#define GDIOBJ_GetKernelObj(Handle) \
> +  ((PGDI_TABLE_ENTRY)&GdiHandleTable->Entries[GDI_HANDLE_GET_INDEX(Handle)])->KernelData
>   
This function shouldn't even exist.


>      pdcattr->hlfntNew = NtGdiGetStockObject(SYSTEM_FONT);
>      TextIntRealizeFont(pdcattr->hlfntNew,NULL);
> +    NewDC->hlfntCur = pdcattr->hlfntNew;
> +    NewDC->dclevel.plfnt = GDIOBJ_GetKernelObj(pdcattr->hlfntNew);
>   
Looks like a good way to introduce bugs. There's a reason we have
locking functions. The fact that in this case it's a stockfont that
won't get deleted, doesn't mean we can do this always. If you want
performance, keep a global pointer to the font and use
GDIOBJ_IncrementShareCount





More information about the Ros-dev mailing list