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 16 matching lines...) Expand all Loading... |
27 uint32_t /*knownColorFlags*/) const override { | 27 uint32_t /*knownColorFlags*/) const override { |
28 return true; | 28 return true; |
29 } | 29 } |
30 | 30 |
31 void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo&
coveragePOI, | 31 void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo&
coveragePOI, |
32 GrXPFactory::InvariantOutput*) const override; | 32 GrXPFactory::InvariantOutput*) const override; |
33 | 33 |
34 private: | 34 private: |
35 GrCoverageSetOpXPFactory(SkRegion::Op regionOp, bool invertCoverage); | 35 GrCoverageSetOpXPFactory(SkRegion::Op regionOp, bool invertCoverage); |
36 | 36 |
37 GrXferProcessor* onCreateXferProcessor(const GrDrawTargetCaps& caps, | 37 GrXferProcessor* onCreateXferProcessor(const GrCaps& caps, |
38 const GrProcOptInfo& colorPOI, | 38 const GrProcOptInfo& colorPOI, |
39 const GrProcOptInfo& coveragePOI, | 39 const GrProcOptInfo& coveragePOI, |
40 const GrDeviceCoordTexture* dstCopy)
const override; | 40 const GrDeviceCoordTexture* dstCopy)
const override; |
41 | 41 |
42 bool willReadDstColor(const GrDrawTargetCaps& /*caps*/, | 42 bool willReadDstColor(const GrCaps& /*caps*/, |
43 const GrProcOptInfo& /*colorPOI*/, | 43 const GrProcOptInfo& /*colorPOI*/, |
44 const GrProcOptInfo& /*coveragePOI*/) const override { | 44 const GrProcOptInfo& /*coveragePOI*/) const override { |
45 return false; | 45 return false; |
46 } | 46 } |
47 | 47 |
48 bool onIsEqual(const GrXPFactory& xpfBase) const override { | 48 bool onIsEqual(const GrXPFactory& xpfBase) const override { |
49 const GrCoverageSetOpXPFactory& xpf = xpfBase.cast<GrCoverageSetOpXPFact
ory>(); | 49 const GrCoverageSetOpXPFactory& xpf = xpfBase.cast<GrCoverageSetOpXPFact
ory>(); |
50 return fRegionOp == xpf.fRegionOp; | 50 return fRegionOp == xpf.fRegionOp; |
51 } | 51 } |
52 | 52 |
53 GR_DECLARE_XP_FACTORY_TEST; | 53 GR_DECLARE_XP_FACTORY_TEST; |
54 | 54 |
55 SkRegion::Op fRegionOp; | 55 SkRegion::Op fRegionOp; |
56 bool fInvertCoverage; | 56 bool fInvertCoverage; |
57 | 57 |
58 typedef GrXPFactory INHERITED; | 58 typedef GrXPFactory INHERITED; |
59 }; | 59 }; |
60 #endif | 60 #endif |
61 | 61 |
OLD | NEW |