| 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 |
| 11 #include "Sk4fGradientPriv.h" |
| 11 #include "SkColor.h" | 12 #include "SkColor.h" |
| 12 #include "SkGradientShaderPriv.h" | 13 #include "SkGradientShaderPriv.h" |
| 13 #include "SkMatrix.h" | 14 #include "SkMatrix.h" |
| 14 #include "SkNx.h" | 15 #include "SkNx.h" |
| 15 #include "SkPM4f.h" | 16 #include "SkPM4f.h" |
| 16 #include "SkShader.h" | 17 #include "SkShader.h" |
| 17 #include "SkTArray.h" | 18 #include "SkTArray.h" |
| 18 | 19 |
| 19 class SkGradientShaderBase:: | 20 class SkGradientShaderBase:: |
| 20 GradientShaderBase4fContext : public SkShader::Context { | 21 GradientShaderBase4fContext : public SkShader::Context { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 | 55 |
| 55 private: | 56 private: |
| 56 using INHERITED = SkShader::Context; | 57 using INHERITED = SkShader::Context; |
| 57 | 58 |
| 58 void addMirrorIntervals(const SkGradientShaderBase&, | 59 void addMirrorIntervals(const SkGradientShaderBase&, |
| 59 const Sk4f& componentScale, bool reverse); | 60 const Sk4f& componentScale, bool reverse); |
| 60 | 61 |
| 61 template<typename DstType, SkShader::TileMode tileMode> | 62 template<typename DstType, SkShader::TileMode tileMode> |
| 62 class TSampler; | 63 class TSampler; |
| 63 | 64 |
| 64 template <typename DstType, bool do_premul> | 65 template <typename DstType, ApplyPremul> |
| 65 void shadePremulSpan(int x, int y, DstType[], int count) const; | 66 void shadePremulSpan(int x, int y, DstType[], int count) const; |
| 66 | 67 |
| 67 template <typename DstType, bool do_premul, SkShader::TileMode tileMode> | 68 template <typename DstType, ApplyPremul, SkShader::TileMode tileMode> |
| 68 void shadeSpanInternal(int x, int y, DstType[], int count) const; | 69 void shadeSpanInternal(int x, int y, DstType[], int count) const; |
| 69 }; | 70 }; |
| 70 | 71 |
| 71 #endif // Sk4fGradientBase_DEFINED | 72 #endif // Sk4fGradientBase_DEFINED |
| OLD | NEW |