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 GrCoverageSetOpXP_DEFINED | 8 #ifndef GrCoverageSetOpXP_DEFINED |
9 #define GrCoverageSetOpXP_DEFINED | 9 #define GrCoverageSetOpXP_DEFINED |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 */ | 21 */ |
22 class GrCoverageSetOpXPFactory : public GrXPFactory { | 22 class GrCoverageSetOpXPFactory : public GrXPFactory { |
23 public: | 23 public: |
24 static GrXPFactory* Create(SkRegion::Op regionOp, bool invertCoverage = fals
e); | 24 static GrXPFactory* Create(SkRegion::Op regionOp, bool invertCoverage = fals
e); |
25 | 25 |
26 bool supportsRGBCoverage(GrColor /*knownColor*/, | 26 bool supportsRGBCoverage(GrColor /*knownColor*/, |
27 uint32_t /*knownColorFlags*/) const SK_OVERRIDE { | 27 uint32_t /*knownColorFlags*/) const SK_OVERRIDE { |
28 return true; | 28 return true; |
29 } | 29 } |
30 | 30 |
31 bool canApplyCoverage(const GrProcOptInfo& /*colorPOI*/, | |
32 const GrProcOptInfo& /*coveragePOI*/) const SK_OVERRID
E { | |
33 return true; | |
34 } | |
35 | |
36 bool canTweakAlphaForCoverage() const SK_OVERRIDE { return false; } | 31 bool canTweakAlphaForCoverage() const SK_OVERRIDE { return false; } |
37 | 32 |
38 void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo&
coveragePOI, | 33 void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo&
coveragePOI, |
39 GrXPFactory::InvariantOutput*) const SK_OVERRIDE; | 34 GrXPFactory::InvariantOutput*) const SK_OVERRIDE; |
40 | 35 |
41 private: | 36 private: |
42 GrCoverageSetOpXPFactory(SkRegion::Op regionOp, bool invertCoverage); | 37 GrCoverageSetOpXPFactory(SkRegion::Op regionOp, bool invertCoverage); |
43 | 38 |
44 GrXferProcessor* onCreateXferProcessor(const GrDrawTargetCaps& caps, | 39 GrXferProcessor* onCreateXferProcessor(const GrDrawTargetCaps& caps, |
45 const GrProcOptInfo& colorPOI, | 40 const GrProcOptInfo& colorPOI, |
(...skipping 13 matching lines...) Expand all Loading... |
59 | 54 |
60 GR_DECLARE_XP_FACTORY_TEST; | 55 GR_DECLARE_XP_FACTORY_TEST; |
61 | 56 |
62 SkRegion::Op fRegionOp; | 57 SkRegion::Op fRegionOp; |
63 bool fInvertCoverage; | 58 bool fInvertCoverage; |
64 | 59 |
65 typedef GrXPFactory INHERITED; | 60 typedef GrXPFactory INHERITED; |
66 }; | 61 }; |
67 #endif | 62 #endif |
68 | 63 |
OLD | NEW |