Modify SkPngCodec to recognize 565 images from the sBIT chunk
Conveniently, SkPngImageEncoder already writes the sBIT chunk
appropriately.
BUG=skia:5616
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2212563003
Review-Url: https://codereview.chromium.org/2212563003
diff --git a/include/codec/SkCodec.h b/include/codec/SkCodec.h
index c5dc66a..ced0c63 100644
--- a/include/codec/SkCodec.h
+++ b/include/codec/SkCodec.h
@@ -526,6 +526,15 @@
sk_sp<SkColorSpace> = nullptr,
Origin = kTopLeft_Origin);
+ /**
+ * Takes ownership of SkStream*
+ * Allows the subclass to set the recommended SkImageInfo
+ */
+ SkCodec(const SkEncodedInfo&,
+ const SkImageInfo&,
+ SkStream*,
+ Origin = kTopLeft_Origin);
+
virtual SkISize onGetScaledDimensions(float /*desiredScale*/) const {
// By default, scaling is not supported.
return this->getInfo().dimensions();