Added toString to SkXfermode-derived classes (for debugger)
https://codereview.appspot.com/7139058/
git-svn-id: http://skia.googlecode.com/svn/trunk@7308 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/debugger/SkDrawCommand.cpp b/debugger/SkDrawCommand.cpp
index c017f44..a2459b3 100644
--- a/debugger/SkDrawCommand.cpp
+++ b/debugger/SkDrawCommand.cpp
@@ -164,6 +164,9 @@
this->fInfo.push(SkObjectParser::BitmapToString(bitmap));
this->fInfo.push(SkObjectParser::ScalarToString(left, "SkScalar left: "));
this->fInfo.push(SkObjectParser::ScalarToString(top, "SkScalar top: "));
+ if (NULL != paint) {
+ this->fInfo.push(SkObjectParser::PaintToString(*paint));
+ }
}
void DrawBitmap::execute(SkCanvas* canvas) {
@@ -184,7 +187,9 @@
this->fInfo.push(SkObjectParser::BitmapToString(bitmap));
this->fInfo.push(SkObjectParser::MatrixToString(matrix));
- if (paint) this->fInfo.push(SkObjectParser::PaintToString(*paint));
+ if (NULL != paint) {
+ this->fInfo.push(SkObjectParser::PaintToString(*paint));
+ }
}
void DrawBitmapMatrix::execute(SkCanvas* canvas) {
@@ -207,7 +212,9 @@
this->fInfo.push(SkObjectParser::BitmapToString(bitmap));
this->fInfo.push(SkObjectParser::IRectToString(center));
this->fInfo.push(SkObjectParser::RectToString(dst, "Dst: "));
- if (paint) this->fInfo.push(SkObjectParser::PaintToString(*paint));
+ if (NULL != paint) {
+ this->fInfo.push(SkObjectParser::PaintToString(*paint));
+ }
}
void DrawBitmapNine::execute(SkCanvas* canvas) {
@@ -228,9 +235,13 @@
this->fResizedBitmap = resizedBitmap;
this->fInfo.push(SkObjectParser::BitmapToString(bitmap));
- if (src) this->fInfo.push(SkObjectParser::RectToString(*src, "Src: "));
+ if (NULL != src) {
+ this->fInfo.push(SkObjectParser::RectToString(*src, "Src: "));
+ }
this->fInfo.push(SkObjectParser::RectToString(dst, "Dst: "));
- if (paint) this->fInfo.push(SkObjectParser::PaintToString(*paint));
+ if (NULL != paint) {
+ this->fInfo.push(SkObjectParser::PaintToString(*paint));
+ }
}
void DrawBitmapRect::execute(SkCanvas* canvas) {