| 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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 } | 219 } |
| 220 default: | 220 default: |
| 221 return NULL; | 221 return NULL; |
| 222 } | 222 } |
| 223 } | 223 } |
| 224 | 224 |
| 225 GrXferProcessor* | 225 GrXferProcessor* |
| 226 GrCoverageSetOpXPFactory::onCreateXferProcessor(const GrDrawTargetCaps& caps, | 226 GrCoverageSetOpXPFactory::onCreateXferProcessor(const GrDrawTargetCaps& caps, |
| 227 const GrProcOptInfo& colorPOI, | 227 const GrProcOptInfo& colorPOI, |
| 228 const GrProcOptInfo& covPOI, | 228 const GrProcOptInfo& covPOI, |
| 229 const GrDeviceCoordTexture* dstC
opy) const { | 229 const DstTexture* dst) const { |
| 230 SkASSERT(!dst); |
| 230 return CoverageSetOpXP::Create(fRegionOp, fInvertCoverage); | 231 return CoverageSetOpXP::Create(fRegionOp, fInvertCoverage); |
| 231 } | 232 } |
| 232 | 233 |
| 233 void GrCoverageSetOpXPFactory::getInvariantOutput(const GrProcOptInfo& colorPOI, | 234 void GrCoverageSetOpXPFactory::getInvariantOutput(const GrProcOptInfo& colorPOI, |
| 234 const GrProcOptInfo& coverageP
OI, | 235 const GrProcOptInfo& coverageP
OI, |
| 235 GrXPFactory::InvariantOutput*
output) const { | 236 GrXPFactory::InvariantOutput*
output) const { |
| 236 if (SkRegion::kReplace_Op == fRegionOp) { | 237 if (SkRegion::kReplace_Op == fRegionOp) { |
| 237 if (coveragePOI.isSolidWhite()) { | 238 if (coveragePOI.isSolidWhite()) { |
| 238 output->fBlendedColor = GrColor_WHITE; | 239 output->fBlendedColor = GrColor_WHITE; |
| 239 output->fBlendedColorFlags = kRGBA_GrColorComponentFlags; | 240 output->fBlendedColorFlags = kRGBA_GrColorComponentFlags; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 252 | 253 |
| 253 GrXPFactory* GrCoverageSetOpXPFactory::TestCreate(SkRandom* random, | 254 GrXPFactory* GrCoverageSetOpXPFactory::TestCreate(SkRandom* random, |
| 254 GrContext*, | 255 GrContext*, |
| 255 const GrDrawTargetCaps&, | 256 const GrDrawTargetCaps&, |
| 256 GrTexture*[]) { | 257 GrTexture*[]) { |
| 257 SkRegion::Op regionOp = SkRegion::Op(random->nextULessThan(SkRegion::kLastOp
+ 1)); | 258 SkRegion::Op regionOp = SkRegion::Op(random->nextULessThan(SkRegion::kLastOp
+ 1)); |
| 258 bool invertCoverage = random->nextBool(); | 259 bool invertCoverage = random->nextBool(); |
| 259 return GrCoverageSetOpXPFactory::Create(regionOp, invertCoverage); | 260 return GrCoverageSetOpXPFactory::Create(regionOp, invertCoverage); |
| 260 } | 261 } |
| 261 | 262 |
| OLD | NEW |