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

Unified Diff: src/codec/SkSwizzler.h

Issue 1260673002: SkScaledCodec class (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add helper functions to calculate sampleSize and scaledDimensions 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..ec75f4552c3bddc2ea43edf135165223498c29c0 100644
--- a/src/codec/SkSwizzler.h
+++ b/src/codec/SkSwizzler.h
@@ -122,12 +122,13 @@ public:
* @param ZeroInitialized Whether dst is zero-initialized. The
implementation may choose to skip writing zeroes
* if set to kYes_ZeroInitialized.
+ * @param sampleX the step between samples in the x direction.
scroggo 2015/07/30 18:05:57 Update the comment to match the new parameter?
emmaleer 2015/07/30 22:27:56 Acknowledged.
* @return A new SkSwizzler or NULL on failure.
*/
static SkSwizzler* CreateSwizzler(SrcConfig, const SkPMColor* ctable,
const SkImageInfo&, void* dst,
size_t dstRowBytes,
- SkCodec::ZeroInitialized);
+ SkCodec::ZeroInitialized, const SkImageInfo&);
/**
* Fill the remainder of the destination with a single color
@@ -245,9 +246,11 @@ private:
void* fDstRow;
const size_t fDstRowBytes;
int fCurrY;
+ const int fX0; // first X coord to sample
+ const int fSampleX; // step between X samples
SkSwizzler(RowProc proc, const SkPMColor* ctable, int deltaSrc,
- const SkImageInfo& info, void* dst, size_t rowBytes);
+ const SkImageInfo& info, void* dst, size_t rowBytes, int sampleX);
};
#endif // SkSwizzler_DEFINED

Powered by Google App Engine
This is Rietveld 408576698