Backed out changeset 8155e4688d45 (bug 1894424) for causing reftest failures CLOSED TREE

This commit is contained in:
Norisz Fay 2024-05-02 01:25:08 +03:00
parent 908821ac99
commit 1704458d1c
3 changed files with 4 additions and 15 deletions

View File

@ -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

View File

@ -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);

View File

@ -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<LazyFlag> mHasGraphiteTables;
std::atomic<LazyFlag> mHasGraphiteSpaceContextuals;
std::atomic<LazyFlag> mHasColorBitmapTable;
std::atomic<LazyFlag> mNeedsMaskForShadow;
enum class SpaceFeatures : uint8_t {
Uninitialized = 0xff,