| 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 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 class SkLinearGradient : public SkGradientShaderBase { | 27 class SkLinearGradient : public SkGradientShaderBase { |
| 28 public: | 28 public: |
| 29 enum { | 29 enum { |
| 30 // Temp flag for testing the 4f impl. | 30 // Temp flag for testing the 4f impl. |
| 31 kForce4fContext_PrivateFlag = 1 << 7, | 31 kForce4fContext_PrivateFlag = 1 << 7, |
| 32 }; | 32 }; |
| 33 | 33 |
| 34 SkLinearGradient(const SkPoint pts[2], const Descriptor&); | 34 SkLinearGradient(const SkPoint pts[2], const Descriptor&); |
| 35 | 35 |
| 36 size_t contextSize() const override; | 36 size_t contextSize(const ContextRec&) const override; |
| 37 | 37 |
| 38 class LinearGradientContext : public SkGradientShaderBase::GradientShaderBas
eContext { | 38 class LinearGradientContext : public SkGradientShaderBase::GradientShaderBas
eContext { |
| 39 public: | 39 public: |
| 40 LinearGradientContext(const SkLinearGradient&, const ContextRec&); | 40 LinearGradientContext(const SkLinearGradient&, const ContextRec&); |
| 41 | 41 |
| 42 void shadeSpan(int x, int y, SkPMColor dstC[], int count) override; | 42 void shadeSpan(int x, int y, SkPMColor dstC[], int count) override; |
| 43 | 43 |
| 44 struct Rec { | 44 struct Rec { |
| 45 Sk4fStorage fColor; | 45 Sk4fStorage fColor; |
| 46 float fPos; | 46 float fPos; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 76 private: | 76 private: |
| 77 class LinearGradient4fContext; | 77 class LinearGradient4fContext; |
| 78 | 78 |
| 79 friend class SkGradientShader; | 79 friend class SkGradientShader; |
| 80 typedef SkGradientShaderBase INHERITED; | 80 typedef SkGradientShaderBase INHERITED; |
| 81 const SkPoint fStart; | 81 const SkPoint fStart; |
| 82 const SkPoint fEnd; | 82 const SkPoint fEnd; |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 #endif | 85 #endif |
| OLD | NEW |