diff options
author | msarett <msarett@google.com> | 2016-01-07 14:20:20 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-07 14:20:20 -0800 |
commit | c7796b93f02e736df967301d3c46cec46dd02d5c (patch) | |
tree | b4697f6079e8f1fe895dffbf56b8f047a6752921 /bench/CodecBenchPriv.h | |
parent | 1243b702eed1fa6f37da7d3ce71f41b4bc45ea7c (diff) |
Make CodecBench test kPremul and kUnpremul
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1568913002
Review URL: https://codereview.chromium.org/1568913002
Diffstat (limited to 'bench/CodecBenchPriv.h')
-rw-r--r-- | bench/CodecBenchPriv.h | 14 |
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 |