1f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo/*
2f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo * Copyright 2015 Google Inc.
3f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo *
4f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo * Use of this source code is governed by a BSD-style license that can be
5f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo * found in the LICENSE file.
6f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo */
7f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo
8f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo#ifndef SkSwizzler_DEFINED
9f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo#define SkSwizzler_DEFINED
10f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo
119552662e9fee5eb0ef435e52ab9db505d7ebe4adscroggo#include "SkCodec.h"
12f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo#include "SkColor.h"
13f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo#include "SkImageInfo.h"
14f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo
15f24f2247c25b842327e12c70e44efe4cc1b28dfascroggoclass SkSwizzler : public SkNoncopyable {
16f24f2247c25b842327e12c70e44efe4cc1b28dfascroggopublic:
17f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo    /**
18f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo     *  Enum describing the config of the source data.
19f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo     */
20f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo    enum SrcConfig {
2105245900bf6d49068b1668da1b38890a41e09bc5scroggo        kUnknown,  // Invalid type.
22741143878b23d22cd9cb7b9cba8055179115ce17msarett        kGray,
23741143878b23d22cd9cb7b9cba8055179115ce17msarett        kIndex1,
24741143878b23d22cd9cb7b9cba8055179115ce17msarett        kIndex2,
25741143878b23d22cd9cb7b9cba8055179115ce17msarett        kIndex4,
26741143878b23d22cd9cb7b9cba8055179115ce17msarett        kIndex,
27741143878b23d22cd9cb7b9cba8055179115ce17msarett        kRGB,
28741143878b23d22cd9cb7b9cba8055179115ce17msarett        kBGR,
29741143878b23d22cd9cb7b9cba8055179115ce17msarett        kRGBX,
30741143878b23d22cd9cb7b9cba8055179115ce17msarett        kBGRX,
31741143878b23d22cd9cb7b9cba8055179115ce17msarett        kRGBA,
32741143878b23d22cd9cb7b9cba8055179115ce17msarett        kBGRA,
33741143878b23d22cd9cb7b9cba8055179115ce17msarett        kRGB_565,
34f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo    };
35f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo
36741143878b23d22cd9cb7b9cba8055179115ce17msarett    /*
37741143878b23d22cd9cb7b9cba8055179115ce17msarett     *
38741143878b23d22cd9cb7b9cba8055179115ce17msarett     * Result code for the alpha components of a row.
39741143878b23d22cd9cb7b9cba8055179115ce17msarett     *
40741143878b23d22cd9cb7b9cba8055179115ce17msarett     */
41741143878b23d22cd9cb7b9cba8055179115ce17msarett    typedef uint16_t ResultAlpha;
42741143878b23d22cd9cb7b9cba8055179115ce17msarett    static const ResultAlpha kOpaque_ResultAlpha = 0xFFFF;
43741143878b23d22cd9cb7b9cba8055179115ce17msarett    static const ResultAlpha kTransparent_ResultAlpha = 0x0000;
44741143878b23d22cd9cb7b9cba8055179115ce17msarett
45741143878b23d22cd9cb7b9cba8055179115ce17msarett    /*
46741143878b23d22cd9cb7b9cba8055179115ce17msarett     *
47741143878b23d22cd9cb7b9cba8055179115ce17msarett     * Checks if the result of decoding a row indicates that the row was
48741143878b23d22cd9cb7b9cba8055179115ce17msarett     * transparent.
49741143878b23d22cd9cb7b9cba8055179115ce17msarett     *
50741143878b23d22cd9cb7b9cba8055179115ce17msarett     */
51741143878b23d22cd9cb7b9cba8055179115ce17msarett    static bool IsTransparent(ResultAlpha r) {
52741143878b23d22cd9cb7b9cba8055179115ce17msarett        return kTransparent_ResultAlpha == r;
53741143878b23d22cd9cb7b9cba8055179115ce17msarett    }
54741143878b23d22cd9cb7b9cba8055179115ce17msarett
55741143878b23d22cd9cb7b9cba8055179115ce17msarett    /*
56741143878b23d22cd9cb7b9cba8055179115ce17msarett     *
57741143878b23d22cd9cb7b9cba8055179115ce17msarett     * Checks if the result of decoding a row indicates that the row was
58741143878b23d22cd9cb7b9cba8055179115ce17msarett     * opaque.
59741143878b23d22cd9cb7b9cba8055179115ce17msarett     *
60741143878b23d22cd9cb7b9cba8055179115ce17msarett     */
61741143878b23d22cd9cb7b9cba8055179115ce17msarett    static bool IsOpaque(ResultAlpha r) {
62741143878b23d22cd9cb7b9cba8055179115ce17msarett        return kOpaque_ResultAlpha == r;
63741143878b23d22cd9cb7b9cba8055179115ce17msarett    }
64438b2adefb9e9213e0ddaf0609405d3087a1cf0amsarett
65741143878b23d22cd9cb7b9cba8055179115ce17msarett    /*
66741143878b23d22cd9cb7b9cba8055179115ce17msarett     *
67741143878b23d22cd9cb7b9cba8055179115ce17msarett     * Constructs the proper result code based on accumulated alpha masks
68741143878b23d22cd9cb7b9cba8055179115ce17msarett     *
69741143878b23d22cd9cb7b9cba8055179115ce17msarett     */
70741143878b23d22cd9cb7b9cba8055179115ce17msarett    static ResultAlpha GetResult(uint8_t zeroAlpha, uint8_t maxAlpha);
71741143878b23d22cd9cb7b9cba8055179115ce17msarett
72741143878b23d22cd9cb7b9cba8055179115ce17msarett    /*
73741143878b23d22cd9cb7b9cba8055179115ce17msarett     *
74741143878b23d22cd9cb7b9cba8055179115ce17msarett     * Returns bits per pixel for source config
75741143878b23d22cd9cb7b9cba8055179115ce17msarett     *
76741143878b23d22cd9cb7b9cba8055179115ce17msarett     */
77741143878b23d22cd9cb7b9cba8055179115ce17msarett    static int BitsPerPixel(SrcConfig sc) {
78f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo        switch (sc) {
79741143878b23d22cd9cb7b9cba8055179115ce17msarett            case kIndex1:
80741143878b23d22cd9cb7b9cba8055179115ce17msarett                return 1;
81741143878b23d22cd9cb7b9cba8055179115ce17msarett            case kIndex2:
82741143878b23d22cd9cb7b9cba8055179115ce17msarett                return 2;
83741143878b23d22cd9cb7b9cba8055179115ce17msarett            case kIndex4:
84741143878b23d22cd9cb7b9cba8055179115ce17msarett                return 4;
85f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo            case kGray:
86f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo            case kIndex:
87741143878b23d22cd9cb7b9cba8055179115ce17msarett                return 8;
88741143878b23d22cd9cb7b9cba8055179115ce17msarett            case kRGB_565:
89741143878b23d22cd9cb7b9cba8055179115ce17msarett                return 16;
90f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo            case kRGB:
91741143878b23d22cd9cb7b9cba8055179115ce17msarett            case kBGR:
92741143878b23d22cd9cb7b9cba8055179115ce17msarett                return 24;
93f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo            case kRGBX:
94f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo            case kRGBA:
95741143878b23d22cd9cb7b9cba8055179115ce17msarett            case kBGRX:
96741143878b23d22cd9cb7b9cba8055179115ce17msarett            case kBGRA:
97741143878b23d22cd9cb7b9cba8055179115ce17msarett                return 32;
98f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo            default:
99741143878b23d22cd9cb7b9cba8055179115ce17msarett                SkASSERT(false);
100741143878b23d22cd9cb7b9cba8055179115ce17msarett                return 0;
101f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo        }
102f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo    }
103f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo
104741143878b23d22cd9cb7b9cba8055179115ce17msarett    /*
105741143878b23d22cd9cb7b9cba8055179115ce17msarett     *
106741143878b23d22cd9cb7b9cba8055179115ce17msarett     * Returns bytes per pixel for source config
107741143878b23d22cd9cb7b9cba8055179115ce17msarett     * Raises an error if each pixel is not stored in an even number of bytes
108741143878b23d22cd9cb7b9cba8055179115ce17msarett     *
109741143878b23d22cd9cb7b9cba8055179115ce17msarett     */
110741143878b23d22cd9cb7b9cba8055179115ce17msarett    static int BytesPerPixel(SrcConfig sc) {
111741143878b23d22cd9cb7b9cba8055179115ce17msarett        SkASSERT(SkIsAlign8(BitsPerPixel(sc)));
112741143878b23d22cd9cb7b9cba8055179115ce17msarett        return BitsPerPixel(sc) >> 3;
113741143878b23d22cd9cb7b9cba8055179115ce17msarett    }
114741143878b23d22cd9cb7b9cba8055179115ce17msarett
115f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo    /**
116f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo     *  Create a new SkSwizzler.
1179552662e9fee5eb0ef435e52ab9db505d7ebe4adscroggo     *  @param SrcConfig Description of the format of the source.
1189552662e9fee5eb0ef435e52ab9db505d7ebe4adscroggo     *  @param SkImageInfo dimensions() describe both the src and the dst.
119f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo     *              Other fields describe the dst.
120f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo     *  @param dst Destination to write pixels. Must match info and dstRowBytes
121f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo     *  @param dstRowBytes rowBytes for dst.
1229552662e9fee5eb0ef435e52ab9db505d7ebe4adscroggo     *  @param ZeroInitialized Whether dst is zero-initialized. The
1239552662e9fee5eb0ef435e52ab9db505d7ebe4adscroggo                               implementation may choose to skip writing zeroes
1249552662e9fee5eb0ef435e52ab9db505d7ebe4adscroggo     *                         if set to kYes_ZeroInitialized.
125f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo     *  @return A new SkSwizzler or NULL on failure.
126f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo     */
1279552662e9fee5eb0ef435e52ab9db505d7ebe4adscroggo    static SkSwizzler* CreateSwizzler(SrcConfig, const SkPMColor* ctable,
1289552662e9fee5eb0ef435e52ab9db505d7ebe4adscroggo                                      const SkImageInfo&, void* dst,
1299552662e9fee5eb0ef435e52ab9db505d7ebe4adscroggo                                      size_t dstRowBytes,
1309552662e9fee5eb0ef435e52ab9db505d7ebe4adscroggo                                      SkImageGenerator::ZeroInitialized);
131438b2adefb9e9213e0ddaf0609405d3087a1cf0amsarett
132438b2adefb9e9213e0ddaf0609405d3087a1cf0amsarett    /**
133438b2adefb9e9213e0ddaf0609405d3087a1cf0amsarett     * Fill the remainder of the destination with a single color
134438b2adefb9e9213e0ddaf0609405d3087a1cf0amsarett     *
1353c309db75bb8c4c2b58724a0e2f6f3b387ca842cmsarett     * @param dstStartRow
1363c309db75bb8c4c2b58724a0e2f6f3b387ca842cmsarett     * The destination row to fill from.
1373c309db75bb8c4c2b58724a0e2f6f3b387ca842cmsarett     *
1383c309db75bb8c4c2b58724a0e2f6f3b387ca842cmsarett     * @param numRows
1393c309db75bb8c4c2b58724a0e2f6f3b387ca842cmsarett     * The number of rows to fill.
140438b2adefb9e9213e0ddaf0609405d3087a1cf0amsarett     *
141438b2adefb9e9213e0ddaf0609405d3087a1cf0amsarett     * @param colorOrIndex
142438b2adefb9e9213e0ddaf0609405d3087a1cf0amsarett     * @param colorTable
143438b2adefb9e9213e0ddaf0609405d3087a1cf0amsarett     * If dstInfo.colorType() is kIndex8, colorOrIndex is assumed to be a uint8_t
144438b2adefb9e9213e0ddaf0609405d3087a1cf0amsarett     * index, and colorTable is ignored. Each 8-bit pixel will be set to (uint8_t)
145438b2adefb9e9213e0ddaf0609405d3087a1cf0amsarett     * index.
146438b2adefb9e9213e0ddaf0609405d3087a1cf0amsarett     *
147438b2adefb9e9213e0ddaf0609405d3087a1cf0amsarett     * If dstInfo.colorType() is kN32, colorOrIndex is treated differently depending on
148438b2adefb9e9213e0ddaf0609405d3087a1cf0amsarett     * whether colorTable is NULL:
149438b2adefb9e9213e0ddaf0609405d3087a1cf0amsarett     *
150438b2adefb9e9213e0ddaf0609405d3087a1cf0amsarett     * A NULL colorTable means colorOrIndex is treated as an SkPMColor (premul or
151438b2adefb9e9213e0ddaf0609405d3087a1cf0amsarett     * unpremul, depending on dstInfo.alphaType()). Each 4-byte pixel will be set to
152438b2adefb9e9213e0ddaf0609405d3087a1cf0amsarett     * colorOrIndex.
153438b2adefb9e9213e0ddaf0609405d3087a1cf0amsarett
154438b2adefb9e9213e0ddaf0609405d3087a1cf0amsarett     * A non-NULL colorTable means colorOrIndex is treated as a uint8_t index into
155438b2adefb9e9213e0ddaf0609405d3087a1cf0amsarett     * the colorTable. i.e. each 4-byte pixel will be set to
156438b2adefb9e9213e0ddaf0609405d3087a1cf0amsarett     * colorTable[(uint8_t) colorOrIndex].
157438b2adefb9e9213e0ddaf0609405d3087a1cf0amsarett     *
158e16b04aa6041efb6507546547737e9603fa1606emsarett     * If dstInfo.colorType() is kGray, colorOrIndex is always treated as an 8-bit color.
159e16b04aa6041efb6507546547737e9603fa1606emsarett     *
160438b2adefb9e9213e0ddaf0609405d3087a1cf0amsarett     * Other SkColorTypes are not supported.
161438b2adefb9e9213e0ddaf0609405d3087a1cf0amsarett     *
162438b2adefb9e9213e0ddaf0609405d3087a1cf0amsarett     */
1633c309db75bb8c4c2b58724a0e2f6f3b387ca842cmsarett    static void Fill(void* dstStartRow, const SkImageInfo& dstInfo, size_t dstRowBytes,
1643c309db75bb8c4c2b58724a0e2f6f3b387ca842cmsarett            uint32_t numRows, uint32_t colorOrIndex, const SkPMColor* colorTable);
165438b2adefb9e9213e0ddaf0609405d3087a1cf0amsarett
166f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo    /**
167f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo     *  Swizzle the next line. Call height times, once for each row of source.
168f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo     *  @param src The next row of the source data.
169741143878b23d22cd9cb7b9cba8055179115ce17msarett     *  @return A result code describing if the row was fully opaque, fully
170741143878b23d22cd9cb7b9cba8055179115ce17msarett     *          transparent, or neither
171f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo     */
172741143878b23d22cd9cb7b9cba8055179115ce17msarett    ResultAlpha next(const uint8_t* SK_RESTRICT src);
173741143878b23d22cd9cb7b9cba8055179115ce17msarett
174741143878b23d22cd9cb7b9cba8055179115ce17msarett    /**
175741143878b23d22cd9cb7b9cba8055179115ce17msarett     *
176741143878b23d22cd9cb7b9cba8055179115ce17msarett     * Alternate version of next that allows the caller to specify the row.
177741143878b23d22cd9cb7b9cba8055179115ce17msarett     * It is very important to only use one version of next.  Since the other
178741143878b23d22cd9cb7b9cba8055179115ce17msarett     * version modifies the dst pointer, it will change the behavior of this
179741143878b23d22cd9cb7b9cba8055179115ce17msarett     * function.  We will check this in Debug mode.
180741143878b23d22cd9cb7b9cba8055179115ce17msarett     *
181741143878b23d22cd9cb7b9cba8055179115ce17msarett     */
182741143878b23d22cd9cb7b9cba8055179115ce17msarett    ResultAlpha next(const uint8_t* SK_RESTRICT src, int y);
18305245900bf6d49068b1668da1b38890a41e09bc5scroggo
18405245900bf6d49068b1668da1b38890a41e09bc5scroggo    /**
18505245900bf6d49068b1668da1b38890a41e09bc5scroggo     *  Update the destination row.
18605245900bf6d49068b1668da1b38890a41e09bc5scroggo     *
18705245900bf6d49068b1668da1b38890a41e09bc5scroggo     *  Typically this is done by next, but for a client that wants to manually
18805245900bf6d49068b1668da1b38890a41e09bc5scroggo     *  modify the destination row (for example, for decoding scanline one at a
18905245900bf6d49068b1668da1b38890a41e09bc5scroggo     *  time) they can call this before each call to next.
19005245900bf6d49068b1668da1b38890a41e09bc5scroggo     *  TODO: Maybe replace this with a version of next which allows supplying the
19105245900bf6d49068b1668da1b38890a41e09bc5scroggo     *  destination?
19205245900bf6d49068b1668da1b38890a41e09bc5scroggo     */
19305245900bf6d49068b1668da1b38890a41e09bc5scroggo    void setDstRow(void* dst) { fDstRow = dst; }
194438b2adefb9e9213e0ddaf0609405d3087a1cf0amsarett
1953c309db75bb8c4c2b58724a0e2f6f3b387ca842cmsarett    /**
1963c309db75bb8c4c2b58724a0e2f6f3b387ca842cmsarett     *  Get the next destination row to decode to
1973c309db75bb8c4c2b58724a0e2f6f3b387ca842cmsarett     */
1983c309db75bb8c4c2b58724a0e2f6f3b387ca842cmsarett    void* getDstRow() {
1993c309db75bb8c4c2b58724a0e2f6f3b387ca842cmsarett        // kDesignateRow_NextMode does not update the fDstRow ptr.  This function is
2003c309db75bb8c4c2b58724a0e2f6f3b387ca842cmsarett        // unnecessary in that case since fDstRow will always be equal to the pointer
2013c309db75bb8c4c2b58724a0e2f6f3b387ca842cmsarett        // passed to CreateSwizzler().
2023c309db75bb8c4c2b58724a0e2f6f3b387ca842cmsarett        SkASSERT(kDesignateRow_NextMode != fNextMode);
2033c309db75bb8c4c2b58724a0e2f6f3b387ca842cmsarett        return fDstRow;
2043c309db75bb8c4c2b58724a0e2f6f3b387ca842cmsarett    }
2053c309db75bb8c4c2b58724a0e2f6f3b387ca842cmsarett
206f24f2247c25b842327e12c70e44efe4cc1b28dfascroggoprivate:
207741143878b23d22cd9cb7b9cba8055179115ce17msarett
208741143878b23d22cd9cb7b9cba8055179115ce17msarett#ifdef SK_DEBUG
209741143878b23d22cd9cb7b9cba8055179115ce17msarett    /*
210741143878b23d22cd9cb7b9cba8055179115ce17msarett     *
211741143878b23d22cd9cb7b9cba8055179115ce17msarett     * Keep track of which version of next the caller is using
212741143878b23d22cd9cb7b9cba8055179115ce17msarett     *
213741143878b23d22cd9cb7b9cba8055179115ce17msarett     */
214741143878b23d22cd9cb7b9cba8055179115ce17msarett    enum NextMode {
215741143878b23d22cd9cb7b9cba8055179115ce17msarett        kUninitialized_NextMode,
216741143878b23d22cd9cb7b9cba8055179115ce17msarett        kConsecutive_NextMode,
217741143878b23d22cd9cb7b9cba8055179115ce17msarett        kDesignateRow_NextMode,
218741143878b23d22cd9cb7b9cba8055179115ce17msarett    };
219741143878b23d22cd9cb7b9cba8055179115ce17msarett
220741143878b23d22cd9cb7b9cba8055179115ce17msarett    NextMode fNextMode;
221741143878b23d22cd9cb7b9cba8055179115ce17msarett#endif
222741143878b23d22cd9cb7b9cba8055179115ce17msarett
223f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo    /**
224f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo     *  Method for converting raw data to Skia pixels.
225f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo     *  @param dstRow Row in which to write the resulting pixels.
226f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo     *  @param src Row of src data, in format specified by SrcConfig
227f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo     *  @param width Width in pixels
228741143878b23d22cd9cb7b9cba8055179115ce17msarett     *  @param deltaSrc if bitsPerPixel % 8 == 0, deltaSrc is bytesPerPixel
229741143878b23d22cd9cb7b9cba8055179115ce17msarett     *                  else, deltaSrc is bitsPerPixel
230f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo     *  @param y Line of source.
231f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo     *  @param ctable Colors (used for kIndex source).
232f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo     */
233741143878b23d22cd9cb7b9cba8055179115ce17msarett    typedef ResultAlpha (*RowProc)(void* SK_RESTRICT dstRow,
234741143878b23d22cd9cb7b9cba8055179115ce17msarett                                   const uint8_t* SK_RESTRICT src,
235741143878b23d22cd9cb7b9cba8055179115ce17msarett                                   int width, int deltaSrc, int y,
236741143878b23d22cd9cb7b9cba8055179115ce17msarett                                   const SkPMColor ctable[]);
237f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo
238f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo    const RowProc       fRowProc;
239741143878b23d22cd9cb7b9cba8055179115ce17msarett    const SkPMColor*    fColorTable;      // Unowned pointer
240741143878b23d22cd9cb7b9cba8055179115ce17msarett    const int           fDeltaSrc;        // if bitsPerPixel % 8 == 0
241741143878b23d22cd9cb7b9cba8055179115ce17msarett                                          //     deltaSrc is bytesPerPixel
242741143878b23d22cd9cb7b9cba8055179115ce17msarett                                          // else
243741143878b23d22cd9cb7b9cba8055179115ce17msarett                                          //     deltaSrc is bitsPerPixel
244f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo    const SkImageInfo   fDstInfo;
245f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo    void*               fDstRow;
246f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo    const size_t        fDstRowBytes;
247f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo    int                 fCurrY;
248f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo
249741143878b23d22cd9cb7b9cba8055179115ce17msarett    SkSwizzler(RowProc proc, const SkPMColor* ctable, int deltaSrc,
250f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo               const SkImageInfo& info, void* dst, size_t rowBytes);
251f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo
252f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo};
253f24f2247c25b842327e12c70e44efe4cc1b28dfascroggo#endif // SkSwizzler_DEFINED
254