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

Unified Diff: src/codec/SkCodec_wbmp.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_wbmp.cpp
diff --git a/src/codec/SkCodec_wbmp.cpp b/src/codec/SkCodec_wbmp.cpp
index 9709a689b12b5ab9e1dee519e27282a37d7e0145..6fdaf224c67cccc754805016544117168bcb3478 100644
--- a/src/codec/SkCodec_wbmp.cpp
+++ b/src/codec/SkCodec_wbmp.cpp
@@ -103,7 +103,7 @@ SkEncodedFormat SkWbmpCodec::onGetEncodedFormat() const {
SkCodec::Result SkWbmpCodec::onGetPixels(const SkImageInfo& info,
void* pixels,
size_t rowBytes,
- const Options&,
+ const Options& options,
SkPMColor ctable[],
int* ctableCount) {
SkCodec::RewindState rewindState = this->rewindIfNeeded();
@@ -112,6 +112,10 @@ SkCodec::Result SkWbmpCodec::onGetPixels(const SkImageInfo& info,
} else if (rewindState == kRewound_RewindState) {
(void)read_header(this->stream(), NULL);
}
+ if (!options.fSubset.isEmpty()) {
+ // Subsets are not supported.
+ return kUnimplemented;
+ }
if (info.dimensions() != this->getInfo().dimensions()) {
return kInvalidScale;
}

Powered by Google App Engine
This is Rietveld 408576698