gdi32: Remove the code which bypasses the DC transformation checks.

If it's absolutely required to check the child list first, that should be
done inside of find_in_cache using the same comparisons as done there.
This commit is contained in:
Dmitry Timoshkov 2008-10-09 10:23:46 +09:00 committed by Alexandre Julliard
parent f3e7637139
commit f898547b77
1 changed files with 3 additions and 18 deletions

View File

@ -3286,24 +3286,7 @@ GdiFont *WineEngCreateFontInstance(DC *dc, HFONT hfont)
FMAT2 dcmat;
FontSubst *psub = NULL;
EnterCriticalSection( &freetype_cs );
LIST_FOR_EACH_ENTRY(ret, &child_font_list, struct tagGdiFont, entry)
{
struct list *first_hfont = list_head(&ret->hfontlist);
hflist = LIST_ENTRY(first_hfont, HFONTLIST, entry);
if(hflist->hfont == hfont)
{
LeaveCriticalSection( &freetype_cs );
return ret;
}
}
if (!GetObjectW( hfont, sizeof(lf), &lf ))
{
LeaveCriticalSection( &freetype_cs );
return NULL;
}
if (!GetObjectW( hfont, sizeof(lf), &lf )) return NULL;
lf.lfWidth = abs(lf.lfWidth);
can_use_bitmap = GetDeviceCaps(dc->hSelf, TEXTCAPS) & TC_RA_ABLE;
@ -3326,6 +3309,8 @@ GdiFont *WineEngCreateFontInstance(DC *dc, HFONT hfont)
TRACE("DC transform %f %f %f %f\n", dcmat.eM11, dcmat.eM12,
dcmat.eM21, dcmat.eM22);
EnterCriticalSection( &freetype_cs );
/* check the cache first */
if((ret = find_in_cache(hfont, &lf, &dcmat, can_use_bitmap)) != NULL) {
TRACE("returning cached gdiFont(%p) for hFont %p\n", ret, hfont);