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

Unified Diff: src/codec/SkSwizzler.cpp

Issue 2212563003: Modify SkPngCodec to recognize 565 images from the sBIT chunk (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Clean up test Created 4 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/SkSwizzler.cpp
diff --git a/src/codec/SkSwizzler.cpp b/src/codec/SkSwizzler.cpp
index c9eb923053879809706ceec392444136181729e6..3f897da6da211c3bfc5858ef3963aeb8ef888de6 100644
--- a/src/codec/SkSwizzler.cpp
+++ b/src/codec/SkSwizzler.cpp
@@ -804,6 +804,9 @@ SkSwizzler* SkSwizzler::CreateSwizzler(const SkEncodedInfo& encodedInfo,
}
break;
case SkEncodedInfo::kRGB_Color:
+ case SkEncodedInfo::k565_Color:
+ // Treat 565 exactly like RGB (since it's still encoded as 8 bits per component).
+ // We just mark as 565 when have a hint that there are only 5/6 "significant" bits.
switch (dstInfo.colorType()) {
case kRGBA_8888_SkColorType:
proc = &swizzle_rgb_to_rgba;

Powered by Google App Engine
This is Rietveld 408576698