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

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: 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
Index: src/codec/SkMaskSwizzler.h
diff --git a/src/codec/SkMaskSwizzler.h b/src/codec/SkMaskSwizzler.h
index 794dcd16e498e8948a1065ba6e29bb31bdc8361a..14e2b4f8f1a476a5a4aa8c2d865ce88dec0f9fff 100644
--- a/src/codec/SkMaskSwizzler.h
+++ b/src/codec/SkMaskSwizzler.h
@@ -27,7 +27,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
@@ -39,20 +41,18 @@ 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(const SkImageInfo& info, SkMasks* masks, RowProc proc,
- uint32_t sampleX);
+ SkMaskSwizzler(SkMasks* masks, RowProc proc, uint32_t width, uint32_t sampleX, uint32_t startX);
// Fields
- const SkImageInfo& fDstInfo;
SkMasks* fMasks; // unowned
const RowProc fRowProc;
+ const uint32_t fWidth;
const uint32_t fSampleX;
const uint32_t fStartX;
};

Powered by Google App Engine
This is Rietveld 408576698