OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
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 | 9 |
10 #ifndef SkComposeShader_DEFINED | 10 #ifndef SkComposeShader_DEFINED |
(...skipping 22 matching lines...) Expand all Loading... |
33 */ | 33 */ |
34 SkComposeShader(SkShader* sA, SkShader* sB, SkXfermode* mode = NULL); | 34 SkComposeShader(SkShader* sA, SkShader* sB, SkXfermode* mode = NULL); |
35 virtual ~SkComposeShader(); | 35 virtual ~SkComposeShader(); |
36 | 36 |
37 size_t contextSize() const override; | 37 size_t contextSize() const override; |
38 | 38 |
39 #if SK_SUPPORT_GPU | 39 #if SK_SUPPORT_GPU |
40 const GrFragmentProcessor* asFragmentProcessor(GrContext*, | 40 const GrFragmentProcessor* asFragmentProcessor(GrContext*, |
41 const SkMatrix& viewM, | 41 const SkMatrix& viewM, |
42 const SkMatrix* localMatrix, | 42 const SkMatrix* localMatrix, |
43 SkFilterQuality, | 43 SkFilterQuality) const overr
ide; |
44 GrProcessorDataManager*) con
st override; | |
45 #endif | 44 #endif |
46 | 45 |
47 class ComposeShaderContext : public SkShader::Context { | 46 class ComposeShaderContext : public SkShader::Context { |
48 public: | 47 public: |
49 // When this object gets destroyed, it will call contextA and contextB's
destructor | 48 // When this object gets destroyed, it will call contextA and contextB's
destructor |
50 // but it will NOT free the memory. | 49 // but it will NOT free the memory. |
51 ComposeShaderContext(const SkComposeShader&, const ContextRec&, | 50 ComposeShaderContext(const SkComposeShader&, const ContextRec&, |
52 SkShader::Context* contextA, SkShader::Context* con
textB); | 51 SkShader::Context* contextA, SkShader::Context* con
textB); |
53 | 52 |
54 SkShader::Context* getShaderContextA() const { return fShaderContextA; } | 53 SkShader::Context* getShaderContextA() const { return fShaderContextA; } |
(...skipping 27 matching lines...) Expand all Loading... |
82 | 81 |
83 private: | 82 private: |
84 SkShader* fShaderA; | 83 SkShader* fShaderA; |
85 SkShader* fShaderB; | 84 SkShader* fShaderB; |
86 SkXfermode* fMode; | 85 SkXfermode* fMode; |
87 | 86 |
88 typedef SkShader INHERITED; | 87 typedef SkShader INHERITED; |
89 }; | 88 }; |
90 | 89 |
91 #endif | 90 #endif |
OLD | NEW |