| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 void shade4_clamp(int x, int y, SkPMColor dstC[], int count); | 51 void shade4_clamp(int x, int y, SkPMColor dstC[], int count); |
| 52 template <bool, bool> void shade4_dx_clamp(SkPMColor dstC[], int count,
float fx, float dx, | 52 template <bool, bool> void shade4_dx_clamp(SkPMColor dstC[], int count,
float fx, float dx, |
| 53 float invDx, const float dith
er[2]); | 53 float invDx, const float dith
er[2]); |
| 54 | 54 |
| 55 typedef SkGradientShaderBase::GradientShaderBaseContext INHERITED; | 55 typedef SkGradientShaderBase::GradientShaderBaseContext INHERITED; |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 GradientType asAGradient(GradientInfo* info) const override; | 58 GradientType asAGradient(GradientInfo* info) const override; |
| 59 #if SK_SUPPORT_GPU | 59 #if SK_SUPPORT_GPU |
| 60 sk_sp<GrFragmentProcessor> asFragmentProcessor(GrContext*, | 60 sk_sp<GrFragmentProcessor> asFragmentProcessor(const AsFPArgs&) const overri
de; |
| 61 const SkMatrix& viewM, | |
| 62 const SkMatrix*, | |
| 63 SkFilterQuality, | |
| 64 SkSourceGammaTreatment) const
override; | |
| 65 #endif | 61 #endif |
| 66 | 62 |
| 67 SK_TO_STRING_OVERRIDE() | 63 SK_TO_STRING_OVERRIDE() |
| 68 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLinearGradient) | 64 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLinearGradient) |
| 69 | 65 |
| 70 protected: | 66 protected: |
| 71 SkLinearGradient(SkReadBuffer& buffer); | 67 SkLinearGradient(SkReadBuffer& buffer); |
| 72 void flatten(SkWriteBuffer& buffer) const override; | 68 void flatten(SkWriteBuffer& buffer) const override; |
| 73 size_t onContextSize(const ContextRec&) const override; | 69 size_t onContextSize(const ContextRec&) const override; |
| 74 Context* onCreateContext(const ContextRec&, void* storage) const override; | 70 Context* onCreateContext(const ContextRec&, void* storage) const override; |
| 75 | 71 |
| 76 private: | 72 private: |
| 77 class LinearGradient4fContext; | 73 class LinearGradient4fContext; |
| 78 | 74 |
| 79 friend class SkGradientShader; | 75 friend class SkGradientShader; |
| 80 typedef SkGradientShaderBase INHERITED; | 76 typedef SkGradientShaderBase INHERITED; |
| 81 const SkPoint fStart; | 77 const SkPoint fStart; |
| 82 const SkPoint fEnd; | 78 const SkPoint fEnd; |
| 83 }; | 79 }; |
| 84 | 80 |
| 85 #endif | 81 #endif |
| OLD | NEW |