Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2022-04-21 21:59:16 +08:00
commit 059e35a463
32 changed files with 77 additions and 150 deletions

View file

@ -50,20 +50,9 @@ gfxFont::GetShapedWord(DrawTarget *aDrawTarget,
if (sw) {
sw->ResetAge();
#ifndef RELEASE_OR_BETA
if (aTextPerf) {
aTextPerf->current.wordCacheHit++;
}
#endif
return sw;
}
#ifndef RELEASE_OR_BETA
if (aTextPerf) {
aTextPerf->current.wordCacheMiss++;
}
#endif
sw = gfxShapedWord::Create(aText, aLength, aRunScript, aAppUnitsPerDevUnit,
aFlags);
entry->mShapedWord.reset(sw);

View file

@ -180,7 +180,7 @@ gfxFontCache::gfxFontCache()
obs->AddObserver(new Observer, "memory-pressure", false);
}
#ifndef RELEASE_OR_BETA
#if 0
// Currently disabled for release builds, due to unexplained crashes
// during expiration; see bug 717175 & 894798.
mWordCacheExpirationTimer = do_CreateInstance("@mozilla.org/timer;1");
@ -2786,7 +2786,7 @@ gfxFont::ShapeTextWithoutWordCache(DrawTarget *aDrawTarget,
return ok;
}
#ifndef RELEASE_OR_BETA
#ifdef DEBUG
#define TEXT_PERF_INCR(tp, m) (tp ? (tp)->current.m++ : 0)
#else
#define TEXT_PERF_INCR(tp, m)
@ -2826,7 +2826,7 @@ gfxFont::SplitAndInitTextRun(DrawTarget *aDrawTarget,
gfxTextPerfMetrics *tp = nullptr;
#ifndef RELEASE_OR_BETA
#ifdef DEBUG
tp = aTextRun->GetFontGroup()->GetTextPerfMetrics();
if (tp) {
if (mStyle.systemFont) {

View file

@ -352,12 +352,9 @@ private:
#if defined(ANDROID)
DECL_GFX_PREF(Once, "gfx.apitrace.enabled", UseApitrace, bool, false);
#endif
#if defined(RELEASE_OR_BETA)
// "Skip" means this is locked to the default value in beta and release.
DECL_GFX_PREF(Skip, "gfx.blocklist.all", BlocklistAll, int32_t, 0);
#else
// Tweaking/debug pref: -1 = ignore active blocklist entry, 0 = normal, 1 = block all features
DECL_GFX_PREF(Once, "gfx.blocklist.all", BlocklistAll, int32_t, 0);
#endif
DECL_GFX_PREF(Live, "gfx.canvas.auto_accelerate.min_calls", CanvasAutoAccelerateMinCalls, int32_t, 4);
DECL_GFX_PREF(Live, "gfx.canvas.auto_accelerate.min_frames", CanvasAutoAccelerateMinFrames, int32_t, 30);
DECL_GFX_PREF(Live, "gfx.canvas.auto_accelerate.min_seconds", CanvasAutoAccelerateMinSeconds, float, 5.0f);

View file

@ -158,7 +158,7 @@ gfxTextRun::gfxTextRun(const gfxTextRunFactory::Parameters *aParams,
MOZ_COUNT_CTOR(gfxTextRun);
NS_ADDREF(mFontGroup);
#ifndef RELEASE_OR_BETA
#ifdef DEBUG
gfxTextPerfMetrics *tp = aFontGroup->GetTextPerfMetrics();
if (tp) {
tp->current.textrunConst++;
@ -192,7 +192,7 @@ gfxTextRun::~gfxTextRun()
// been told to release its reference to the group, so we mustn't do that
// again here.
if (!mReleasedFontGroup) {
#ifndef RELEASE_OR_BETA
#ifdef DEBUG
gfxTextPerfMetrics *tp = mFontGroup->GetTextPerfMetrics();
if (tp) {
tp->current.textrunDestr++;
@ -2931,7 +2931,7 @@ void gfxFontGroup::ComputeRanges(nsTArray<gfxTextRange>& aRanges,
FindFontForChar(ch, prevCh, nextCh, aRunScript, prevFont,
&matchType);
#ifndef RELEASE_OR_BETA
#ifdef DEBUG
if (MOZ_UNLIKELY(mTextPerf)) {
if (matchType == gfxTextRange::kPrefsFallback) {
mTextPerf->current.fallbackPrefs++;
@ -2990,7 +2990,7 @@ void gfxFontGroup::ComputeRanges(nsTArray<gfxTextRange>& aRanges,
aRanges[lastRangeIndex].end = aLength;
#ifndef RELEASE_OR_BETA
#ifdef DEBUG
LogModule* log = mStyle.systemFont
? gfxPlatform::GetLog(eGfxLog_textrunui)
: gfxPlatform::GetLog(eGfxLog_textrun);