aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/CodecBenchPriv.h
diff options
context:
space:
mode:
Diffstat (limited to 'bench/CodecBenchPriv.h')
-rw-r--r--bench/CodecBenchPriv.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/bench/CodecBenchPriv.h b/bench/CodecBenchPriv.h
index d8585b6006..5028573ad2 100644
--- a/bench/CodecBenchPriv.h
+++ b/bench/CodecBenchPriv.h
@@ -27,4 +27,18 @@ inline const char* color_type_to_str(SkColorType colorType) {
}
}
+inline const char* alpha_type_to_str(SkAlphaType alphaType) {
+ switch (alphaType) {
+ case kOpaque_SkAlphaType:
+ return "";
+ case kPremul_SkAlphaType:
+ return "Premul";
+ case kUnpremul_SkAlphaType:
+ return "Unpremul";
+ default:
+ SkASSERT(false);
+ return "Unknown";
+ }
+}
+
#endif // CodecBenchPriv_DEFINED