Bug 1275744 - Reference MOZ_LOG in graphics comments. r=erahm draft
authorRalph Giles <giles@mozilla.com>
Thu, 26 May 2016 11:41:29 -0700
changeset 377607 87573e43e8b1c00ffe69a70eebb85fa564245ffc
parent 377606 c13f09d58764f76b1e398a3699460ec4f1dd61cd
child 377608 f7ffa2f0328273a8b7f5b140f5bebe8eb6ca78c2
push id20838
push userbmo:giles@thaumas.net
push dateFri, 10 Jun 2016 20:57:58 +0000
reviewerserahm
bugs1275744
milestone50.0a1
Bug 1275744 - Reference MOZ_LOG in graphics comments. r=erahm NSPR_LOG_MODULES is deprecated. MozReview-Commit-ID: HZzskDYsTo9
gfx/2d/Logging.h
image/decoders/nsBMPDecoder.cpp
--- a/gfx/2d/Logging.h
+++ b/gfx/2d/Logging.h
@@ -63,21 +63,19 @@ inline mozilla::LogLevel PRLogLevelForLe
 }
 #endif
 
 class LoggingPrefs
 {
 public:
   // Used to choose the level of logging we get.  The higher the number,
   // the more logging we get.  Value of zero will give you no logging,
-  // 1 just errors, 2 adds warnings and 3 adds logging/debug.  4 is used to
-  // selectively enable logging on the configurations that
-  // support prlog (on other systems, 3 and 4 are the same.)  For prlog,
-  // in addition to setting the value to 4, you will need to set an
-  // environment variable NSPR_LOG_MODULES to gfx:4. See prlog.h for details.
+  // 1 just errors, 2 adds warnings and 3 or 4 add debug logging.
+  // In addition to setting the value to 4, you will need to set the
+  // environment variable MOZ_LOG to gfx:4. See mozilla/Logging.h for details.
   static int32_t sGfxLogLevel;
 };
 
 /// Graphics logging is available in both debug and release builds and is
 /// controlled with a gfx.logging.level preference. If not set, the default
 /// for the preference is 5 in the debug builds, 1 in the release builds.
 ///
 /// gfxDebug only works in the debug builds, and is used for information
--- a/image/decoders/nsBMPDecoder.cpp
+++ b/image/decoders/nsBMPDecoder.cpp
@@ -537,17 +537,17 @@ nsBMPDecoder::ReadInfoHeaderRest(const c
     mH.mNumColors   = aLength >= 32 ? LittleEndian::readUint32(aData + 28) : 0;
     // We ignore the important_colors (aData + 36) field.
 
     // For WinBMPv4, WinBMPv5 and (possibly) OS2-BMPv2 there are additional
     // fields in the info header which we ignore, with the possible exception
     // of the color bitfields (see below).
   }
 
-  // Run with NSPR_LOG_MODULES=BMPDecoder:4 set to see this output.
+  // Run with MOZ_LOG=BMPDecoder:5 set to see this output.
   MOZ_LOG(sBMPLog, LogLevel::Debug,
           ("BMP: bihsize=%u, %d x %d, bpp=%u, compression=%u, colors=%u\n",
           mH.mBIHSize, mH.mWidth, mH.mHeight, uint32_t(mH.mBpp),
           mH.mCompression, mH.mNumColors));
 
   // BMPs with negative width are invalid. Also, reject extremely wide images
   // to keep the math sane. And reject INT_MIN as a height because you can't
   // get its absolute value (because -INT_MIN is one more than INT_MAX).