OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 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 Sk4fGradientBase_DEFINED | 8 #ifndef Sk4fGradientBase_DEFINED |
9 #define Sk4fGradientBase_DEFINED | 9 #define Sk4fGradientBase_DEFINED |
10 | 10 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 uint8_t fFlags; | 52 uint8_t fFlags; |
53 bool fDither; | 53 bool fDither; |
54 bool fColorsArePremul; | 54 bool fColorsArePremul; |
55 | 55 |
56 private: | 56 private: |
57 using INHERITED = SkShader::Context; | 57 using INHERITED = SkShader::Context; |
58 | 58 |
59 void addMirrorIntervals(const SkGradientShaderBase&, | 59 void addMirrorIntervals(const SkGradientShaderBase&, |
60 const Sk4f& componentScale, bool reverse); | 60 const Sk4f& componentScale, bool reverse); |
61 | 61 |
62 template<typename DstType, SkShader::TileMode tileMode> | 62 template<DstType, SkShader::TileMode tileMode> |
63 class TSampler; | 63 class TSampler; |
64 | 64 |
65 template <typename DstType, ApplyPremul> | 65 template <DstType dstType, ApplyPremul premul> |
66 void shadePremulSpan(int x, int y, DstType[], int count) const; | 66 void shadePremulSpan(int x, int y, typename DstTraits<dstType, premul>::Type
[], |
| 67 int count) const; |
67 | 68 |
68 template <typename DstType, ApplyPremul, SkShader::TileMode tileMode> | 69 template <DstType dstType, ApplyPremul premul, SkShader::TileMode tileMode> |
69 void shadeSpanInternal(int x, int y, DstType[], int count) const; | 70 void shadeSpanInternal(int x, int y, typename DstTraits<dstType, premul>::Ty
pe[], |
| 71 int count) const; |
70 }; | 72 }; |
71 | 73 |
72 #endif // Sk4fGradientBase_DEFINED | 74 #endif // Sk4fGradientBase_DEFINED |
OLD | NEW |