Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Unified Diff: src/effects/SkColorFilters.cpp

Issue 1213623022: fix up test create functions (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more cleanup Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/effects/SkBlurMaskFilter.cpp ('k') | src/effects/SkColorMatrixFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkColorFilters.cpp
diff --git a/src/effects/SkColorFilters.cpp b/src/effects/SkColorFilters.cpp
index ac3bee0ea68d8a0e5ecf868aac3644be2b19df12..f4a2260715aca8240fcacbb757157d9f0f5fbbdf 100644
--- a/src/effects/SkColorFilters.cpp
+++ b/src/effects/SkColorFilters.cpp
@@ -344,20 +344,17 @@ void ModeColorFilterEffect::onComputeInvariantOutput(GrInvariantOutput* inout) c
}
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(ModeColorFilterEffect);
-GrFragmentProcessor* ModeColorFilterEffect::TestCreate(SkRandom* rand,
- GrContext*,
- const GrCaps&,
- GrTexture*[]) {
+GrFragmentProcessor* ModeColorFilterEffect::TestCreate(GrProcessorTestData* d) {
SkXfermode::Mode mode = SkXfermode::kDst_Mode;
while (SkXfermode::kDst_Mode == mode) {
- mode = static_cast<SkXfermode::Mode>(rand->nextRangeU(0, SkXfermode::kLastCoeffMode));
+ mode = static_cast<SkXfermode::Mode>(d->fRandom->nextRangeU(0, SkXfermode::kLastCoeffMode));
}
// pick a random premul color
- uint8_t alpha = rand->nextULessThan(256);
- GrColor color = GrColorPackRGBA(rand->nextRangeU(0, alpha),
- rand->nextRangeU(0, alpha),
- rand->nextRangeU(0, alpha),
+ uint8_t alpha = d->fRandom->nextULessThan(256);
+ GrColor color = GrColorPackRGBA(d->fRandom->nextRangeU(0, alpha),
+ d->fRandom->nextRangeU(0, alpha),
+ d->fRandom->nextRangeU(0, alpha),
alpha);
return ModeColorFilterEffect::Create(color, mode);
}
« no previous file with comments | « src/effects/SkBlurMaskFilter.cpp ('k') | src/effects/SkColorMatrixFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698