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 SkFilterShader_DEFINED | 8 #ifndef SkFilterShader_DEFINED |
9 #define SkFilterShader_DEFINED | 9 #define SkFilterShader_DEFINED |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 class FilterShaderContext : public SkShader::Context { | 22 class FilterShaderContext : public SkShader::Context { |
23 public: | 23 public: |
24 // Takes ownership of shaderContext and calls its destructor. | 24 // Takes ownership of shaderContext and calls its destructor. |
25 FilterShaderContext(const SkFilterShader&, SkShader::Context*, const Con
textRec&); | 25 FilterShaderContext(const SkFilterShader&, SkShader::Context*, const Con
textRec&); |
26 virtual ~FilterShaderContext(); | 26 virtual ~FilterShaderContext(); |
27 | 27 |
28 uint32_t getFlags() const SK_OVERRIDE; | 28 uint32_t getFlags() const SK_OVERRIDE; |
29 | 29 |
30 void shadeSpan(int x, int y, SkPMColor[], int count) SK_OVERRIDE; | 30 void shadeSpan(int x, int y, SkPMColor[], int count) SK_OVERRIDE; |
| 31 void shadeSpan16(int x, int y, uint16_t[], int count) SK_OVERRIDE; |
31 | 32 |
32 void set3DMask(const SkMask* mask) SK_OVERRIDE { | 33 void set3DMask(const SkMask* mask) SK_OVERRIDE { |
33 // forward to our proxy | 34 // forward to our proxy |
34 fShaderContext->set3DMask(mask); | 35 fShaderContext->set3DMask(mask); |
35 } | 36 } |
36 | 37 |
37 private: | 38 private: |
38 SkShader::Context* fShaderContext; | 39 SkShader::Context* fShaderContext; |
39 | 40 |
40 typedef SkShader::Context INHERITED; | 41 typedef SkShader::Context INHERITED; |
41 }; | 42 }; |
42 | 43 |
43 SK_TO_STRING_OVERRIDE() | 44 SK_TO_STRING_OVERRIDE() |
44 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkFilterShader) | 45 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkFilterShader) |
45 | 46 |
46 protected: | 47 protected: |
47 void flatten(SkWriteBuffer&) const SK_OVERRIDE; | 48 void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
48 Context* onCreateContext(const ContextRec&, void* storage) const SK_OVERRIDE
; | 49 Context* onCreateContext(const ContextRec&, void* storage) const SK_OVERRIDE
; |
49 | 50 |
50 | 51 |
51 private: | 52 private: |
52 SkShader* fShader; | 53 SkShader* fShader; |
53 SkColorFilter* fFilter; | 54 SkColorFilter* fFilter; |
54 | 55 |
55 typedef SkShader INHERITED; | 56 typedef SkShader INHERITED; |
56 }; | 57 }; |
57 | 58 |
58 #endif | 59 #endif |
OLD | NEW |