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

Unified Diff: src/codec/SkSwizzler.h

Issue 1260673002: SkScaledCodec class (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: use SkWebpCodec native scaling, update comments and spacing 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/SkSwizzler.h
diff --git a/src/codec/SkSwizzler.h b/src/codec/SkSwizzler.h
index b00ee14e0699189f9834ccc7624ef8ee8924c0f8..e4ed0a07f95277c84f8e0dafb0f1a6f6f786c80f 100644
--- a/src/codec/SkSwizzler.h
+++ b/src/codec/SkSwizzler.h
@@ -202,6 +202,11 @@ public:
SkASSERT(kDesignateRow_NextMode != fNextMode);
return fDstRow;
}
+ /**
+ * set the sample size in the x direction
+ * only support down sampling, sampleX >= 1
+ */
+ void setSampleX(int sampleX);
private:
@@ -245,6 +250,8 @@ private:
void* fDstRow;
const size_t fDstRowBytes;
int fCurrY;
+ int fX0; // first X coord to sample
+ int fSampleX; // step between X samples
SkSwizzler(RowProc proc, const SkPMColor* ctable, int deltaSrc,
const SkImageInfo& info, void* dst, size_t rowBytes);

Powered by Google App Engine
This is Rietveld 408576698