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

Unified Diff: src/codec/SkSampler.h

Issue 2420843003: Incremental decode: only use subset for subsetting (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « src/codec/SkSampledCodec.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkSampler.h
diff --git a/src/codec/SkSampler.h b/src/codec/SkSampler.h
index 00015585a11dda1fcf74e9ecc02ad9bec7f58662..e7bec0c035e4fad0694eccdf79dbc85f7bdb757b 100644
--- a/src/codec/SkSampler.h
+++ b/src/codec/SkSampler.h
@@ -8,6 +8,7 @@
#define SkSampler_DEFINED
#include "SkCodec.h"
+#include "SkCodecPriv.h"
#include "SkTypes.h"
class SkSampler : public SkNoncopyable {
@@ -37,11 +38,10 @@ public:
/**
* Based on fSampleY, return whether this row belongs in the output.
*
- * @param row Row of the image, starting with the first row used in the
- * output.
+ * @param row Row of the image, starting with the first row in the subset.
*/
bool rowNeeded(int row) const {
- return row % fSampleY == 0;
+ return (row + get_start_coord(fSampleY)) % fSampleY == 0;
}
/**
« no previous file with comments | « src/codec/SkSampledCodec.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698