From 185a027640f9b18c97eda39a49bfa2dcce58fcdb Mon Sep 17 00:00:00 2001 From: Moonchild Date: Fri, 4 Feb 2022 01:44:41 +0000 Subject: Issue #1877 - Resolve RELEASE_OR_BETA conditionals. --- gfx/thebes/gfxFont-Impl.h | 11 ----------- gfx/thebes/gfxFont.cpp | 6 +++--- gfx/thebes/gfxPrefs.h | 7 ++----- gfx/thebes/gfxTextRun.cpp | 8 ++++---- 4 files changed, 9 insertions(+), 23 deletions(-) (limited to 'gfx') 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& 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& aRanges, aRanges[lastRangeIndex].end = aLength; -#ifndef RELEASE_OR_BETA +#ifdef DEBUG LogModule* log = mStyle.systemFont ? gfxPlatform::GetLog(eGfxLog_textrunui) : gfxPlatform::GetLog(eGfxLog_textrun); -- cgit v1.2.3