OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #include "effects/GrCoverageSetOpXP.h" | 9 #include "effects/GrCoverageSetOpXP.h" |
10 #include "GrColor.h" | 10 #include "GrColor.h" |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 return SkRef(&gRevDiffCDXPF); | 221 return SkRef(&gRevDiffCDXPF); |
222 } | 222 } |
223 break; | 223 break; |
224 } | 224 } |
225 default: | 225 default: |
226 return NULL; | 226 return NULL; |
227 } | 227 } |
228 } | 228 } |
229 | 229 |
230 GrXferProcessor* | 230 GrXferProcessor* |
231 GrCoverageSetOpXPFactory::onCreateXferProcessor(const GrDrawTargetCaps& caps, | 231 GrCoverageSetOpXPFactory::onCreateXferProcessor(const GrProcOptInfo& colorPOI, |
232 const GrProcOptInfo& colorPOI, | |
233 const GrProcOptInfo& covPOI, | 232 const GrProcOptInfo& covPOI, |
234 const GrDeviceCoordTexture* dstC
opy) const { | 233 const GrDeviceCoordTexture* dstC
opy) const { |
235 return CoverageSetOpXP::Create(fRegionOp, fInvertCoverage); | 234 return CoverageSetOpXP::Create(fRegionOp, fInvertCoverage); |
236 } | 235 } |
237 | 236 |
238 void GrCoverageSetOpXPFactory::getInvariantOutput(const GrProcOptInfo& colorPOI, | 237 void GrCoverageSetOpXPFactory::getInvariantOutput(const GrProcOptInfo& colorPOI, |
239 const GrProcOptInfo& coverageP
OI, | 238 const GrProcOptInfo& coverageP
OI, |
240 GrXPFactory::InvariantOutput*
output) const { | 239 GrXPFactory::InvariantOutput*
output) const { |
241 if (SkRegion::kReplace_Op == fRegionOp) { | 240 if (SkRegion::kReplace_Op == fRegionOp) { |
242 if (coveragePOI.isSolidWhite()) { | 241 if (coveragePOI.isSolidWhite()) { |
(...skipping 14 matching lines...) Expand all Loading... |
257 | 256 |
258 GrXPFactory* GrCoverageSetOpXPFactory::TestCreate(SkRandom* random, | 257 GrXPFactory* GrCoverageSetOpXPFactory::TestCreate(SkRandom* random, |
259 GrContext*, | 258 GrContext*, |
260 const GrDrawTargetCaps&, | 259 const GrDrawTargetCaps&, |
261 GrTexture*[]) { | 260 GrTexture*[]) { |
262 SkRegion::Op regionOp = SkRegion::Op(random->nextULessThan(SkRegion::kLastOp
+ 1)); | 261 SkRegion::Op regionOp = SkRegion::Op(random->nextULessThan(SkRegion::kLastOp
+ 1)); |
263 bool invertCoverage = random->nextBool(); | 262 bool invertCoverage = random->nextBool(); |
264 return GrCoverageSetOpXPFactory::Create(regionOp, invertCoverage); | 263 return GrCoverageSetOpXPFactory::Create(regionOp, invertCoverage); |
265 } | 264 } |
266 | 265 |
OLD | NEW |