diff --git a/gfx/thebes/gfxFont.h b/gfx/thebes/gfxFont.h index fa6fd6a83f28..f51c08ea82ac 100644 --- a/gfx/thebes/gfxFont.h +++ b/gfx/thebes/gfxFont.h @@ -1527,7 +1527,9 @@ class gfxFont { // and therefore needs us to use a mask for text-shadow even when // we're not actually blurring. bool AlwaysNeedsMaskForShadow() const { - return mFontEntry->AlwaysNeedsMaskForShadow(); + return mFontEntry->TryGetColorGlyphs() || mFontEntry->TryGetSVGData(this) || + mFontEntry->HasFontTable(TRUETYPE_TAG('C', 'B', 'D', 'T')) || + mFontEntry->HasFontTable(TRUETYPE_TAG('s', 'b', 'i', 'x')); } // whether a feature is supported by the font (limited to a small set diff --git a/gfx/thebes/gfxFontEntry.cpp b/gfx/thebes/gfxFontEntry.cpp index 1a73d2123964..b038452d6980 100644 --- a/gfx/thebes/gfxFontEntry.cpp +++ b/gfx/thebes/gfxFontEntry.cpp @@ -355,7 +355,7 @@ bool gfxFontEntry::TryGetSVGData(const gfxFont* aFont) { mSVGInitialized = true; } - if (GetSVGGlyphs() && aFont) { + if (GetSVGGlyphs()) { AutoWriteLock lock(mLock); if (!mFontsUsingSVGGlyphs.Contains(aFont)) { mFontsUsingSVGGlyphs.AppendElement(aFont); diff --git a/gfx/thebes/gfxFontEntry.h b/gfx/thebes/gfxFontEntry.h index 82218d561142..364cf6c79e46 100644 --- a/gfx/thebes/gfxFontEntry.h +++ b/gfx/thebes/gfxFontEntry.h @@ -273,18 +273,6 @@ class gfxFontEntry { return flag == LazyFlag::Yes; } - inline bool AlwaysNeedsMaskForShadow() { - LazyFlag flag = mNeedsMaskForShadow; - if (flag == LazyFlag::Uninitialized) { - flag = - TryGetColorGlyphs() || TryGetSVGData(nullptr) || HasColorBitmapTable() - ? LazyFlag::Yes - : LazyFlag::No; - mNeedsMaskForShadow = flag; - } - return flag == LazyFlag::Yes; - } - inline bool HasCmapTable() { if (!mCharacterMap && !mShmemCharacterMap) { ReadCMAP(); @@ -682,7 +670,6 @@ class gfxFontEntry { std::atomic mHasGraphiteTables; std::atomic mHasGraphiteSpaceContextuals; std::atomic mHasColorBitmapTable; - std::atomic mNeedsMaskForShadow; enum class SpaceFeatures : uint8_t { Uninitialized = 0xff,