[ros-dev] [ros-diffs] [jimtabor] 46758: [Win32k|Gdi32] - Enable font batch and fixed setting brush origion. Use the new delete object functions in win32k.
jimtabor.rosdev at gmail.com
Wed Apr 7 16:49:56 CEST 2010
On Wed, Apr 7, 2010 at 9:29 AM, Timo Kreuzer <timo.kreuzer at web.de> wrote:
>> +#define GDIOBJ_GetKernelObj(Handle) \
>> + ((PGDI_TABLE_ENTRY)&GdiHandleTable->Entries[GDI_HANDLE_GET_INDEX(Handle)])->KernelData
> This function shouldn't even exist.
OK~ LOL! I expect Alex to point something like this out.
>> pdcattr->hlfntNew = NtGdiGetStockObject(SYSTEM_FONT);
>> + 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
I thought the delete object function did not allow stock types to be
deleted in the first case.....
This is for the pointer only. I guess we can increment the share count
and rewrite it all at the same time. I was keeping it cheap.
More information about the Ros-dev