зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1627296 - Remove the ForceFontUpdate hack from gfxDWriteFonts, the gfxPlatform calls in SystemTextQualityChanged should be sufficient to flush everything. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D75351
This commit is contained in:
Родитель
500a009dbb
Коммит
8b54700f47
|
@ -95,17 +95,6 @@ gfxDWriteFont::gfxDWriteFont(const RefPtr<UnscaledFontDWrite>& aUnscaledFont,
|
|||
|
||||
gfxDWriteFont::~gfxDWriteFont() { delete mMetrics; }
|
||||
|
||||
static void ForceFontUpdate() {
|
||||
// update device context font cache
|
||||
// Dirty but easiest way:
|
||||
// Changing nsIPrefBranch entry which triggers callbacks
|
||||
// and flows into calling mDeviceContext->FlushFontCache()
|
||||
// to update the font cache in all the instance of Browsers
|
||||
static const char kPrefName[] = "font.internaluseonly.changed";
|
||||
bool fontInternalChange = Preferences::GetBool(kPrefName, false);
|
||||
Preferences::SetBool(kPrefName, !fontInternalChange);
|
||||
}
|
||||
|
||||
void gfxDWriteFont::UpdateSystemTextQuality() {
|
||||
BYTE newQuality = GetSystemTextQuality();
|
||||
if (gfxVars::SystemTextQuality() != newQuality) {
|
||||
|
@ -115,10 +104,9 @@ void gfxDWriteFont::UpdateSystemTextQuality() {
|
|||
|
||||
void gfxDWriteFont::SystemTextQualityChanged() {
|
||||
// If ClearType status has changed, update our value,
|
||||
Factory::SetSystemTextQuality(gfxVars::SystemTextQuality());
|
||||
// flush cached stuff that depended on the old setting, and force
|
||||
// reflow everywhere to ensure we are using correct glyph metrics.
|
||||
ForceFontUpdate();
|
||||
Factory::SetSystemTextQuality(gfxVars::SystemTextQuality());
|
||||
gfxPlatform::FlushFontAndWordCaches();
|
||||
gfxPlatform::ForceGlobalReflow();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче