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

Unified Diff: src/codec/SkCodec_libpng.cpp

Issue 1240143002: Add the ability to decode a subset to SkCodec. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update comment Created 5 years, 5 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 699ab398d3a36df70cfbbb1c24c96886047d7f3c..12f37c0cdf2313ee13cc43b24ec4d18e85a36688 100644
--- a/src/codec/SkCodec_libpng.cpp
+++ b/src/codec/SkCodec_libpng.cpp
@@ -517,6 +517,10 @@ SkCodec::Result SkPngCodec::onGetPixels(const SkImageInfo& requestedInfo, void*
if (!conversion_possible(requestedInfo, this->getInfo())) {
return kInvalidConversion;
}
+ if (!options.fSubset.isEmpty()) {
+ // Subsets are not supported.
+ return kUnimplemented;
+ }
if (requestedInfo.dimensions() != this->getInfo().dimensions()) {
return kInvalidScale;
}

Powered by Google App Engine
This is Rietveld 408576698