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

Unified Diff: src/effects/SkMagnifierImageFilter.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/SkLightingImageFilter.cpp ('k') | src/effects/SkMorphologyImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkMagnifierImageFilter.cpp
diff --git a/src/effects/SkMagnifierImageFilter.cpp b/src/effects/SkMagnifierImageFilter.cpp
index 96d04e2786d81854f650d4981beb3bdf5f9c871a..ba704b37a03e5de8fc02efc7ced6b4e05bf34aea 100644
--- a/src/effects/SkMagnifierImageFilter.cpp
+++ b/src/effects/SkMagnifierImageFilter.cpp
@@ -207,19 +207,16 @@ GrGLFragmentProcessor* GrMagnifierEffect::createGLInstance() const {
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrMagnifierEffect);
-GrFragmentProcessor* GrMagnifierEffect::TestCreate(SkRandom* random,
- GrContext* context,
- const GrCaps&,
- GrTexture** textures) {
- GrTexture* texture = textures[0];
+GrFragmentProcessor* GrMagnifierEffect::TestCreate(GrProcessorTestData* d) {
+ GrTexture* texture = d->fTextures[0];
const int kMaxWidth = 200;
const int kMaxHeight = 200;
const int kMaxInset = 20;
- uint32_t width = random->nextULessThan(kMaxWidth);
- uint32_t height = random->nextULessThan(kMaxHeight);
- uint32_t x = random->nextULessThan(kMaxWidth - width);
- uint32_t y = random->nextULessThan(kMaxHeight - height);
- uint32_t inset = random->nextULessThan(kMaxInset);
+ uint32_t width = d->fRandom->nextULessThan(kMaxWidth);
+ uint32_t height = d->fRandom->nextULessThan(kMaxHeight);
+ uint32_t x = d->fRandom->nextULessThan(kMaxWidth - width);
+ uint32_t y = d->fRandom->nextULessThan(kMaxHeight - height);
+ uint32_t inset = d->fRandom->nextULessThan(kMaxInset);
GrFragmentProcessor* effect = GrMagnifierEffect::Create(
texture,
« no previous file with comments | « src/effects/SkLightingImageFilter.cpp ('k') | src/effects/SkMorphologyImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698