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

Unified Diff: src/codec/SkSwizzler.h

Issue 1294613002: Revert of SkScaledCodec class (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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/SkScaledCodec.cpp ('k') | src/codec/SkSwizzler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkSwizzler.h
diff --git a/src/codec/SkSwizzler.h b/src/codec/SkSwizzler.h
index b7132ce6d5b38b68e1a5b9832083108d9669948e..2fab7f66b6ea15184c3618304a012a9b4bf4df1c 100644
--- a/src/codec/SkSwizzler.h
+++ b/src/codec/SkSwizzler.h
@@ -117,22 +117,16 @@
/**
* Create a new SkSwizzler.
* @param SrcConfig Description of the format of the source.
- * @param dstInfo describes the destination.
+ * @param SkImageInfo dimensions() describe both the src and the dst.
+ * Other fields describe the dst.
* @param ZeroInitialized Whether dst is zero-initialized. The
implementation may choose to skip writing zeroes
* if set to kYes_ZeroInitialized.
- * @param srcInfo is the info of the source. Used to calculate the width samplesize.
- * Width sampling is supported by the swizzler, by skipping pixels when
- swizzling the row. Height sampling is not supported by the swizzler,
- but is implemented in SkScaledCodec.
- Sampling in Y can be done by a client with a scanline decoder,
- but sampling in X allows the swizzler to skip swizzling pixels and
- reading from and writing to memory.
* @return A new SkSwizzler or NULL on failure.
*/
static SkSwizzler* CreateSwizzler(SrcConfig, const SkPMColor* ctable,
- const SkImageInfo& dstInfo, SkCodec::ZeroInitialized,
- const SkImageInfo& srcInfo);
+ const SkImageInfo&, SkCodec::ZeroInitialized);
+
/**
* Fill the remainder of the destination with a single color
*
@@ -187,16 +181,14 @@
* Method for converting raw data to Skia pixels.
* @param dstRow Row in which to write the resulting pixels.
* @param src Row of src data, in format specified by SrcConfig
- * @param dstWidth Width in pixels of the destination
+ * @param width Width in pixels
* @param deltaSrc if bitsPerPixel % 8 == 0, deltaSrc is bytesPerPixel
* else, deltaSrc is bitsPerPixel
* @param ctable Colors (used for kIndex source).
- * @param offset The offset before the first pixel to sample.
- Is in bytes or bits based on what deltaSrc is in.
*/
typedef ResultAlpha (*RowProc)(void* SK_RESTRICT dstRow,
const uint8_t* SK_RESTRICT src,
- int dstWidth, int deltaSrc, int offset,
+ int width, int deltaSrc,
const SkPMColor ctable[]);
const RowProc fRowProc;
@@ -207,10 +199,9 @@
// deltaSrc is bitsPerPixel
const SkImageInfo fDstInfo;
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,
- int sampleX);
+
+ SkSwizzler(RowProc proc, const SkPMColor* ctable, int deltaSrc,
+ const SkImageInfo& info);
+
};
#endif // SkSwizzler_DEFINED
« no previous file with comments | « src/codec/SkScaledCodec.cpp ('k') | src/codec/SkSwizzler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698