зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1219476 (part 5) - Replace PRLogModuleInfo usage with LazyLogModule in gfx/. r=erahm.
--HG-- extra : rebase_source : c39ecc84dbe9a0f94b42f1c78dabf346ce3a3b9e
This commit is contained in:
Родитель
c4f06efc4b
Коммит
3d0821d5fd
|
@ -1522,7 +1522,7 @@ gfxFontFamily::FindFontForChar(GlobalFontMatch *aMatchData)
|
||||||
rank += RANK_MATCHED_CMAP;
|
rank += RANK_MATCHED_CMAP;
|
||||||
aMatchData->mCount++;
|
aMatchData->mCount++;
|
||||||
|
|
||||||
PRLogModuleInfo *log = gfxPlatform::GetLog(eGfxLog_textrun);
|
LogModule* log = gfxPlatform::GetLog(eGfxLog_textrun);
|
||||||
|
|
||||||
if (MOZ_UNLIKELY(MOZ_LOG_TEST(log, LogLevel::Debug))) {
|
if (MOZ_UNLIKELY(MOZ_LOG_TEST(log, LogLevel::Debug))) {
|
||||||
uint32_t unicodeRange = FindCharUnicodeRange(aMatchData->mCh);
|
uint32_t unicodeRange = FindCharUnicodeRange(aMatchData->mCh);
|
||||||
|
|
|
@ -1801,26 +1801,16 @@ gfxPlatform::FontsPrefsChanged(const char *aPref)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PRLogModuleInfo*
|
mozilla::LogModule*
|
||||||
gfxPlatform::GetLog(eGfxLog aWhichLog)
|
gfxPlatform::GetLog(eGfxLog aWhichLog)
|
||||||
{
|
{
|
||||||
// logs shared across gfx
|
// logs shared across gfx
|
||||||
static PRLogModuleInfo *sFontlistLog = nullptr;
|
static LazyLogModule sFontlistLog("fontlist");
|
||||||
static PRLogModuleInfo *sFontInitLog = nullptr;
|
static LazyLogModule sFontInitLog("fontinit");
|
||||||
static PRLogModuleInfo *sTextrunLog = nullptr;
|
static LazyLogModule sTextrunLog("textrun");
|
||||||
static PRLogModuleInfo *sTextrunuiLog = nullptr;
|
static LazyLogModule sTextrunuiLog("textrunui");
|
||||||
static PRLogModuleInfo *sCmapDataLog = nullptr;
|
static LazyLogModule sCmapDataLog("cmapdata");
|
||||||
static PRLogModuleInfo *sTextPerfLog = nullptr;
|
static LazyLogModule sTextPerfLog("textperf");
|
||||||
|
|
||||||
// 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");
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (aWhichLog) {
|
switch (aWhichLog) {
|
||||||
case eGfxLog_fontlist:
|
case eGfxLog_fontlist:
|
||||||
|
|
|
@ -531,7 +531,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* Returns a logger if one is available and logging is enabled
|
* 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; }
|
int GetScreenDepth() const { return mScreenDepth; }
|
||||||
mozilla::gfx::IntSize GetScreenSize() const { return mScreenSize; }
|
mozilla::gfx::IntSize GetScreenSize() const { return mScreenSize; }
|
||||||
|
|
|
@ -518,7 +518,7 @@ gfxPlatformFontList::SystemFindFontForChar(uint32_t aCh, uint32_t aNextCh,
|
||||||
}
|
}
|
||||||
TimeDuration elapsed = TimeStamp::Now() - start;
|
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))) {
|
if (MOZ_UNLIKELY(MOZ_LOG_TEST(log, LogLevel::Warning))) {
|
||||||
uint32_t unicodeRange = FindCharUnicodeRange(aCh);
|
uint32_t unicodeRange = FindCharUnicodeRange(aCh);
|
||||||
|
|
|
@ -2135,9 +2135,9 @@ gfxFontGroup::InitTextRun(gfxContext *aContext,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PRLogModuleInfo *log = (mStyle.systemFont ?
|
LogModule* log = mStyle.systemFont
|
||||||
gfxPlatform::GetLog(eGfxLog_textrunui) :
|
? gfxPlatform::GetLog(eGfxLog_textrunui)
|
||||||
gfxPlatform::GetLog(eGfxLog_textrun));
|
: gfxPlatform::GetLog(eGfxLog_textrun);
|
||||||
|
|
||||||
// variant fallback handling may end up passing through this twice
|
// variant fallback handling may end up passing through this twice
|
||||||
bool redo;
|
bool redo;
|
||||||
|
@ -2907,9 +2907,9 @@ void gfxFontGroup::ComputeRanges(nsTArray<gfxTextRange>& aRanges,
|
||||||
aRanges[lastRangeIndex].end = aLength;
|
aRanges[lastRangeIndex].end = aLength;
|
||||||
|
|
||||||
#ifndef RELEASE_BUILD
|
#ifndef RELEASE_BUILD
|
||||||
PRLogModuleInfo *log = (mStyle.systemFont ?
|
LogModule* log = mStyle.systemFont
|
||||||
gfxPlatform::GetLog(eGfxLog_textrunui) :
|
? gfxPlatform::GetLog(eGfxLog_textrunui)
|
||||||
gfxPlatform::GetLog(eGfxLog_textrun));
|
: gfxPlatform::GetLog(eGfxLog_textrun);
|
||||||
|
|
||||||
if (MOZ_UNLIKELY(MOZ_LOG_TEST(log, LogLevel::Debug))) {
|
if (MOZ_UNLIKELY(MOZ_LOG_TEST(log, LogLevel::Debug))) {
|
||||||
nsAutoCString lang;
|
nsAutoCString lang;
|
||||||
|
|
|
@ -253,7 +253,7 @@ nsPresContext::nsPresContext(nsIDocument* aDocument, nsPresContextType aType)
|
||||||
mCounterStylesDirty = true;
|
mCounterStylesDirty = true;
|
||||||
|
|
||||||
// if text perf logging enabled, init stats struct
|
// 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)) {
|
if (MOZ_LOG_TEST(log, LogLevel::Warning)) {
|
||||||
mTextPerf = new gfxTextPerfMetrics();
|
mTextPerf = new gfxTextPerfMetrics();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1006,7 +1006,7 @@ LogTextPerfStats(gfxTextPerfMetrics* aTextPerf,
|
||||||
const gfxTextPerfMetrics::TextCounts& aCounts,
|
const gfxTextPerfMetrics::TextCounts& aCounts,
|
||||||
float aTime, TextPerfLogType aLogType, const char* aURL)
|
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
|
// ignore XUL contexts unless at debug level
|
||||||
mozilla::LogLevel logLevel = LogLevel::Warning;
|
mozilla::LogLevel logLevel = LogLevel::Warning;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче