Index: src/utils/debugger/SkObjectParser.cpp |
diff --git a/src/utils/debugger/SkObjectParser.cpp b/src/utils/debugger/SkObjectParser.cpp |
index f405e8787fdffd0d327d63e1956cd6bd4689c814..504cd085c92fc38ad8924c24370ed4dd6879df95 100644 |
--- a/src/utils/debugger/SkObjectParser.cpp |
+++ b/src/utils/debugger/SkObjectParser.cpp |
@@ -298,24 +298,20 @@ SkString* SkObjectParser::RegionToString(const SkRegion& region) { |
SkString* SkObjectParser::SaveFlagsToString(SkCanvas::SaveFlags flags) { |
SkString* mFlags = new SkString("SkCanvas::SaveFlags: "); |
- if(flags == SkCanvas::kMatrixClip_SaveFlag) { |
- mFlags->append("kMatrixClip_SaveFlag"); |
- } else if (flags == SkCanvas::kClip_SaveFlag) { |
- mFlags->append("kClip_SaveFlag"); |
- } else if (flags == SkCanvas::kHasAlphaLayer_SaveFlag) { |
- mFlags->append("kHasAlphaLayer_SaveFlag"); |
- } else if (flags == SkCanvas::kFullColorLayer_SaveFlag) { |
- mFlags->append("kFullColorLayer_SaveFlag"); |
- } else if (flags == SkCanvas::kClipToLayer_SaveFlag) { |
- mFlags->append("kClipToLayer_SaveFlag"); |
- } else if (flags == SkCanvas::kMatrixClip_SaveFlag) { |
- mFlags->append("kMatrixClip_SaveFlag"); |
- } else if (flags == SkCanvas::kARGB_NoClipLayer_SaveFlag) { |
- mFlags->append("kARGB_NoClipLayer_SaveFlag"); |
- } else if (flags == SkCanvas::kARGB_ClipLayer_SaveFlag) { |
- mFlags->append("kARGB_ClipLayer_SaveFlag"); |
- } else { |
- mFlags->append("Data Unavailable"); |
+ if (flags & SkCanvas::kMatrix_SaveFlag) { |
+ mFlags->append("kMatrix_SaveFlag "); |
+ } |
+ if (flags & SkCanvas::kClip_SaveFlag) { |
+ mFlags->append("kClip_SaveFlag "); |
+ } |
+ if (flags & SkCanvas::kHasAlphaLayer_SaveFlag) { |
+ mFlags->append("kHasAlphaLayer_SaveFlag "); |
+ } |
+ if (flags & SkCanvas::kFullColorLayer_SaveFlag) { |
+ mFlags->append("kFullColorLayer_SaveFlag "); |
+ } |
+ if (flags & SkCanvas::kClipToLayer_SaveFlag) { |
+ mFlags->append("kClipToLayer_SaveFlag "); |
} |
return mFlags; |
} |