| 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 12 matching lines...) Expand all Loading... |
| 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 override { | 27 uint32_t /*knownColorFlags*/) const override { |
| 28 return true; | 28 return true; |
| 29 } | 29 } |
| 30 | 30 |
| 31 bool canTweakAlphaForCoverage() const override { return false; } | 31 bool canTweakAlphaForCoverage() const override { return false; } |
| 32 | 32 |
| 33 bool willBlendCoherently(const GrDrawTargetCaps&) const override { return tr
ue; } |
| 34 |
| 33 void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo&
coveragePOI, | 35 void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo&
coveragePOI, |
| 34 GrXPFactory::InvariantOutput*) const override; | 36 GrXPFactory::InvariantOutput*) const override; |
| 35 | 37 |
| 36 private: | 38 private: |
| 37 GrCoverageSetOpXPFactory(SkRegion::Op regionOp, bool invertCoverage); | 39 GrCoverageSetOpXPFactory(SkRegion::Op regionOp, bool invertCoverage); |
| 38 | 40 |
| 39 GrXferProcessor* onCreateXferProcessor(const GrDrawTargetCaps& caps, | 41 GrXferProcessor* onCreateXferProcessor(const GrDrawTargetCaps& caps, |
| 40 const GrProcOptInfo& colorPOI, | 42 const GrProcOptInfo& colorPOI, |
| 41 const GrProcOptInfo& coveragePOI, | 43 const GrProcOptInfo& coveragePOI, |
| 42 const GrDeviceCoordTexture* dstCopy)
const override; | 44 const GrDeviceCoordTexture* dstCopy)
const override; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 54 | 56 |
| 55 GR_DECLARE_XP_FACTORY_TEST; | 57 GR_DECLARE_XP_FACTORY_TEST; |
| 56 | 58 |
| 57 SkRegion::Op fRegionOp; | 59 SkRegion::Op fRegionOp; |
| 58 bool fInvertCoverage; | 60 bool fInvertCoverage; |
| 59 | 61 |
| 60 typedef GrXPFactory INHERITED; | 62 typedef GrXPFactory INHERITED; |
| 61 }; | 63 }; |
| 62 #endif | 64 #endif |
| 63 | 65 |
| OLD | NEW |