Bug 958596 - Add support for gfx logging on android and b2g. r=Bas

This commit is contained in:
Botond Ballo 2014-01-21 20:11:52 -05:00
parent 4898c7bc20
commit 59cfc76456

View File

@ -10,6 +10,7 @@
#include <sstream> #include <sstream>
#include <stdio.h> #include <stdio.h>
#include "nsDebug.h"
#include "Point.h" #include "Point.h"
#include "Matrix.h" #include "Matrix.h"
@ -57,13 +58,13 @@ static inline void OutputMessage(const std::string &aString, int aLevel) {
if (aLevel >= sGfxLogLevel) { if (aLevel >= sGfxLogLevel) {
::OutputDebugStringA(aString.c_str()); ::OutputDebugStringA(aString.c_str());
} }
#elif defined(PR_LOGGING) #elif defined(PR_LOGGING) && !(defined(MOZ_WIDGET_GONK) || defined(MOZ_WIDGET_ANDROID))
if (PR_LOG_TEST(GetGFX2DLog(), PRLogLevelForLevel(aLevel))) { if (PR_LOG_TEST(GetGFX2DLog(), PRLogLevelForLevel(aLevel))) {
PR_LogPrint(aString.c_str()); PR_LogPrint(aString.c_str());
} }
#else #else
if (aLevel >= sGfxLogLevel) { if (aLevel >= sGfxLogLevel) {
printf("%s", aString.c_str()); printf_stderr("%s", aString.c_str());
} }
#endif #endif
} }