diff options
author | Moonchild <moonchild@palemoon.org> | 2022-02-04 01:44:41 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2022-04-19 17:38:02 +0000 |
commit | 185a027640f9b18c97eda39a49bfa2dcce58fcdb (patch) | |
tree | d29b146d37f0f831ec981316da778c91fd77be8a /gfx | |
parent | 99ec088ecf1259643f6124206af024de3ebc49ad (diff) | |
download | uxp-185a027640f9b18c97eda39a49bfa2dcce58fcdb.tar.gz |
Issue #1877 - Resolve RELEASE_OR_BETA conditionals.
Diffstat (limited to 'gfx')
-rw-r--r-- | gfx/thebes/gfxFont-Impl.h | 11 | ||||
-rw-r--r-- | gfx/thebes/gfxFont.cpp | 6 | ||||
-rw-r--r-- | gfx/thebes/gfxPrefs.h | 7 | ||||
-rw-r--r-- | gfx/thebes/gfxTextRun.cpp | 8 |
4 files changed, 9 insertions, 23 deletions
diff --git a/gfx/thebes/gfxFont-Impl.h b/gfx/thebes/gfxFont-Impl.h index 2661d1f40a..6b31cf29f8 100644 --- a/gfx/thebes/gfxFont-Impl.h +++ b/gfx/thebes/gfxFont-Impl.h @@ -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);
diff --git a/gfx/thebes/gfxFont.cpp b/gfx/thebes/gfxFont.cpp index dba322521f..9acfdeb95f 100644 --- a/gfx/thebes/gfxFont.cpp +++ b/gfx/thebes/gfxFont.cpp @@ -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) { diff --git a/gfx/thebes/gfxPrefs.h b/gfx/thebes/gfxPrefs.h index 143d9199ca..b02638e5a6 100644 --- a/gfx/thebes/gfxPrefs.h +++ b/gfx/thebes/gfxPrefs.h @@ -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); diff --git a/gfx/thebes/gfxTextRun.cpp b/gfx/thebes/gfxTextRun.cpp index 664514fdd3..ae746b8c5b 100644 --- a/gfx/thebes/gfxTextRun.cpp +++ b/gfx/thebes/gfxTextRun.cpp @@ -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); |