| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 SkLinearGradient_DEFINED | 8 #ifndef SkLinearGradient_DEFINED |
| 9 #define SkLinearGradient_DEFINED | 9 #define SkLinearGradient_DEFINED |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 public: | 28 public: |
| 29 SkLinearGradient(const SkPoint pts[2], const Descriptor&); | 29 SkLinearGradient(const SkPoint pts[2], const Descriptor&); |
| 30 | 30 |
| 31 size_t contextSize() const override; | 31 size_t contextSize() const override; |
| 32 | 32 |
| 33 class LinearGradientContext : public SkGradientShaderBase::GradientShaderBas
eContext { | 33 class LinearGradientContext : public SkGradientShaderBase::GradientShaderBas
eContext { |
| 34 public: | 34 public: |
| 35 LinearGradientContext(const SkLinearGradient&, const ContextRec&); | 35 LinearGradientContext(const SkLinearGradient&, const ContextRec&); |
| 36 | 36 |
| 37 void shadeSpan(int x, int y, SkPMColor dstC[], int count) override; | 37 void shadeSpan(int x, int y, SkPMColor dstC[], int count) override; |
| 38 void shadeSpan16(int x, int y, uint16_t dstC[], int count) override; | |
| 39 | 38 |
| 40 struct Rec { | 39 struct Rec { |
| 41 Sk4fStorage fColor; | 40 Sk4fStorage fColor; |
| 42 float fPos; | 41 float fPos; |
| 43 float fPosScale; | 42 float fPosScale; |
| 44 }; | 43 }; |
| 45 private: | 44 private: |
| 46 SkTDArray<Rec> fRecs; | 45 SkTDArray<Rec> fRecs; |
| 47 bool fApplyAlphaAfterInterp; | 46 bool fApplyAlphaAfterInterp; |
| 48 | 47 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 70 Context* onCreateContext(const ContextRec&, void* storage) const override; | 69 Context* onCreateContext(const ContextRec&, void* storage) const override; |
| 71 | 70 |
| 72 private: | 71 private: |
| 73 friend class SkGradientShader; | 72 friend class SkGradientShader; |
| 74 typedef SkGradientShaderBase INHERITED; | 73 typedef SkGradientShaderBase INHERITED; |
| 75 const SkPoint fStart; | 74 const SkPoint fStart; |
| 76 const SkPoint fEnd; | 75 const SkPoint fEnd; |
| 77 }; | 76 }; |
| 78 | 77 |
| 79 #endif | 78 #endif |
| OLD | NEW |