| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2007 The Android Open Source Project | 2 * Copyright 2007 The Android Open Source Project |
| 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 SkColorShader_DEFINED | 8 #ifndef SkColorShader_DEFINED |
| 9 #define SkColorShader_DEFINED | 9 #define SkColorShader_DEFINED |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 return sizeof(ColorShaderContext); | 29 return sizeof(ColorShaderContext); |
| 30 } | 30 } |
| 31 | 31 |
| 32 class ColorShaderContext : public SkShader::Context { | 32 class ColorShaderContext : public SkShader::Context { |
| 33 public: | 33 public: |
| 34 ColorShaderContext(const SkColorShader& shader, const ContextRec&); | 34 ColorShaderContext(const SkColorShader& shader, const ContextRec&); |
| 35 | 35 |
| 36 uint32_t getFlags() const override; | 36 uint32_t getFlags() const override; |
| 37 void shadeSpan(int x, int y, SkPMColor span[], int count) override; | 37 void shadeSpan(int x, int y, SkPMColor span[], int count) override; |
| 38 void shadeSpanAlpha(int x, int y, uint8_t alpha[], int count) override; | 38 void shadeSpanAlpha(int x, int y, uint8_t alpha[], int count) override; |
| 39 void shadeSpan4f(int x, int y, SkPM4f[], int count) override; | |
| 40 | 39 |
| 41 private: | 40 private: |
| 42 SkPM4f fPM4f; | |
| 43 SkPMColor fPMColor; | 41 SkPMColor fPMColor; |
| 44 uint32_t fFlags; | 42 uint32_t fFlags; |
| 45 | 43 |
| 46 typedef SkShader::Context INHERITED; | 44 typedef SkShader::Context INHERITED; |
| 47 }; | 45 }; |
| 48 | 46 |
| 49 GradientType asAGradient(GradientInfo* info) const override; | 47 GradientType asAGradient(GradientInfo* info) const override; |
| 50 | 48 |
| 51 #if SK_SUPPORT_GPU | 49 #if SK_SUPPORT_GPU |
| 52 const GrFragmentProcessor* asFragmentProcessor(GrContext*, const SkMatrix& v
iewM, | 50 const GrFragmentProcessor* asFragmentProcessor(GrContext*, const SkMatrix& v
iewM, |
| (...skipping 12 matching lines...) Expand all Loading... |
| 65 return true; | 63 return true; |
| 66 } | 64 } |
| 67 | 65 |
| 68 private: | 66 private: |
| 69 SkColor fColor; | 67 SkColor fColor; |
| 70 | 68 |
| 71 typedef SkShader INHERITED; | 69 typedef SkShader INHERITED; |
| 72 }; | 70 }; |
| 73 | 71 |
| 74 #endif | 72 #endif |
| OLD | NEW |