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 16 matching lines...) Expand all Loading... |
27 "dst", and the result from shader B as its "src". | 27 "dst", and the result from shader B as its "src". |
28 mode->xfer32(sA_result, sB_result, ...) | 28 mode->xfer32(sA_result, sB_result, ...) |
29 @param shaderA The colors from this shader are seen as the "dst" by the
xfermode | 29 @param shaderA The colors from this shader are seen as the "dst" by the
xfermode |
30 @param shaderB The colors from this shader are seen as the "src" by the
xfermode | 30 @param shaderB The colors from this shader are seen as the "src" by the
xfermode |
31 @param mode The xfermode that combines the colors from the two shade
rs. If mode | 31 @param mode The xfermode that combines the colors from the two shade
rs. If mode |
32 is null, then SRC_OVER is assumed. | 32 is null, then SRC_OVER is assumed. |
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 ContextRec&) 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) const overr
ide; | 43 SkFilterQuality) const overr
ide; |
44 #endif | 44 #endif |
45 | 45 |
46 class ComposeShaderContext : public SkShader::Context { | 46 class ComposeShaderContext : public SkShader::Context { |
47 public: | 47 public: |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 | 81 |
82 private: | 82 private: |
83 SkShader* fShaderA; | 83 SkShader* fShaderA; |
84 SkShader* fShaderB; | 84 SkShader* fShaderB; |
85 SkXfermode* fMode; | 85 SkXfermode* fMode; |
86 | 86 |
87 typedef SkShader INHERITED; | 87 typedef SkShader INHERITED; |
88 }; | 88 }; |
89 | 89 |
90 #endif | 90 #endif |
OLD | NEW |