| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 73 |
| 74 bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const
SK_OVERRIDE { | 74 bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const
SK_OVERRIDE { |
| 75 return true; | 75 return true; |
| 76 } | 76 } |
| 77 | 77 |
| 78 bool canApplyCoverage(const GrProcOptInfo& colorPOI, const GrProcOptInfo& co
veragePOI, | 78 bool canApplyCoverage(const GrProcOptInfo& colorPOI, const GrProcOptInfo& co
veragePOI, |
| 79 bool colorWriteDisabled) const SK_OVERRIDE { | 79 bool colorWriteDisabled) const SK_OVERRIDE { |
| 80 return true; | 80 return true; |
| 81 } | 81 } |
| 82 | 82 |
| 83 bool willBlendWithDst(const GrProcOptInfo& colorPOI, const GrProcOptInfo& co
veragePOI, | |
| 84 bool colorWriteDisabled) const SK_OVERRIDE; | |
| 85 | |
| 86 bool canTweakAlphaForCoverage() const SK_OVERRIDE { return false; } | 83 bool canTweakAlphaForCoverage() const SK_OVERRIDE { return false; } |
| 87 | 84 |
| 88 bool getOpaqueAndKnownColor(const GrProcOptInfo& colorPOI, | 85 void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo&
coveragePOI, |
| 89 const GrProcOptInfo& coveragePOI, | 86 bool colorWriteDisabled, |
| 90 GrColor* solidColor, | 87 GrXPFactory::InvariantOutput*) const SK_OVERRIDE; |
| 91 uint32_t* solidColorKnownComponents) const SK_OV
ERRIDE; | |
| 92 | 88 |
| 93 private: | 89 private: |
| 94 GrCoverageSetOpXPFactory(SkRegion::Op regionOp, bool invertCoverage); | 90 GrCoverageSetOpXPFactory(SkRegion::Op regionOp, bool invertCoverage); |
| 95 | 91 |
| 96 bool onIsEqual(const GrXPFactory& xpfBase) const SK_OVERRIDE { | 92 bool onIsEqual(const GrXPFactory& xpfBase) const SK_OVERRIDE { |
| 97 const GrCoverageSetOpXPFactory& xpf = xpfBase.cast<GrCoverageSetOpXPFact
ory>(); | 93 const GrCoverageSetOpXPFactory& xpf = xpfBase.cast<GrCoverageSetOpXPFact
ory>(); |
| 98 return fRegionOp == xpf.fRegionOp; | 94 return fRegionOp == xpf.fRegionOp; |
| 99 } | 95 } |
| 100 | 96 |
| 101 GR_DECLARE_XP_FACTORY_TEST; | 97 GR_DECLARE_XP_FACTORY_TEST; |
| 102 | 98 |
| 103 SkRegion::Op fRegionOp; | 99 SkRegion::Op fRegionOp; |
| 104 bool fInvertCoverage; | 100 bool fInvertCoverage; |
| 105 | 101 |
| 106 typedef GrXPFactory INHERITED; | 102 typedef GrXPFactory INHERITED; |
| 107 }; | 103 }; |
| 108 #endif | 104 #endif |
| 109 | 105 |
| OLD | NEW |