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

Unified Diff: src/effects/SkBlurMaskFilter.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/SkArithmeticMode_gpu.cpp ('k') | src/effects/SkColorFilters.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkBlurMaskFilter.cpp
diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp
index 22a9ac62a20c40b5be5e64e753ea50e3b8584bf6..0436f087e07833199ebffb992ce95bae5aabac05 100644
--- a/src/effects/SkBlurMaskFilter.cpp
+++ b/src/effects/SkBlurMaskFilter.cpp
@@ -821,14 +821,11 @@ void GrRectBlurEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrRectBlurEffect);
-GrFragmentProcessor* GrRectBlurEffect::TestCreate(SkRandom* random,
- GrContext* context,
- const GrCaps&,
- GrTexture**) {
- float sigma = random->nextRangeF(3,8);
- float width = random->nextRangeF(200,300);
- float height = random->nextRangeF(200,300);
- return GrRectBlurEffect::Create(context->textureProvider(), SkRect::MakeWH(width, height),
+GrFragmentProcessor* GrRectBlurEffect::TestCreate(GrProcessorTestData* d) {
+ float sigma = d->fRandom->nextRangeF(3,8);
+ float width = d->fRandom->nextRangeF(200,300);
+ float height = d->fRandom->nextRangeF(200,300);
+ return GrRectBlurEffect::Create(d->fContext->textureProvider(), SkRect::MakeWH(width, height),
sigma);
}
@@ -1009,17 +1006,14 @@ bool GrRRectBlurEffect::onIsEqual(const GrFragmentProcessor& other) const {
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrRRectBlurEffect);
-GrFragmentProcessor* GrRRectBlurEffect::TestCreate(SkRandom* random,
- GrContext* context,
- const GrCaps& caps,
- GrTexture*[]) {
- SkScalar w = random->nextRangeScalar(100.f, 1000.f);
- SkScalar h = random->nextRangeScalar(100.f, 1000.f);
- SkScalar r = random->nextRangeF(1.f, 9.f);
- SkScalar sigma = random->nextRangeF(1.f,10.f);
+GrFragmentProcessor* GrRRectBlurEffect::TestCreate(GrProcessorTestData* d) {
+ SkScalar w = d->fRandom->nextRangeScalar(100.f, 1000.f);
+ SkScalar h = d->fRandom->nextRangeScalar(100.f, 1000.f);
+ SkScalar r = d->fRandom->nextRangeF(1.f, 9.f);
+ SkScalar sigma = d->fRandom->nextRangeF(1.f,10.f);
SkRRect rrect;
rrect.setRectXY(SkRect::MakeWH(w, h), r, r);
- return GrRRectBlurEffect::Create(context, sigma, rrect);
+ return GrRRectBlurEffect::Create(d->fContext, sigma, rrect);
}
//////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « src/effects/SkArithmeticMode_gpu.cpp ('k') | src/effects/SkColorFilters.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698