diff options
Diffstat (limited to 'gfx/thebes/gfxFontEntry.h')
-rw-r--r-- | gfx/thebes/gfxFontEntry.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gfx/thebes/gfxFontEntry.h b/gfx/thebes/gfxFontEntry.h index 364cf6c79e..82218d5611 100644 --- a/gfx/thebes/gfxFontEntry.h +++ b/gfx/thebes/gfxFontEntry.h @@ -273,6 +273,18 @@ 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(); @@ -670,6 +682,7 @@ class gfxFontEntry { std::atomic<LazyFlag> mHasGraphiteTables; std::atomic<LazyFlag> mHasGraphiteSpaceContextuals; std::atomic<LazyFlag> mHasColorBitmapTable; + std::atomic<LazyFlag> mNeedsMaskForShadow; enum class SpaceFeatures : uint8_t { Uninitialized = 0xff, |