| 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 10 matching lines...) Expand all Loading... |
| 21 Sk4fStorage& operator=(const Sk4f& src) { | 21 Sk4fStorage& operator=(const Sk4f& src) { |
| 22 src.store(fArray); | 22 src.store(fArray); |
| 23 return *this; | 23 return *this; |
| 24 } | 24 } |
| 25 }; | 25 }; |
| 26 | 26 |
| 27 class SkLinearGradient : public SkGradientShaderBase { | 27 class SkLinearGradient : public SkGradientShaderBase { |
| 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 ContextRec&) 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 | 38 |
| 39 struct Rec { | 39 struct Rec { |
| 40 Sk4fStorage fColor; | 40 Sk4fStorage fColor; |
| 41 float fPos; | 41 float fPos; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 69 Context* onCreateContext(const ContextRec&, void* storage) const override; | 69 Context* onCreateContext(const ContextRec&, void* storage) const override; |
| 70 | 70 |
| 71 private: | 71 private: |
| 72 friend class SkGradientShader; | 72 friend class SkGradientShader; |
| 73 typedef SkGradientShaderBase INHERITED; | 73 typedef SkGradientShaderBase INHERITED; |
| 74 const SkPoint fStart; | 74 const SkPoint fStart; |
| 75 const SkPoint fEnd; | 75 const SkPoint fEnd; |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 #endif | 78 #endif |
| OLD | NEW |