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

Unified Diff: src/codec/SkAndroidCodec.cpp

Issue 1519843002: Change computeOutputColorType() to mimic old behavior (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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/codec/SkAndroidCodec.cpp
diff --git a/src/codec/SkAndroidCodec.cpp b/src/codec/SkAndroidCodec.cpp
index 491daf5e681b6e10167ad7d45144eaebfc371a07..287d54f209ba9e0b67b7ae44473328a202c23757 100644
--- a/src/codec/SkAndroidCodec.cpp
+++ b/src/codec/SkAndroidCodec.cpp
@@ -79,6 +79,13 @@ SkColorType SkAndroidCodec::computeOutputColorType(SkColorType requestedColorTyp
break;
}
+ // Android has limited support for kGray_8 (using kAlpha_8). We will not
+ // use kGray_8 for Android unless they specifically ask for it.
+ if (kGray_8_SkColorType == suggestedColorType) {
msarett 2015/12/11 16:41:13 As you stated in another review, we need this to m
+ return kN32_SkColorType;
+ }
+
+ // This may be kN32_SkColorType or kIndex_8_SkColorType.
return suggestedColorType;
}
« 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