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

Unified Diff: src/codec/SkCodec_libpng.cpp

Issue 1277213002: Support more swizzles to 565 in SkCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update new 565 swizzling functions for scaling 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
Index: src/codec/SkCodec_libpng.cpp
diff --git a/src/codec/SkCodec_libpng.cpp b/src/codec/SkCodec_libpng.cpp
index 159aecd7efb1f3d9dc8d87f1049a3202853cad0c..2fa3e686beeef1af2496bdbca80d4219394190cc 100644
--- a/src/codec/SkCodec_libpng.cpp
+++ b/src/codec/SkCodec_libpng.cpp
@@ -392,28 +392,6 @@ void SkPngCodec::destroyReadStruct() {
// Getting the pixels
///////////////////////////////////////////////////////////////////////////////
-static bool conversion_possible(const SkImageInfo& dst, const SkImageInfo& src) {
- // TODO: Support other conversions
- if (dst.profileType() != src.profileType()) {
- return false;
- }
-
- // Ensure the alpha type is valid
- if (!valid_alpha(dst.alphaType(), src.alphaType())) {
- return false;
- }
-
- // Check for supported color types
- switch (dst.colorType()) {
- case kN32_SkColorType:
- return true;
- case kRGB_565_SkColorType:
- return src.alphaType() == kOpaque_SkAlphaType;
- default:
- return dst.colorType() == src.colorType();
- }
-}
-
SkCodec::Result SkPngCodec::initializeSwizzler(const SkImageInfo& requestedInfo,
const Options& options,
SkPMColor ctable[],

Powered by Google App Engine
This is Rietveld 408576698