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

Unified Diff: src/codec/SkCodec_libpng.cpp

Issue 1582083005: Clean up unused or overly complex modes in SkSwizzler (Closed) Base URL: https://skia.googlesource.com/skia.git@neon-unpremul
Patch Set: Response to comments Created 4 years, 11 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 | « no previous file | src/codec/SkJpegCodec.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkCodec_libpng.cpp
diff --git a/src/codec/SkCodec_libpng.cpp b/src/codec/SkCodec_libpng.cpp
index e8fd2a3cdd05485a8064dd90d418a29769a88b8d..b75fb3a84efadf89d7f7f6eae6b649334fbe6b5b 100644
--- a/src/codec/SkCodec_libpng.cpp
+++ b/src/codec/SkCodec_libpng.cpp
@@ -313,8 +313,6 @@ static bool read_header(SkStream* stream, SkPngChunkReader* chunkReader,
png_set_tRNS_to_alpha(png_ptr);
skAlphaType = kUnpremul_SkAlphaType;
} else {
- //convert to RGBA with Opaque Alpha
- png_set_filler(png_ptr, 0xff, PNG_FILLER_AFTER);
skAlphaType = kOpaque_SkAlphaType;
}
skColorType = kN32_SkColorType;
@@ -427,7 +425,7 @@ SkCodec::Result SkPngCodec::initializeSwizzler(const SkImageInfo& requestedInfo,
break;
case kN32_SkColorType:
if (this->getInfo().alphaType() == kOpaque_SkAlphaType) {
- fSrcConfig = SkSwizzler::kRGBX;
+ fSrcConfig = SkSwizzler::kRGB;
} else {
fSrcConfig = SkSwizzler::kRGBA;
}
« no previous file with comments | « no previous file | src/codec/SkJpegCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698