OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #ifndef SkSweepGradient_DEFINED | 9 #ifndef SkSweepGradient_DEFINED |
10 #define SkSweepGradient_DEFINED | 10 #define SkSweepGradient_DEFINED |
(...skipping 10 matching lines...) Expand all Loading... |
21 public: | 21 public: |
22 SweepGradientContext(const SkSweepGradient& shader, const ContextRec&); | 22 SweepGradientContext(const SkSweepGradient& shader, const ContextRec&); |
23 | 23 |
24 void shadeSpan(int x, int y, SkPMColor dstC[], int count) override; | 24 void shadeSpan(int x, int y, SkPMColor dstC[], int count) override; |
25 void shadeSpan16(int x, int y, uint16_t dstC[], int count) override; | 25 void shadeSpan16(int x, int y, uint16_t dstC[], int count) override; |
26 | 26 |
27 private: | 27 private: |
28 typedef SkGradientShaderBase::GradientShaderBaseContext INHERITED; | 28 typedef SkGradientShaderBase::GradientShaderBaseContext INHERITED; |
29 }; | 29 }; |
30 | 30 |
31 virtual BitmapType asABitmap(SkBitmap* bitmap, | 31 BitmapType asABitmap(SkBitmap* bitmap, SkMatrix* matrix, TileMode* xy) const
override; |
32 SkMatrix* matrix, | |
33 TileMode* xy) const override; | |
34 | 32 |
35 GradientType asAGradient(GradientInfo* info) const override; | 33 GradientType asAGradient(GradientInfo* info) const override; |
36 | 34 |
37 virtual bool asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix&
viewM, | 35 bool asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix& viewM, |
38 const SkMatrix*, GrColor*, | 36 const SkMatrix*, GrColor*, |
39 GrFragmentProcessor**) const override; | 37 GrFragmentProcessor**) const override; |
40 | 38 |
41 SK_TO_STRING_OVERRIDE() | 39 SK_TO_STRING_OVERRIDE() |
42 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkSweepGradient) | 40 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkSweepGradient) |
43 | 41 |
44 protected: | 42 protected: |
45 void flatten(SkWriteBuffer& buffer) const override; | 43 void flatten(SkWriteBuffer& buffer) const override; |
46 Context* onCreateContext(const ContextRec&, void* storage) const override; | 44 Context* onCreateContext(const ContextRec&, void* storage) const override; |
47 | 45 |
48 private: | 46 private: |
49 const SkPoint fCenter; | 47 const SkPoint fCenter; |
50 | 48 |
51 friend class SkGradientShader; | 49 friend class SkGradientShader; |
52 typedef SkGradientShaderBase INHERITED; | 50 typedef SkGradientShaderBase INHERITED; |
53 }; | 51 }; |
54 | 52 |
55 #endif | 53 #endif |
OLD | NEW |