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 of from shader B as its "src". | 27 "dst", and the result of 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 virtual bool setContext(const SkBitmap&, const SkPaint&, | 37 virtual bool onSetContext(Context* c, const SkBitmap&, const SkPaint&, |
38 const SkMatrix&) SK_OVERRIDE; | 38 const SkMatrix&) SK_OVERRIDE; |
39 virtual void endContext() SK_OVERRIDE; | 39 virtual void endContext(Context* c) SK_OVERRIDE; |
40 virtual void shadeSpan(int x, int y, SkPMColor[], int count) SK_OVERRIDE; | 40 virtual void shadeSpan(Context* c, int x, int y, SkPMColor[], int count) SK_
OVERRIDE; |
41 | 41 |
42 SK_DEVELOPER_TO_STRING() | 42 SK_DEVELOPER_TO_STRING() |
43 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposeShader) | 43 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposeShader) |
44 | 44 |
45 protected: | 45 protected: |
46 SkComposeShader(SkReadBuffer& ); | 46 SkComposeShader(SkReadBuffer& ); |
47 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; | 47 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
48 | 48 |
49 private: | 49 private: |
50 | |
51 SkShader* fShaderA; | 50 SkShader* fShaderA; |
52 SkShader* fShaderB; | 51 SkShader* fShaderB; |
53 SkXfermode* fMode; | 52 SkXfermode* fMode; |
54 | 53 |
| 54 DEFINE_CONTEXT_RETRIEVAL_FUNCTIONS() |
| 55 |
| 56 size_t getMySpaceNeededForContext() const; |
| 57 |
55 typedef SkShader INHERITED; | 58 typedef SkShader INHERITED; |
56 }; | 59 }; |
57 | 60 |
58 #endif | 61 #endif |
OLD | NEW |