Bug 715243 - Add the ability to use gfx logging on Matrix. r=Bas
authorJoe Drew <joe@drew.ca>
Wed, 04 Jan 2012 18:02:59 -0500
changeset 83779 f6f8a1cd6702c23881c2c7025b52f017b2115007
parent 83778 4bd2675fefa0f85249a1945ac5d4f17e946a59a2
child 83780 00a4148fad8255e1511cca233dd4e7ce32e53f9a
push id4583
push userjdrew@mozilla.com
push dateWed, 04 Jan 2012 23:03:15 +0000
treeherdermozilla-inbound@f6f8a1cd6702 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersBas
bugs715243
milestone12.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 715243 - Add the ability to use gfx logging on Matrix. r=Bas
gfx/2d/Logging.h
--- a/gfx/2d/Logging.h
+++ b/gfx/2d/Logging.h
@@ -38,16 +38,17 @@
 #ifndef MOZILLA_GFX_LOGGING_H_
 #define MOZILLA_GFX_LOGGING_H_
 
 #include <string>
 #include <sstream>
 #include <stdio.h>
 
 #include "Point.h"
+#include "Matrix.h"
 
 #ifdef WIN32
 #include <windows.h>
 #endif
 
 #ifdef PR_LOGGING
 #include <prlog.h>
 
@@ -110,16 +111,19 @@ public:
   ~Log() { mMessage << '\n'; WriteLog(mMessage.str()); }
 
   Log &operator <<(const std::string &aLogText) { mMessage << aLogText; return *this; }
   Log &operator <<(unsigned int aInt) { mMessage << aInt; return *this; }
   Log &operator <<(const Size &aSize)
     { mMessage << "(" << aSize.width << "x" << aSize.height << ")"; return *this; }
   Log &operator <<(const IntSize &aSize)
     { mMessage << "(" << aSize.width << "x" << aSize.height << ")"; return *this; }
+  Log &operator<<(const Matrix& aMatrix)
+    { mMessage << "[ " << aMatrix._11 << " " << aMatrix._12 << " ; " << aMatrix._21 << " " << aMatrix._22 << " ; " << aMatrix._31 << " " << aMatrix._32 << " ]"; return *this; }
+
 
 private:
 
   void WriteLog(const std::string &aString) {
     OutputMessage(aString, L);
   }
 
   std::stringstream mMessage;