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 "GrCaps.h" | 10 #include "GrCaps.h" |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 } | 238 } |
239 | 239 |
240 void GrCoverageSetOpXPFactory::getInvariantBlendedColor(const GrProcOptInfo& col
orPOI, | 240 void GrCoverageSetOpXPFactory::getInvariantBlendedColor(const GrProcOptInfo& col
orPOI, |
241 InvariantBlendedColor* b
lendedColor) const { | 241 InvariantBlendedColor* b
lendedColor) const { |
242 blendedColor->fWillBlendWithDst = SkRegion::kReplace_Op != fRegionOp; | 242 blendedColor->fWillBlendWithDst = SkRegion::kReplace_Op != fRegionOp; |
243 blendedColor->fKnownColorFlags = kNone_GrColorComponentFlags; | 243 blendedColor->fKnownColorFlags = kNone_GrColorComponentFlags; |
244 } | 244 } |
245 | 245 |
246 GR_DEFINE_XP_FACTORY_TEST(GrCoverageSetOpXPFactory); | 246 GR_DEFINE_XP_FACTORY_TEST(GrCoverageSetOpXPFactory); |
247 | 247 |
248 GrXPFactory* GrCoverageSetOpXPFactory::TestCreate(SkRandom* random, | 248 GrXPFactory* GrCoverageSetOpXPFactory::TestCreate(GrProcessorTestData* d) { |
249 GrContext*, | 249 SkRegion::Op regionOp = SkRegion::Op(d->fRandom->nextULessThan(SkRegion::kLa
stOp + 1)); |
250 const GrCaps&, | 250 bool invertCoverage = d->fRandom->nextBool(); |
251 GrTexture*[]) { | |
252 SkRegion::Op regionOp = SkRegion::Op(random->nextULessThan(SkRegion::kLastOp
+ 1)); | |
253 bool invertCoverage = random->nextBool(); | |
254 return GrCoverageSetOpXPFactory::Create(regionOp, invertCoverage); | 251 return GrCoverageSetOpXPFactory::Create(regionOp, invertCoverage); |
255 } | 252 } |
256 | 253 |
OLD | NEW |