mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-31 04:13:37 +00:00
tinus <[email protected]>
Add a Initialized member to TEXTOBJ so it isn't reinitialized all the time. svn path=/trunk/; revision=13934
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user