mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1219476 (part 5) - Replace PRLogModuleInfo usage with LazyLogModule in gfx/. r=erahm.
--HG-- extra : rebase_source : c39ecc84dbe9a0f94b42f1c78dabf346ce3a3b9e
This commit is contained in:
parent
c4f06efc4b
commit
3d0821d5fd
@ -1522,7 +1522,7 @@ gfxFontFamily::FindFontForChar(GlobalFontMatch *aMatchData)
|
||||
rank += RANK_MATCHED_CMAP;
|
||||
aMatchData->mCount++;
|
||||
|
||||
PRLogModuleInfo *log = gfxPlatform::GetLog(eGfxLog_textrun);
|
||||
LogModule* log = gfxPlatform::GetLog(eGfxLog_textrun);
|
||||
|
||||
if (MOZ_UNLIKELY(MOZ_LOG_TEST(log, LogLevel::Debug))) {
|
||||
uint32_t unicodeRange = FindCharUnicodeRange(aMatchData->mCh);
|
||||
|
@ -1801,26 +1801,16 @@ gfxPlatform::FontsPrefsChanged(const char *aPref)
|
||||
}
|
||||
|
||||
|
||||
PRLogModuleInfo*
|
||||
mozilla::LogModule*
|
||||
gfxPlatform::GetLog(eGfxLog aWhichLog)
|
||||
{
|
||||
// logs shared across gfx
|
||||
static PRLogModuleInfo *sFontlistLog = nullptr;
|
||||
static PRLogModuleInfo *sFontInitLog = nullptr;
|
||||
static PRLogModuleInfo *sTextrunLog = nullptr;
|
||||
static PRLogModuleInfo *sTextrunuiLog = nullptr;
|
||||
static PRLogModuleInfo *sCmapDataLog = nullptr;
|
||||
static PRLogModuleInfo *sTextPerfLog = nullptr;
|
||||
|
||||
// Assume that if one is initialized, all are initialized
|
||||
if (!sFontlistLog) {
|
||||
sFontlistLog = PR_NewLogModule("fontlist");
|
||||
sFontInitLog = PR_NewLogModule("fontinit");
|
||||
sTextrunLog = PR_NewLogModule("textrun");
|
||||
sTextrunuiLog = PR_NewLogModule("textrunui");
|
||||
sCmapDataLog = PR_NewLogModule("cmapdata");
|
||||
sTextPerfLog = PR_NewLogModule("textperf");
|
||||
}
|
||||
static LazyLogModule sFontlistLog("fontlist");
|
||||
static LazyLogModule sFontInitLog("fontinit");
|
||||
static LazyLogModule sTextrunLog("textrun");
|
||||
static LazyLogModule sTextrunuiLog("textrunui");
|
||||
static LazyLogModule sCmapDataLog("cmapdata");
|
||||
static LazyLogModule sTextPerfLog("textperf");
|
||||
|
||||
switch (aWhichLog) {
|
||||
case eGfxLog_fontlist:
|
||||
|
@ -531,7 +531,7 @@ public:
|
||||
/**
|
||||
* Returns a logger if one is available and logging is enabled
|
||||
*/
|
||||
static PRLogModuleInfo* GetLog(eGfxLog aWhichLog);
|
||||
static mozilla::LogModule* GetLog(eGfxLog aWhichLog);
|
||||
|
||||
int GetScreenDepth() const { return mScreenDepth; }
|
||||
mozilla::gfx::IntSize GetScreenSize() const { return mScreenSize; }
|
||||
|
@ -518,7 +518,7 @@ gfxPlatformFontList::SystemFindFontForChar(uint32_t aCh, uint32_t aNextCh,
|
||||
}
|
||||
TimeDuration elapsed = TimeStamp::Now() - start;
|
||||
|
||||
PRLogModuleInfo *log = gfxPlatform::GetLog(eGfxLog_textrun);
|
||||
LogModule* log = gfxPlatform::GetLog(eGfxLog_textrun);
|
||||
|
||||
if (MOZ_UNLIKELY(MOZ_LOG_TEST(log, LogLevel::Warning))) {
|
||||
uint32_t unicodeRange = FindCharUnicodeRange(aCh);
|
||||
|
@ -2135,9 +2135,9 @@ gfxFontGroup::InitTextRun(gfxContext *aContext,
|
||||
}
|
||||
}
|
||||
|
||||
PRLogModuleInfo *log = (mStyle.systemFont ?
|
||||
gfxPlatform::GetLog(eGfxLog_textrunui) :
|
||||
gfxPlatform::GetLog(eGfxLog_textrun));
|
||||
LogModule* log = mStyle.systemFont
|
||||
? gfxPlatform::GetLog(eGfxLog_textrunui)
|
||||
: gfxPlatform::GetLog(eGfxLog_textrun);
|
||||
|
||||
// variant fallback handling may end up passing through this twice
|
||||
bool redo;
|
||||
@ -2907,9 +2907,9 @@ void gfxFontGroup::ComputeRanges(nsTArray<gfxTextRange>& aRanges,
|
||||
aRanges[lastRangeIndex].end = aLength;
|
||||
|
||||
#ifndef RELEASE_BUILD
|
||||
PRLogModuleInfo *log = (mStyle.systemFont ?
|
||||
gfxPlatform::GetLog(eGfxLog_textrunui) :
|
||||
gfxPlatform::GetLog(eGfxLog_textrun));
|
||||
LogModule* log = mStyle.systemFont
|
||||
? gfxPlatform::GetLog(eGfxLog_textrunui)
|
||||
: gfxPlatform::GetLog(eGfxLog_textrun);
|
||||
|
||||
if (MOZ_UNLIKELY(MOZ_LOG_TEST(log, LogLevel::Debug))) {
|
||||
nsAutoCString lang;
|
||||
|
@ -253,7 +253,7 @@ nsPresContext::nsPresContext(nsIDocument* aDocument, nsPresContextType aType)
|
||||
mCounterStylesDirty = true;
|
||||
|
||||
// if text perf logging enabled, init stats struct
|
||||
PRLogModuleInfo *log = gfxPlatform::GetLog(eGfxLog_textperf);
|
||||
LogModule* log = gfxPlatform::GetLog(eGfxLog_textperf);
|
||||
if (MOZ_LOG_TEST(log, LogLevel::Warning)) {
|
||||
mTextPerf = new gfxTextPerfMetrics();
|
||||
}
|
||||
|
@ -1006,7 +1006,7 @@ LogTextPerfStats(gfxTextPerfMetrics* aTextPerf,
|
||||
const gfxTextPerfMetrics::TextCounts& aCounts,
|
||||
float aTime, TextPerfLogType aLogType, const char* aURL)
|
||||
{
|
||||
PRLogModuleInfo* tpLog = gfxPlatform::GetLog(eGfxLog_textperf);
|
||||
LogModule* tpLog = gfxPlatform::GetLog(eGfxLog_textperf);
|
||||
|
||||
// ignore XUL contexts unless at debug level
|
||||
mozilla::LogLevel logLevel = LogLevel::Warning;
|
||||
|
Loading…
Reference in New Issue
Block a user