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

Unified Diff: dm/DMSrcSink.cpp

Issue 1076923002: SkJpegCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@gif-real
Patch Set: Added comment Created 5 years, 8 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 | « dm/DM.cpp ('k') | gyp/codec.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMSrcSink.cpp
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index 9e9a77c27124e85350406c7e84ec3b2f8f5f0886..120552dbb8b789e8101799869825125a28d5502e 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -80,7 +80,13 @@ Error CodecSrc::draw(SkCanvas* canvas) const {
SkColorType canvasColorType = canvasInfo.colorType();
switch (fDstColorType) {
case kIndex8_Always_DstColorType:
+ decodeInfo = codec->getInfo().makeColorType(kIndex_8_SkColorType);
+ if (kRGB_565_SkColorType == canvasColorType) {
+ return Error::Nonfatal("Testing non-565 to 565 is uninteresting.");
+ }
+ break;
case kGrayscale_Always_DstColorType:
+ decodeInfo = codec->getInfo().makeColorType(kGray_8_SkColorType);
if (kRGB_565_SkColorType == canvasColorType) {
return Error::Nonfatal("Testing non-565 to 565 is uninteresting.");
}
« no previous file with comments | « dm/DM.cpp ('k') | gyp/codec.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698