Bug 1162748 - Remove instances of #ifdef PR_LOGGING in graphics. r=froydnj

PR_LOGGING is now always defined, we can remove #ifdefs checking for it.
This commit is contained in:
Eric Rahm 2015-05-08 14:37:01 -07:00
parent c0f39382bd
commit 12036e82eb
17 changed files with 12 additions and 134 deletions

View File

@ -52,7 +52,6 @@
#include "mozilla/CheckedInt.h"
#if defined(PR_LOGGING)
GFX2D_API PRLogModuleInfo *
GetGFX2DLog()
{
@ -61,7 +60,6 @@ GetGFX2DLog()
sLog = PR_NewLogModule("gfx2d");
return sLog;
}
#endif
// The following code was largely taken from xpcom/glue/SSE.cpp and
// made a little simpler.

View File

@ -22,20 +22,7 @@
#include "BaseRect.h"
#include "Matrix.h"
#ifdef WIN32
// This file gets included from nsGlobalWindow.cpp, which doesn't like
// having windows.h included in it. Since OutputDebugStringA is the only
// thing we need from windows.h, we just declare it here directly.
// Note: the function's documented signature is
// WINBASEAPI void WINAPI OutputDebugStringA(LPCSTR lpOutputString)
// but if we don't include windows.h, the macros WINBASEAPI, WINAPI, and
// LPCSTR are not defined, so we need to replace them with their expansions.
extern "C" __declspec(dllimport) void __stdcall OutputDebugStringA(const char* lpOutputString);
#endif
#if defined(PR_LOGGING)
extern GFX2D_API PRLogModuleInfo *GetGFX2DLog();
#endif
namespace mozilla {
namespace gfx {
@ -55,8 +42,6 @@ const int LOG_DEFAULT = LOG_EVERYTHING;
const int LOG_DEFAULT = LOG_CRITICAL;
#endif
#if defined(PR_LOGGING)
inline PRLogModuleLevel PRLogLevelForLevel(int aLevel) {
switch (aLevel) {
case LOG_CRITICAL:
@ -73,8 +58,6 @@ inline PRLogModuleLevel PRLogLevelForLevel(int aLevel) {
return PR_LOG_DEBUG;
}
#endif
class PreferenceAccess
{
public:
@ -147,19 +130,15 @@ struct BasicLogger
// in the appropriate places in that method.
static bool ShouldOutputMessage(int aLevel) {
if (PreferenceAccess::sGfxLogLevel >= aLevel) {
#if defined(WIN32) && !defined(PR_LOGGING)
#if defined(MOZ_WIDGET_GONK) || defined(MOZ_WIDGET_ANDROID)
return true;
#elif defined(MOZ_WIDGET_GONK) || defined(MOZ_WIDGET_ANDROID)
return true;
#elif defined(PR_LOGGING)
#else
if (PR_LOG_TEST(GetGFX2DLog(), PRLogLevelForLevel(aLevel))) {
return true;
} else if ((PreferenceAccess::sGfxLogLevel >= LOG_DEBUG_PRLOG) ||
(aLevel < LOG_DEBUG)) {
return true;
}
#else
return true;
#endif
}
return false;
@ -178,19 +157,15 @@ struct BasicLogger
// make the corresponding change in the ShouldOutputMessage method
// above.
if (PreferenceAccess::sGfxLogLevel >= aLevel) {
#if defined(WIN32) && !defined(PR_LOGGING)
::OutputDebugStringA((aNoNewline ? aString : aString+"\n").c_str());
#elif defined(MOZ_WIDGET_GONK) || defined(MOZ_WIDGET_ANDROID)
#if defined(MOZ_WIDGET_GONK) || defined(MOZ_WIDGET_ANDROID)
printf_stderr("%s%s", aString.c_str(), aNoNewline ? "" : "\n");
#elif defined(PR_LOGGING)
#else
if (PR_LOG_TEST(GetGFX2DLog(), PRLogLevelForLevel(aLevel))) {
PR_LogPrint("%s%s", aString.c_str(), aNoNewline ? "" : "\n");
} else if ((PreferenceAccess::sGfxLogLevel >= LOG_DEBUG_PRLOG) ||
(aLevel < LOG_DEBUG)) {
printf("%s%s", aString.c_str(), aNoNewline ? "" : "\n");
}
#else
printf("%s%s", aString.c_str(), aNoNewline ? "" : "\n");
#endif
}
}

View File

@ -15,20 +15,15 @@
#ifdef MOZ_WIDGET_GONK
#include <ui/GraphicBuffer.h>
#endif
#if defined(DEBUG) || defined(PR_LOGGING)
# include <stdio.h> // FILE
# include "prlog.h" // for PR_LOG
# ifndef MOZ_LAYERS_HAVE_LOG
# define MOZ_LAYERS_HAVE_LOG
# endif
# define MOZ_LAYERS_LOG(_args) \
#include <stdio.h> // FILE
#include "prlog.h" // for PR_LOG
#ifndef MOZ_LAYERS_HAVE_LOG
# define MOZ_LAYERS_HAVE_LOG
#endif
#define MOZ_LAYERS_LOG(_args) \
PR_LOG(LayerManager::GetLog(), PR_LOG_DEBUG, _args)
# define MOZ_LAYERS_LOG_IF_SHADOWABLE(layer, _args) \
#define MOZ_LAYERS_LOG_IF_SHADOWABLE(layer, _args) \
do { if (layer->AsShadowableLayer()) { PR_LOG(LayerManager::GetLog(), PR_LOG_DEBUG, _args); } } while (0)
#else
# define MOZ_LAYERS_LOG(_args)
# define MOZ_LAYERS_LOG_IF_SHADOWABLE(layer, _args)
#endif // if defined(DEBUG) || defined(PR_LOGGING)
#define INVALID_OVERLAY -1

View File

@ -626,11 +626,9 @@ LayerTransactionParent::RecvUpdate(InfallibleTArray<Edit>&& cset,
severity = 1.f;
}
mLayerManager->VisualFrameWarning(severity);
#ifdef PR_LOGGING
PR_LogPrint("LayerTransactionParent::RecvUpdate transaction from process %d took %f ms",
OtherPid(),
latency.ToMilliseconds());
#endif
}
}

View File

@ -212,7 +212,6 @@ gfxDWriteFontFamily::FindStyleVariations(FontInfoData *aFontInfoData)
}
}
#ifdef PR_LOGGING
if (LOG_FONTLIST_ENABLED()) {
LOG_FONTLIST(("(fontlist) added (%s) to family (%s)"
" with style: %s weight: %d stretch: %d psname: %s fullname: %s",
@ -223,7 +222,6 @@ gfxDWriteFontFamily::FindStyleVariations(FontInfoData *aFontInfoData)
NS_ConvertUTF16toUTF8(psname).get(),
NS_ConvertUTF16toUTF8(fullname).get()));
}
#endif
}
// assume that if no error, all postscript/fullnames were initialized
@ -556,7 +554,6 @@ gfxDWriteFontEntry::ReadCMAP(FontInfoData *aFontInfoData)
mCharacterMap = new gfxCharacterMap();
}
#ifdef PR_LOGGING
LOG_FONTLIST(("(fontlist-cmap) name: %s, size: %d hash: %8.8x%s\n",
NS_ConvertUTF16toUTF8(mName).get(),
charmap->SizeOfIncludingThis(moz_malloc_size_of),
@ -567,7 +564,6 @@ gfxDWriteFontEntry::ReadCMAP(FontInfoData *aFontInfoData)
NS_ConvertUTF16toUTF8(mName).get());
charmap->Dump(prefix, eGfxLog_cmapdata);
}
#endif
return rv;
}
@ -1024,7 +1020,6 @@ gfxDWriteFontList::DelayedInitFontList()
faces[i]->mFamilyName = gillSansMTFamily->Name();
gillSansMTFamily->AddFontEntry(faces[i]);
#ifdef PR_LOGGING
if (LOG_FONTLIST_ENABLED()) {
gfxFontEntry *fe = faces[i];
LOG_FONTLIST(("(fontlist) moved (%s) to family (%s)"
@ -1034,7 +1029,6 @@ gfxDWriteFontList::DelayedInitFontList()
(fe->IsItalic()) ? "italic" : "normal",
fe->Weight(), fe->Stretch()));
}
#endif
}
// remove Gills Sans

