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 const GrFragmentProcessor* asFragmentProcessor(GrContext*, | 60 sk_sp<GrFragmentProcessor> asFragmentProcessor(GrContext*, |
61 const SkMatrix& viewM, | 61 const SkMatrix& viewM, |
62 const SkMatrix*, | 62 const SkMatrix*, |
63 SkFilterQuality, | 63 SkFilterQuality, |
64 SkSourceGammaTreatment) const
override; | 64 SkSourceGammaTreatment) const
override; |
65 #endif | 65 #endif |
66 | 66 |
67 SK_TO_STRING_OVERRIDE() | 67 SK_TO_STRING_OVERRIDE() |
68 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLinearGradient) | 68 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLinearGradient) |
69 | 69 |
70 protected: | 70 protected: |
71 SkLinearGradient(SkReadBuffer& buffer); | 71 SkLinearGradient(SkReadBuffer& buffer); |
72 void flatten(SkWriteBuffer& buffer) const override; | 72 void flatten(SkWriteBuffer& buffer) const override; |
73 size_t onContextSize(const ContextRec&) const override; | 73 size_t onContextSize(const ContextRec&) const override; |
74 Context* onCreateContext(const ContextRec&, void* storage) const override; | 74 Context* onCreateContext(const ContextRec&, void* storage) const override; |
75 | 75 |
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 |