mirror of
https://github.com/reactos/reactos.git
synced 2024-07-08 21:55:08 +00:00
tinus <o112w8r02@sneakemail.com>
Add a Initialized member to TEXTOBJ so it isn't reinitialized all the time. svn path=/trunk/; revision=13934
This commit is contained in:
parent
c350cae866
commit
ec996ca887
|
@ -7,6 +7,7 @@ typedef struct
|
||||||
{
|
{
|
||||||
LOGFONTW logfont;
|
LOGFONTW logfont;
|
||||||
FONTOBJ *Font;
|
FONTOBJ *Font;
|
||||||
|
BOOLEAN Initialized; /* Don't reinitialize for each DC */
|
||||||
} TEXTOBJ, *PTEXTOBJ;
|
} TEXTOBJ, *PTEXTOBJ;
|
||||||
|
|
||||||
/* Internal interface */
|
/* Internal interface */
|
||||||
|
|
|
@ -2971,6 +2971,12 @@ TextIntRealizeFont(HFONT FontHandle)
|
||||||
return STATUS_INVALID_HANDLE;
|
return STATUS_INVALID_HANDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (TextObj->Initialized)
|
||||||
|
{
|
||||||
|
TEXTOBJ_UnlockText(FontHandle);
|
||||||
|
return STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
if (! RtlCreateUnicodeString(&FaceName, TextObj->logfont.lfFaceName))
|
if (! RtlCreateUnicodeString(&FaceName, TextObj->logfont.lfFaceName))
|
||||||
{
|
{
|
||||||
TEXTOBJ_UnlockText(FontHandle);
|
TEXTOBJ_UnlockText(FontHandle);
|
||||||
|
@ -3003,6 +3009,7 @@ TextIntRealizeFont(HFONT FontHandle)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
TextObj->Initialized = TRUE;
|
||||||
Status = STATUS_SUCCESS;
|
Status = STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue