mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 971817 - GetLog statics are initialized too late. r=jdaggett
This commit is contained in:
parent
3aefeb541c
commit
e2c9e99ba6
@ -114,16 +114,6 @@ static bool sDrawFrameCounter = false;
|
||||
#include "mozilla/gfx/2D.h"
|
||||
using namespace mozilla::gfx;
|
||||
|
||||
// logs shared across gfx
|
||||
#ifdef PR_LOGGING
|
||||
static PRLogModuleInfo *sFontlistLog = nullptr;
|
||||
static PRLogModuleInfo *sFontInitLog = nullptr;
|
||||
static PRLogModuleInfo *sTextrunLog = nullptr;
|
||||
static PRLogModuleInfo *sTextrunuiLog = nullptr;
|
||||
static PRLogModuleInfo *sCmapDataLog = nullptr;
|
||||
static PRLogModuleInfo *sTextPerfLog = nullptr;
|
||||
#endif
|
||||
|
||||
/* Class to listen for pref changes so that chrome code can dynamically
|
||||
force sRGB as an output profile. See Bug #452125. */
|
||||
class SRGBOverrideObserver MOZ_FINAL : public nsIObserver,
|
||||
@ -380,15 +370,6 @@ gfxPlatform::Init()
|
||||
// be done after the preference migration using MigratePrefs().
|
||||
gfxPrefs::One();
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
sFontlistLog = PR_NewLogModule("fontlist");
|
||||
sFontInitLog = PR_NewLogModule("fontinit");
|
||||
sTextrunLog = PR_NewLogModule("textrun");
|
||||
sTextrunuiLog = PR_NewLogModule("textrunui");
|
||||
sCmapDataLog = PR_NewLogModule("cmapdata");
|
||||
sTextPerfLog = PR_NewLogModule("textperf");
|
||||
#endif
|
||||
|
||||
gGfxPlatformPrefsLock = new Mutex("gfxPlatform::gGfxPlatformPrefsLock");
|
||||
|
||||
/* Initialize the GfxInfo service.
|
||||
@ -1968,7 +1949,25 @@ gfxPlatform::FontsPrefsChanged(const char *aPref)
|
||||
PRLogModuleInfo*
|
||||
gfxPlatform::GetLog(eGfxLog aWhichLog)
|
||||
{
|
||||
// logs shared across gfx
|
||||
#ifdef PR_LOGGING
|
||||
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");
|
||||
}
|
||||
|
||||
switch (aWhichLog) {
|
||||
case eGfxLog_fontlist:
|
||||
return sFontlistLog;
|
||||
|
Loading…
Reference in New Issue
Block a user