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

Unified Diff: tests/CodexTest.cpp

Issue 1282073004: Support decoding opaque images to unpremul/premul (Closed) Base URL: https://skia.googlesource.com/skia.git@CodexTestCleanup
Patch Set: Created 5 years, 4 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 | « src/codec/SkJpegCodec.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/CodexTest.cpp
diff --git a/tests/CodexTest.cpp b/tests/CodexTest.cpp
index f52765b171e62ba5217143e5b30e985e1e7969f7..a2412e2f7cd41ea83d81e4eaaace4c124f181048 100644
--- a/tests/CodexTest.cpp
+++ b/tests/CodexTest.cpp
@@ -112,6 +112,11 @@ static void check(skiatest::Reporter* r,
{
// Check alpha type conversions
if (info.alphaType() == kOpaque_SkAlphaType) {
+ // Decoding to either premul or unpremul should succeed and look no different
+ test_info(r, codec, info.makeAlphaType(kUnpremul_SkAlphaType), SkCodec::kSuccess,
+ &digest);
+ test_info(r, codec, info.makeAlphaType(kPremul_SkAlphaType), SkCodec::kSuccess,
+ &digest);
} else {
// Decoding to opaque should fail
test_info(r, codec, info.makeAlphaType(kOpaque_SkAlphaType),
« no previous file with comments | « src/codec/SkJpegCodec.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698