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 GrCustomXfermodePriv_DEFINED | 8 #ifndef GrCustomXfermodePriv_DEFINED |
9 #define GrCustomXfermodePriv_DEFINED | 9 #define GrCustomXfermodePriv_DEFINED |
10 | 10 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 /////////////////////////////////////////////////////////////////////////////// | 57 /////////////////////////////////////////////////////////////////////////////// |
58 | 58 |
59 class GrCustomXPFactory : public GrXPFactory { | 59 class GrCustomXPFactory : public GrXPFactory { |
60 public: | 60 public: |
61 GrCustomXPFactory(SkXfermode::Mode mode); | 61 GrCustomXPFactory(SkXfermode::Mode mode); |
62 | 62 |
63 bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const
SK_OVERRIDE { | 63 bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const
SK_OVERRIDE { |
64 return true; | 64 return true; |
65 } | 65 } |
66 | 66 |
67 bool canApplyCoverage(const GrProcOptInfo& colorPOI, | |
68 const GrProcOptInfo& coveragePOI) const SK_OVERRIDE { | |
69 return true; | |
70 } | |
71 | |
72 bool canTweakAlphaForCoverage() const SK_OVERRIDE { | 67 bool canTweakAlphaForCoverage() const SK_OVERRIDE { |
73 return false; | 68 return false; |
74 } | 69 } |
75 | 70 |
76 void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo&
coveragePOI, | 71 void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo&
coveragePOI, |
77 GrXPFactory::InvariantOutput*) const SK_OVERRIDE; | 72 GrXPFactory::InvariantOutput*) const SK_OVERRIDE; |
78 | 73 |
79 private: | 74 private: |
80 GrXferProcessor* onCreateXferProcessor(const GrDrawTargetCaps& caps, | 75 GrXferProcessor* onCreateXferProcessor(const GrDrawTargetCaps& caps, |
81 const GrProcOptInfo& colorPOI, | 76 const GrProcOptInfo& colorPOI, |
(...skipping 12 matching lines...) Expand all Loading... |
94 } | 89 } |
95 | 90 |
96 GR_DECLARE_XP_FACTORY_TEST; | 91 GR_DECLARE_XP_FACTORY_TEST; |
97 | 92 |
98 SkXfermode::Mode fMode; | 93 SkXfermode::Mode fMode; |
99 | 94 |
100 typedef GrXPFactory INHERITED; | 95 typedef GrXPFactory INHERITED; |
101 }; | 96 }; |
102 #endif | 97 #endif |
103 | 98 |
OLD | NEW |