OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 SkModeColorFilter_DEFINED | 8 #ifndef SkModeColorFilter_DEFINED |
9 #define SkModeColorFilter_DEFINED | 9 #define SkModeColorFilter_DEFINED |
10 | 10 |
(...skipping 22 matching lines...) Expand all Loading... |
33 #ifndef SK_IGNORE_TO_STRING | 33 #ifndef SK_IGNORE_TO_STRING |
34 void toString(SkString* str) const SK_OVERRIDE { | 34 void toString(SkString* str) const SK_OVERRIDE { |
35 str->append("SkModeColorFilter: color: 0x"); | 35 str->append("SkModeColorFilter: color: 0x"); |
36 str->appendHex(fColor); | 36 str->appendHex(fColor); |
37 str->append(" mode: "); | 37 str->append(" mode: "); |
38 str->append(SkXfermode::ModeName(fMode)); | 38 str->append(SkXfermode::ModeName(fMode)); |
39 } | 39 } |
40 #endif | 40 #endif |
41 | 41 |
42 #if SK_SUPPORT_GPU | 42 #if SK_SUPPORT_GPU |
43 GrFragmentProcessor* asFragmentProcessor(GrContext*) const SK_OVERRIDE; | 43 bool asFragmentProcessors(GrContext*, SkTDArray<GrFragmentProcessor*>*) cons
t SK_OVERRIDE; |
44 #endif | 44 #endif |
45 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkModeColorFilter) | 45 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkModeColorFilter) |
46 | 46 |
47 protected: | 47 protected: |
48 void flatten(SkWriteBuffer&) const SK_OVERRIDE; | 48 void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
49 | 49 |
50 private: | 50 private: |
51 SkColor fColor; | 51 SkColor fColor; |
52 SkXfermode::Mode fMode; | 52 SkXfermode::Mode fMode; |
53 // cache | 53 // cache |
54 SkPMColor fPMColor; | 54 SkPMColor fPMColor; |
55 SkXfermodeProc fProc; | 55 SkXfermodeProc fProc; |
56 SkXfermodeProc16 fProc16; | 56 SkXfermodeProc16 fProc16; |
57 | 57 |
58 void updateCache(); | 58 void updateCache(); |
59 | 59 |
60 typedef SkColorFilter INHERITED; | 60 typedef SkColorFilter INHERITED; |
61 }; | 61 }; |
62 | 62 |
63 #endif | 63 #endif |
OLD | NEW |