View File

@ -50,7 +50,6 @@
using namespace mozilla;
#ifdef PR_LOGGING
static PRLogModuleInfo *
GetFontInfoLog()
{
@ -59,7 +58,6 @@ GetFontInfoLog()
sLog = PR_NewLogModule("fontInfoLog");
return sLog;
}
#endif /* PR_LOGGING */
#undef LOG
#define LOG(args) PR_LOG(GetFontInfoLog(), PR_LOG_DEBUG, args)
@ -1055,7 +1053,6 @@ gfxFT2FontList::AddFaceToList(const nsCString& aEntryName, uint32_t aIndex,
fe->CheckForBrokenFont(family);
AppendToFaceList(aFaceList, name, fe);
#ifdef PR_LOGGING
if (LOG_ENABLED()) {
LOG(("(fontinit) added (%s) to family (%s)"
" with style: %s weight: %d stretch: %d",
@ -1064,7 +1061,6 @@ gfxFT2FontList::AddFaceToList(const nsCString& aEntryName, uint32_t aIndex,
fe->IsItalic() ? "italic" : "normal",
fe->Weight(), fe->Stretch()));
}
#endif
}
}

View File

@ -72,13 +72,11 @@ uint32_t gGlyphExtentsSetupLazyTight = 0;
uint32_t gGlyphExtentsSetupFallBackToTight = 0;
#endif
#ifdef PR_LOGGING
#define LOG_FONTINIT(args) PR_LOG(gfxPlatform::GetLog(eGfxLog_fontinit), \
PR_LOG_DEBUG, args)
#define LOG_FONTINIT_ENABLED() PR_LOG_TEST( \
gfxPlatform::GetLog(eGfxLog_fontinit), \
PR_LOG_DEBUG)
#endif // PR_LOGGING
/*
@ -1082,13 +1080,11 @@ gfxFont::CheckForFeaturesInvolvingSpace()
{
mFontEntry->mHasSpaceFeaturesInitialized = true;
#ifdef PR_LOGGING
bool log = LOG_FONTINIT_ENABLED();
TimeStamp start;
if (MOZ_UNLIKELY(log)) {
start = TimeStamp::Now();
}
#endif
bool result = false;
@ -1185,7 +1181,6 @@ gfxFont::CheckForFeaturesInvolvingSpace()
hb_face_destroy(face);
mFontEntry->mHasSpaceFeatures = result;
#ifdef PR_LOGGING
if (MOZ_UNLIKELY(log)) {
TimeDuration elapsed = TimeStamp::Now() - start;
LOG_FONTINIT((
@ -1207,7 +1202,6 @@ gfxFont::CheckForFeaturesInvolvingSpace()
elapsed.ToMilliseconds()
));
}
#endif
}
bool

View File

@ -1476,7 +1476,7 @@ gfxFontFamily::FindFontForChar(GlobalFontMatch *aMatchData)
if (fe->HasCharacter(aMatchData->mCh)) {
rank += RANK_MATCHED_CMAP;
aMatchData->mCount++;
#ifdef PR_LOGGING
PRLogModuleInfo *log = gfxPlatform::GetLog(eGfxLog_textrun);
if (MOZ_UNLIKELY(PR_LOG_TEST(log, PR_LOG_DEBUG))) {
@ -1489,7 +1489,6 @@ gfxFontFamily::FindFontForChar(GlobalFontMatch *aMatchData)
unicodeRange, script,
NS_ConvertUTF16toUTF8(fe->Name()).get()));
}
#endif
}
aMatchData->mCmapsTested++;

View File

@ -25,13 +25,9 @@
#include "plbase64.h"
#include "prlog.h"
#ifdef PR_LOGGING
#define LOG(log, args) PR_LOG(gfxPlatform::GetLog(log), \
PR_LOG_DEBUG, args)
#endif // PR_LOGGING
#define UNICODE_BMP_LIMIT 0x10000
using namespace mozilla;
@ -63,7 +59,6 @@ typedef struct {
#pragma pack()
#if PR_LOGGING
void
gfxSparseBitSet::Dump(const char* aPrefix, eGfxLog aWhichLog) const
{
@ -91,7 +86,6 @@ gfxSparseBitSet::Dump(const char* aPrefix, eGfxLog aWhichLog) const
LOG(aWhichLog, ("%s", outStr));
}
}
#endif
nsresult
gfxFontUtils::ReadCMAPTableFormat10(const uint8_t *aBuf, uint32_t aLength,

View File

@ -81,10 +81,8 @@ public:
return ((block->mBits[(aIndex>>3) & (BLOCK_SIZE - 1)]) & (1 << (aIndex & 0x7))) != 0;
}
#if PR_LOGGING
// dump out contents of bitmap
void Dump(const char* aPrefix, eGfxLog aWhichLog) const;
#endif
bool TestRange(uint32_t aStart, uint32_t aEnd) {
uint32_t startBlock, endBlock, blockLen;

View File

@ -40,7 +40,6 @@ using namespace mozilla;
#define CLEARTYPE_QUALITY 5
#endif
#ifdef PR_LOGGING
#define LOG_FONTLIST(args) PR_LOG(gfxPlatform::GetLog(eGfxLog_fontlist), \
PR_LOG_DEBUG, args)
#define LOG_FONTLIST_ENABLED() PR_LOG_TEST( \
@ -51,8 +50,6 @@ using namespace mozilla;
gfxPlatform::GetLog(eGfxLog_cmapdata), \
PR_LOG_DEBUG)
#endif // PR_LOGGING
static __inline void
BuildKeyNameFromFontName(nsAString &aName)
{
@ -195,7 +192,6 @@ GDIFontEntry::ReadCMAP(FontInfoData *aFontInfoData)
mCharacterMap->mBuildOnTheFly = true;
}
#ifdef PR_LOGGING
LOG_FONTLIST(("(fontlist-cmap) name: %s, size: %d hash: %8.8x%s\n",
NS_ConvertUTF16toUTF8(mName).get(),
charmap->SizeOfIncludingThis(moz_malloc_size_of),
@ -206,7 +202,6 @@ GDIFontEntry::ReadCMAP(FontInfoData *aFontInfoData)
NS_ConvertUTF16toUTF8(mName).get());
charmap->Dump(prefix, eGfxLog_cmapdata);
}
#endif
return rv;
}
@ -501,7 +496,6 @@ GDIFontFamily::FamilyAddStylesProc(const ENUMLOGFONTEXW *lpelfe,
}
}
#ifdef PR_LOGGING
if (LOG_FONTLIST_ENABLED()) {
LOG_FONTLIST(("(fontlist) added (%s) to family (%s)"
" with style: %s weight: %d stretch: %d",
@ -510,7 +504,6 @@ GDIFontFamily::FamilyAddStylesProc(const ENUMLOGFONTEXW *lpelfe,
(logFont.lfItalic == 0xff) ? "italic" : "normal",
logFont.lfWeight, fe->Stretch()));
}
#endif
return 1;
}

View File

@ -129,8 +129,6 @@ static NSString* GetNSStringForString(const nsAString& aSrc)
length:aSrc.Length()];
}
#ifdef PR_LOGGING
#define LOG_FONTLIST(args) PR_LOG(gfxPlatform::GetLog(eGfxLog_fontlist), \
PR_LOG_DEBUG, args)
#define LOG_FONTLIST_ENABLED() PR_LOG_TEST( \
@ -140,8 +138,6 @@ static NSString* GetNSStringForString(const nsAString& aSrc)
gfxPlatform::GetLog(eGfxLog_cmapdata), \
PR_LOG_DEBUG)
#endif // PR_LOGGING
#pragma mark-
// Complex scripts will not render correctly unless appropriate AAT or OT
@ -238,7 +234,6 @@ MacOSFontEntry::ReadCMAP(FontInfoData *aFontInfoData)
mCharacterMap = new gfxCharacterMap();
}
#ifdef PR_LOGGING
LOG_FONTLIST(("(fontlist-cmap) name: %s, size: %d hash: %8.8x%s\n",
NS_ConvertUTF16toUTF8(mName).get(),
charmap->SizeOfIncludingThis(moz_malloc_size_of),
@ -249,7 +244,6 @@ MacOSFontEntry::ReadCMAP(FontInfoData *aFontInfoData)
NS_ConvertUTF16toUTF8(mName).get());
charmap->Dump(prefix, eGfxLog_cmapdata);
}
#endif
return rv;
}
@ -542,7 +536,6 @@ gfxMacFontFamily::FindStyleVariations(FontInfoData *aFontInfoData)
fontEntry->mFixedPitch = true;
}
#ifdef PR_LOGGING
if (LOG_FONTLIST_ENABLED()) {
LOG_FONTLIST(("(fontlist) added (%s) to family (%s)"
" with style: %s weight: %d stretch: %d"
@ -553,7 +546,6 @@ gfxMacFontFamily::FindStyleVariations(FontInfoData *aFontInfoData)
cssWeight, fontEntry->Stretch(),
appKitWeight, macTraits));
}
#endif
// insert into font entry array of family
AddFontEntry(fontEntry);
@ -752,10 +744,8 @@ gfxMacPlatformFontList::InitSingleFaceList()
uint32_t numFonts = singleFaceFonts.Length();
for (uint32_t i = 0; i < numFonts; i++) {
#ifdef PR_LOGGING
LOG_FONTLIST(("(fontlist-singleface) face name: %s\n",
NS_ConvertUTF16toUTF8(singleFaceFonts[i]).get()));
#endif
gfxFontEntry *fontEntry = LookupLocalFont(singleFaceFonts[i],
400, 0,
NS_FONT_STYLE_NORMAL);
@ -763,11 +753,9 @@ gfxMacPlatformFontList::InitSingleFaceList()
nsAutoString familyName, key;
familyName = singleFaceFonts[i];
GenerateFontListKey(familyName, key);
#ifdef PR_LOGGING
LOG_FONTLIST(("(fontlist-singleface) family name: %s, key: %s\n",
NS_ConvertUTF16toUTF8(familyName).get(),
NS_ConvertUTF16toUTF8(key).get()));
#endif
// add only if doesn't exist already
if (!mFontFamilies.GetWeak(key)) {
@ -778,11 +766,9 @@ gfxMacPlatformFontList::InitSingleFaceList()
familyEntry->AddFontEntry(fontEntry);
familyEntry->SetHasStyles(true);
mFontFamilies.Put(key, familyEntry);
#ifdef PR_LOGGING
LOG_FONTLIST(("(fontlist-singleface) added new family\n",
NS_ConvertUTF16toUTF8(familyName).get(),
NS_ConvertUTF16toUTF8(key).get()));
#endif
}
}
}

View File

@ -2083,7 +2083,6 @@ PRLogModuleInfo*
gfxPlatform::GetLog(eGfxLog aWhichLog)
{
// logs shared across gfx
#ifdef PR_LOGGING
static PRLogModuleInfo *sFontlistLog = nullptr;
static PRLogModuleInfo *sFontInitLog = nullptr;
static PRLogModuleInfo *sTextrunLog = nullptr;
@ -2125,9 +2124,6 @@ gfxPlatform::GetLog(eGfxLog aWhichLog)
}
return nullptr;
#else
return nullptr;
#endif
}
int

View File

@ -23,8 +23,6 @@
using namespace mozilla;
#ifdef PR_LOGGING
#define LOG_FONTLIST(args) PR_LOG(gfxPlatform::GetLog(eGfxLog_fontlist), \
PR_LOG_DEBUG, args)
#define LOG_FONTLIST_ENABLED() PR_LOG_TEST( \
@ -36,8 +34,6 @@ using namespace mozilla;
gfxPlatform::GetLog(eGfxLog_fontinit), \
PR_LOG_DEBUG)
#endif // PR_LOGGING
gfxPlatformFontList *gfxPlatformFontList::sPlatformFontList = nullptr;
// Character ranges that require complex-script shaping support in the font,
@ -268,14 +264,12 @@ gfxPlatformFontList::InitOtherFamilyNames()
Telemetry::AccumulateTimeDelta(Telemetry::FONTLIST_INITOTHERFAMILYNAMES,
start, end);
#ifdef PR_LOGGING
if (LOG_FONTINIT_ENABLED()) {
TimeDuration elapsed = end - start;
LOG_FONTINIT(("(fontinit) InitOtherFamilyNames took %8.2f ms %s",
elapsed.ToMilliseconds(),
(otherNamesData.mTimedOut ? "timeout" : "")));
}
#endif
}
#define OTHERNAMES_TIMEOUT 200
@ -328,7 +322,6 @@ gfxPlatformFontList::SearchFamiliesForFaceName(const nsAString& aFaceName)
TimeStamp end = TimeStamp::Now();
Telemetry::AccumulateTimeDelta(Telemetry::FONTLIST_INITFACENAMELISTS,
start, end);
#ifdef PR_LOGGING
if (LOG_FONTINIT_ENABLED()) {
TimeDuration elapsed = end - start;
LOG_FONTINIT(("(fontinit) SearchFamiliesForFaceName took %8.2f ms %s %s",
@ -336,7 +329,6 @@ gfxPlatformFontList::SearchFamiliesForFaceName(const nsAString& aFaceName)
(lookup ? "found name" : ""),
(faceNameListsData.mTimedOut ? "timeout" : "")));
}
#endif
return lookup;
}
@ -586,7 +578,6 @@ gfxPlatformFontList::SystemFindFontForChar(uint32_t aCh, uint32_t aNextCh,
}
TimeDuration elapsed = TimeStamp::Now() - start;
#ifdef PR_LOGGING
PRLogModuleInfo *log = gfxPlatform::GetLog(eGfxLog_textrun);
if (MOZ_UNLIKELY(PR_LOG_TEST(log, PR_LOG_WARNING))) {
@ -603,7 +594,6 @@ gfxPlatformFontList::SystemFindFontForChar(uint32_t aCh, uint32_t aNextCh,
int32_t(elapsed.ToMicroseconds()),
cmapCount));
}
#endif
// no match? add to set of non-matching codepoints
if (!fontEntry) {
@ -818,12 +808,10 @@ gfxPlatformFontList::AddOtherFamilyName(gfxFontFamily *aFamilyEntry, nsAString&
if (!mOtherFamilyNames.GetWeak(key)) {
mOtherFamilyNames.Put(key, aFamilyEntry);
#ifdef PR_LOGGING
LOG_FONTLIST(("(fontlist-otherfamily) canonical family: %s, "
"other family: %s\n",
NS_ConvertUTF16toUTF8(aFamilyEntry->Name()).get(),
NS_ConvertUTF16toUTF8(aOtherFamilyName).get()));
#endif
if (mBadUnderlineFamilyNames.Contains(key))
aFamilyEntry->SetBadUnderlineFamily();
}
@ -834,11 +822,9 @@ gfxPlatformFontList::AddFullname(gfxFontEntry *aFontEntry, nsAString& aFullname)
{
if (!mExtraNames->mFullnames.GetWeak(aFullname)) {
mExtraNames->mFullnames.Put(aFullname, aFontEntry);
#ifdef PR_LOGGING
LOG_FONTLIST(("(fontlist-fullname) name: %s, fullname: %s\n",
NS_ConvertUTF16toUTF8(aFontEntry->Name()).get(),
NS_ConvertUTF16toUTF8(aFullname).get()));
#endif
}
}
@ -847,11 +833,9 @@ gfxPlatformFontList::AddPostscriptName(gfxFontEntry *aFontEntry, nsAString& aPos
{
if (!mExtraNames->mPostscriptNames.GetWeak(aPostscriptName)) {
mExtraNames->mPostscriptNames.Put(aPostscriptName, aFontEntry);
#ifdef PR_LOGGING
LOG_FONTLIST(("(fontlist-postscript) name: %s, psname: %s\n",
NS_ConvertUTF16toUTF8(aFontEntry->Name()).get(),
NS_ConvertUTF16toUTF8(aPostscriptName).get()));
#endif
}
}
@ -967,13 +951,11 @@ gfxPlatformFontList::LoadFontInfo()
mStartIndex = endIndex;
bool done = mStartIndex >= mNumFamilies;
#ifdef PR_LOGGING
if (LOG_FONTINIT_ENABLED()) {
TimeDuration elapsed = TimeStamp::Now() - start;
LOG_FONTINIT(("(fontinit) fontloader load pass %8.2f ms done %s\n",
elapsed.ToMilliseconds(), (done ? "true" : "false")));
}
#endif
if (done) {
mOtherFamilyNamesInitialized = true;
@ -1057,7 +1039,6 @@ gfxPlatformFontList::CleanupLoader()
}
}
#ifdef PR_LOGGING
if (LOG_FONTINIT_ENABLED() && mFontInfo) {
LOG_FONTINIT(("(fontinit) fontloader load thread took %8.2f ms "
"%d families %d fonts %d cmaps "
@ -1071,7 +1052,6 @@ gfxPlatformFontList::CleanupLoader()
(rebuilt ? "(userfont sets rebuilt)" : ""),
(forceReflow ? "(global reflow)" : "")));
}
#endif
gfxFontInfoLoader::CleanupLoader();
}

View File

@ -2199,11 +2199,9 @@ gfxFontGroup::InitTextRun(gfxContext *aContext,
}
}
#ifdef PR_LOGGING
PRLogModuleInfo *log = (mStyle.systemFont ?
gfxPlatform::GetLog(eGfxLog_textrunui) :
gfxPlatform::GetLog(eGfxLog_textrun));
#endif
// variant fallback handling may end up passing through this twice
bool redo;
@ -2212,7 +2210,6 @@ gfxFontGroup::InitTextRun(gfxContext *aContext,
if (sizeof(T) == sizeof(uint8_t) && !transformedString) {
#ifdef PR_LOGGING
if (MOZ_UNLIKELY(PR_LOG_TEST(log, PR_LOG_WARNING))) {
nsAutoCString lang;
mStyle.language->ToUTF8String(lang);
@ -2238,7 +2235,6 @@ gfxFontGroup::InitTextRun(gfxContext *aContext,
sizeof(T),
str.get()));
}
#endif
// the text is still purely 8-bit; bypass the script-run itemizer
// and treat it as a single Latin run
@ -2262,7 +2258,6 @@ gfxFontGroup::InitTextRun(gfxContext *aContext,
int32_t runScript = MOZ_SCRIPT_LATIN;
while (scriptRuns.Next(runStart, runLimit, runScript)) {
#ifdef PR_LOGGING
if (MOZ_UNLIKELY(PR_LOG_TEST(log, PR_LOG_WARNING))) {
nsAutoCString lang;
mStyle.language->ToUTF8String(lang);
@ -2288,7 +2283,6 @@ gfxFontGroup::InitTextRun(gfxContext *aContext,
sizeof(T),
NS_ConvertUTF16toUTF8(textPtr + runStart, runLen).get()));
}
#endif
InitScriptRun(aContext, aTextRun, textPtr + runStart,
runStart, runLimit - runStart, runScript, aMFR);

View File

@ -24,7 +24,6 @@
using namespace mozilla;
#ifdef PR_LOGGING
PRLogModuleInfo*
gfxUserFontSet::GetUserFontsLog()
{
@ -33,7 +32,6 @@ gfxUserFontSet::GetUserFontsLog()
sLog = PR_NewLogModule("userfonts");
return sLog;
}
#endif /* PR_LOGGING */
#define LOG(args) PR_LOG(gfxUserFontSet::GetUserFontsLog(), PR_LOG_DEBUG, args)
#define LOG_ENABLED() PR_LOG_TEST(gfxUserFontSet::GetUserFontsLog(), PR_LOG_DEBUG)
@ -501,7 +499,6 @@ gfxUserFontEntry::LoadNextSrc()
bool loadOK = NS_SUCCEEDED(rv);
if (loadOK) {
#ifdef PR_LOGGING
if (LOG_ENABLED()) {
nsAutoCString fontURI;
currSrc.mURI->GetSpec(fontURI);
@ -509,7 +506,6 @@ gfxUserFontEntry::LoadNextSrc()
mFontSet, mSrcIndex, fontURI.get(),
NS_ConvertUTF16toUTF8(mFamilyName).get()));
}
#endif
return;
} else {
mFontSet->LogMessage(this,
@ -646,7 +642,6 @@ gfxUserFontEntry::LoadPlatformFont(const uint8_t* aFontData, uint32_t& aLength)
fe->mFamilyName = mFamilyName;
StoreUserFontData(fe, mFontSet->GetPrivateBrowsing(), originalFullName,
&metadata, metaOrigLen, compression);
#ifdef PR_LOGGING
if (LOG_ENABLED()) {
nsAutoCString fontURI;
mSrcList[mSrcIndex].mURI->GetSpec(fontURI);
@ -656,12 +651,10 @@ gfxUserFontEntry::LoadPlatformFont(const uint8_t* aFontData, uint32_t& aLength)
this,
uint32_t(mFontSet->mGeneration)));
}
#endif
mPlatformFontEntry = fe;
SetLoadState(STATUS_LOADED);
gfxUserFontSet::UserFontCache::CacheFont(fe);
} else {
#ifdef PR_LOGGING
if (LOG_ENABLED()) {
nsAutoCString fontURI;
mSrcList[mSrcIndex].mURI->GetSpec(fontURI);
@ -670,7 +663,6 @@ gfxUserFontEntry::LoadPlatformFont(const uint8_t* aFontData, uint32_t& aLength)
mFontSet, mSrcIndex, fontURI.get(),
NS_ConvertUTF16toUTF8(mFamilyName).get()));
}
#endif
}
// The downloaded data can now be discarded; the font entry is using the
@ -848,7 +840,6 @@ gfxUserFontSet::AddUserFontEntry(const nsAString& aFamilyName,
gfxUserFontFamily* family = GetFamily(aFamilyName);
family->AddFontEntry(aUserFontEntry);
#ifdef PR_LOGGING
if (LOG_ENABLED()) {
LOG(("userfonts (%p) added to \"%s\" (%p) style: %s weight: %d "
"stretch: %d",
@ -856,7 +847,6 @@ gfxUserFontSet::AddUserFontEntry(const nsAString& aFamilyName,
(aUserFontEntry->IsItalic() ? "italic" : "normal"),
aUserFontEntry->Weight(), aUserFontEntry->Stretch()));
}
#endif
}
gfxUserFontEntry*

View File

@ -467,9 +467,7 @@ public:
mLocalRulesUsed = true;
}
#ifdef PR_LOGGING
static PRLogModuleInfo* GetUserFontsLog();
#endif
protected:
// Protected destructor, to discourage deletion outside of Release():