make SkMatrix::dump always available

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/624783002
This commit is contained in:
reed 2014-10-02 17:52:03 -07:00 committed by Commit bot
parent 92561a0b99
commit 2cc22b8f2f
2 changed files with 2 additions and 6 deletions

View File

@ -560,8 +560,8 @@ public:
*/
size_t readFromMemory(const void* buffer, size_t length);
SkDEVCODE(void dump() const;)
SK_TO_STRING_NONVIRT()
void dump() const;
void toString(SkString*) const;
/**
* Calculates the minimum scaling factor of the matrix as computed from the SVD of the upper

View File

@ -1592,21 +1592,17 @@ size_t SkMatrix::readFromMemory(const void* buffer, size_t length) {
return sizeInMemory;
}
#ifdef SK_DEVELOPER
void SkMatrix::dump() const {
SkString str;
this->toString(&str);
SkDebugf("%s\n", str.c_str());
}
#endif
#ifndef SK_IGNORE_TO_STRING
void SkMatrix::toString(SkString* str) const {
str->appendf("[%8.4f %8.4f %8.4f][%8.4f %8.4f %8.4f][%8.4f %8.4f %8.4f]",
fMat[0], fMat[1], fMat[2], fMat[3], fMat[4], fMat[5],
fMat[6], fMat[7], fMat[8]);
}
#endif
///////////////////////////////////////////////////////////////////////////////