OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 GrPorterDuffXferProcessor_DEFINED | 8 #ifndef GrPorterDuffXferProcessor_DEFINED |
9 #define GrPorterDuffXferProcessor_DEFINED | 9 #define GrPorterDuffXferProcessor_DEFINED |
10 | 10 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 static GrXPFactory* Create(GrBlendCoeff src, GrBlendCoeff dst) { | 62 static GrXPFactory* Create(GrBlendCoeff src, GrBlendCoeff dst) { |
63 return SkNEW_ARGS(GrPorterDuffXPFactory, (src, dst)); | 63 return SkNEW_ARGS(GrPorterDuffXPFactory, (src, dst)); |
64 } | 64 } |
65 | 65 |
66 const GrXferProcessor* createXferProcessor() const SK_OVERRIDE; | 66 const GrXferProcessor* createXferProcessor() const SK_OVERRIDE; |
67 | 67 |
68 bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const
SK_OVERRIDE; | 68 bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const
SK_OVERRIDE; |
69 | 69 |
70 private: | 70 private: |
71 GrPorterDuffXPFactory(GrBlendCoeff src, GrBlendCoeff dst) | 71 GrPorterDuffXPFactory(GrBlendCoeff src, GrBlendCoeff dst); |
72 : fSrc(src), fDst(dst) {} | 72 |
| 73 bool onIsEqual(const GrXPFactory& xpfBase) const SK_OVERRIDE { |
| 74 const GrPorterDuffXPFactory& xpf = xpfBase.cast<GrPorterDuffXPFactory>()
; |
| 75 return (fSrc == xpf.fSrc && fDst == xpf.fDst); |
| 76 } |
73 | 77 |
74 GrBlendCoeff fSrc; | 78 GrBlendCoeff fSrc; |
75 GrBlendCoeff fDst; | 79 GrBlendCoeff fDst; |
76 | 80 |
77 typedef GrXPFactory INHERITED; | 81 typedef GrXPFactory INHERITED; |
78 }; | 82 }; |
79 | 83 |
80 #endif | 84 #endif |
OLD | NEW |