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

Unified Diff: src/codec/SkMaskSwizzler.h

Issue 1372973002: Move all knowledge of X sampling into SkScaledCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@codecSDmerge
Patch Set: Attempt to fix RLE overflow 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 794dcd16e498e8948a1065ba6e29bb31bdc8361a..fbc951a070806e954896e56913e863360ca398ee 100644
--- a/src/codec/SkMaskSwizzler.h
+++ b/src/codec/SkMaskSwizzler.h
@@ -8,6 +8,7 @@
#define SkMaskSwizzler_DEFINED
#include "SkMasks.h"
+#include "SkSampler.h"
#include "SkSwizzler.h"
#include "SkTypes.h"
@@ -17,7 +18,7 @@
* Currently only used by bmp
*
*/
-class SkMaskSwizzler {
+class SkMaskSwizzler : public SkSampler {
public:
/*
@@ -46,15 +47,18 @@ private:
/*
* Constructor for mask swizzler
*/
- SkMaskSwizzler(const SkImageInfo& info, SkMasks* masks, RowProc proc,
- uint32_t sampleX);
-
- // Fields
- const SkImageInfo& fDstInfo;
- SkMasks* fMasks; // unowned
- const RowProc fRowProc;
- const uint32_t fSampleX;
- const uint32_t fStartX;
+ SkMaskSwizzler(int width, SkMasks* masks, RowProc proc);
+
+ int onSetSampleX(int) override;
+
+ SkMasks* fMasks; // unowned
+ const RowProc fRowProc;
+
+ // FIXME: Can this class share more with SkSwizzler? These variables are all the same.
+ 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 fX0;
};
#endif
« 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