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