mirror of
https://github.com/reactos/reactos.git
synced 2024-07-05 12:15:46 +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;
|
||||
FONTOBJ *Font;
|
||||
BOOLEAN Initialized; /* Don't reinitialize for each DC */
|
||||
} TEXTOBJ, *PTEXTOBJ;
|
||||
|
||||
/* Internal interface */
|
||||
|
|
|
@ -2971,6 +2971,12 @@ TextIntRealizeFont(HFONT FontHandle)
|
|||
return STATUS_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
if (TextObj->Initialized)
|
||||
{
|
||||
TEXTOBJ_UnlockText(FontHandle);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (! RtlCreateUnicodeString(&FaceName, TextObj->logfont.lfFaceName))
|
||||
{
|
||||
TEXTOBJ_UnlockText(FontHandle);
|
||||
|
@ -3003,6 +3009,7 @@ TextIntRealizeFont(HFONT FontHandle)
|
|||
}
|
||||
else
|
||||
{
|
||||
TextObj->Initialized = TRUE;
|
||||
Status = STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue