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

Side by Side Diff: src/codec/SkMaskSwizzler.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 | « no previous file | src/codec/SkMaskSwizzler.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 #ifndef SkMaskSwizzler_DEFINED 7 #ifndef SkMaskSwizzler_DEFINED
8 #define SkMaskSwizzler_DEFINED 8 #define SkMaskSwizzler_DEFINED
9 9
10 #include "SkMasks.h" 10 #include "SkMasks.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 } 46 }
47 47
48 private: 48 private:
49 49
50 /* 50 /*
51 * Row procedure used for swizzle 51 * Row procedure used for swizzle
52 */ 52 */
53 typedef SkSwizzler::ResultAlpha (*RowProc)(void* dstRow, const uint8_t* srcR ow, int width, 53 typedef SkSwizzler::ResultAlpha (*RowProc)(void* dstRow, const uint8_t* srcR ow, int width,
54 SkMasks* masks, uint32_t startX, uint32_t sampleX); 54 SkMasks* masks, uint32_t startX, uint32_t sampleX);
55 55
56 SkMaskSwizzler(SkMasks* masks, RowProc proc, int srcWidth, int srcOffset); 56 SkMaskSwizzler(SkMasks* masks, RowProc proc, int subsetWidth, int srcOffset) ;
57 57
58 int onSetSampleX(int) override; 58 int onSetSampleX(int) override;
59 59
60 SkMasks* fMasks; // unowned 60 SkMasks* fMasks; // unowned
61 const RowProc fRowProc; 61 const RowProc fRowProc;
62 62
63 // FIXME: Can this class share more with SkSwizzler? These variables are all the same. 63 // FIXME: Can this class share more with SkSwizzler? These variables are all the same.
64 const int fSrcWidth; // Width of the source - i.e. before any s ampling. 64 const int fSubsetWidth; // Width of the subset of source before an y sampling.
65 int fDstWidth; // Width of dst, which may differ with sam pling. 65 int fDstWidth; // Width of dst, which may differ with sam pling.
66 int fSampleX; 66 int fSampleX;
67 int fSrcOffset; 67 int fSrcOffset;
68 int fX0; 68 int fX0;
69 }; 69 };
70 70
71 #endif 71 #endif
OLDNEW
« no previous file with comments | « no previous file | src/codec/SkMaskSwizzler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698