Hi! On Wed, Apr 7, 2010 at 9:29 AM, Timo Kreuzer <[email protected]> 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); >> 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 > > 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. Thanks, James _______________________________________________ Ros-dev mailing list [email protected] http://www.reactos.org/mailman/listinfo/ros-dev
