зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1856637 - Ignore gfxDWriteFont::UpdateSystemTextVars() call if the gfxVars are not yet initialized. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D190151
This commit is contained in:
Родитель
e602167d1b
Коммит
cf58f732be
|
@ -157,6 +157,12 @@ class gfxVars final {
|
|||
size_t mIndex;
|
||||
};
|
||||
|
||||
// Whether the gfxVars singleton instance has been initialized. Most gfx code
|
||||
// doesn't need to check this, but code that can potentially run before
|
||||
// gfxPlatform initialization can use this to check whether gfxVars are
|
||||
// available yet.
|
||||
static bool IsInitialized() { return sInstance != nullptr; }
|
||||
|
||||
private:
|
||||
static StaticAutoPtr<gfxVars> sInstance;
|
||||
static StaticAutoPtr<nsTArray<VarBase*>> sVarList;
|
||||
|
|
|
@ -135,6 +135,10 @@ bool gfxDWriteFont::InitDWriteSupport() {
|
|||
void gfxDWriteFont::UpdateSystemTextVars() {
|
||||
MOZ_ASSERT(XRE_IsParentProcess());
|
||||
|
||||
if (!gfxVars::IsInitialized()) {
|
||||
return;
|
||||
}
|
||||
|
||||
BYTE newQuality = GetSystemTextQuality();
|
||||
if (gfxVars::SystemTextQuality() != newQuality) {
|
||||
gfxVars::SetSystemTextQuality(newQuality);
|
||||
|
|
Загрузка…
Ссылка в новой задаче