Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Unified Diff: src/utils/debugger/SkObjectParser.cpp

Issue 18034028: SkObjectParser::SaveFlagsToString() should handle SaveFlags as a bitmask. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698