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

Side by Side Diff: src/codec/SkSwizzler.h

Issue 1407603003: Fix SkSwizzler bug (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Added test and rebase 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 unified diff | Download patch
« no previous file with comments | « src/codec/SkMaskSwizzler.cpp ('k') | src/codec/SkSwizzler.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkSwizzler_DEFINED 8 #ifndef SkSwizzler_DEFINED
9 #define SkSwizzler_DEFINED 9 #define SkSwizzler_DEFINED
10 10
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 const uint8_t* SK_RESTRICT src, 171 const uint8_t* SK_RESTRICT src,
172 int dstWidth, int bpp, int deltaSrc, int offs et, 172 int dstWidth, int bpp, int deltaSrc, int offs et,
173 const SkPMColor ctable[]); 173 const SkPMColor ctable[]);
174 174
175 const RowProc fRowProc; 175 const RowProc fRowProc;
176 const SkPMColor* fColorTable; // Unowned pointer 176 const SkPMColor* fColorTable; // Unowned pointer
177 const int fSrcOffset; // Offset of the src in pixels, allows for partial 177 const int fSrcOffset; // Offset of the src in pixels, allows for partial
178 // scanline decodes. 178 // scanline decodes.
179 int fX0; // Start coordinate for the src, may b e different than 179 int fX0; // Start coordinate for the src, may b e different than
180 // fSrcOffset if we are sampling. 180 // fSrcOffset if we are sampling.
181 const int fSrcWidth; // Width of the source - i.e. before a ny sampling. 181 const int fSubsetWidth; // Width of the subset of the source b efore any sampling.
182 int fDstWidth; // Width of dst, which may differ with sampling. 182 int fDstWidth; // Width of dst, which may differ with sampling.
183 int fSampleX; // step between X samples 183 int fSampleX; // step between X samples
184 const int fBPP; // if bitsPerPixel % 8 == 0 184 const int fBPP; // if bitsPerPixel % 8 == 0
185 // fBPP is bytesPerPixel 185 // fBPP is bytesPerPixel
186 // else 186 // else
187 // fBPP is bitsPerPixel 187 // fBPP is bitsPerPixel
188 188
189 SkSwizzler(RowProc proc, const SkPMColor* ctable, int srcOffset, int srcWidt h, int bpp); 189 SkSwizzler(RowProc proc, const SkPMColor* ctable, int srcOffset, int subsetW idth, int bpp);
190 190
191 int onSetSampleX(int) override; 191 int onSetSampleX(int) override;
192 192
193 }; 193 };
194 #endif // SkSwizzler_DEFINED 194 #endif // SkSwizzler_DEFINED
OLDNEW
« no previous file with comments | « src/codec/SkMaskSwizzler.cpp ('k') | src/codec/SkSwizzler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698