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/SkMaskSwizzler.h

Issue 1321433002: Add subsetting to SkScaledCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@gif-scan
Patch Set: Rebase - it compiles but I'm sure everything is broken Created 5 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/SkJpegCodec.cpp ('k') | src/codec/SkMaskSwizzler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkMaskSwizzler.h
diff --git a/src/codec/SkMaskSwizzler.h b/src/codec/SkMaskSwizzler.h
index 6348bcc6bc7774a81a531e504dc0059e4298f369..5523ad62e6f1a6faf3cb640d7207bbbedfc98c8d 100644
--- a/src/codec/SkMaskSwizzler.h
+++ b/src/codec/SkMaskSwizzler.h
@@ -28,7 +28,9 @@ public:
static SkMaskSwizzler* CreateMaskSwizzler(const SkImageInfo& dstInfo,
const SkImageInfo& srcInfo,
SkMasks* masks,
- uint32_t bitsPerPixel);
+ uint32_t bitsPerPixel,
+ int subsetLeft,
+ int subsetWidth);
/*
* Swizzle a row
@@ -40,14 +42,10 @@ private:
/*
* Row procedure used for swizzle
*/
- typedef SkSwizzler::ResultAlpha (*RowProc)(
- void* dstRow, const uint8_t* srcRow, int width,
+ typedef SkSwizzler::ResultAlpha (*RowProc)(void* dstRow, const uint8_t* srcRow, int width,
SkMasks* masks, uint32_t startX, uint32_t sampleX);
- /*
- * Constructor for mask swizzler
- */
- SkMaskSwizzler(int width, SkMasks* masks, RowProc proc);
+ SkMaskSwizzler(SkMasks* masks, RowProc proc, int srcWidth, int srcOffset);
int onSetSampleX(int) override;
@@ -62,6 +60,7 @@ private:
const int fSrcWidth; // Width of the source - i.e. before any sampling.
int fDstWidth; // Width of dst, which may differ with sampling.
int fSampleX;
+ int fSrcOffset;
int fX0;
};
« no previous file with comments | « src/codec/SkJpegCodec.cpp ('k') | src/codec/SkMaskSwizzler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698