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

Unified Diff: src/gpu/effects/GrBezierEffect.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/gpu/GrOvalRenderer.cpp ('k') | src/gpu/effects/GrBicubicEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrBezierEffect.cpp
diff --git a/src/gpu/effects/GrBezierEffect.cpp b/src/gpu/effects/GrBezierEffect.cpp
index cdea9d01ff1b26eb6b496b88eb60468a2087ad63..6f492c76ac77877384be341ca8ecaef75f4444cc 100644
--- a/src/gpu/effects/GrBezierEffect.cpp
+++ b/src/gpu/effects/GrBezierEffect.cpp
@@ -217,17 +217,15 @@ GrConicEffect::GrConicEffect(GrColor color, const SkMatrix& viewMatrix, uint8_t
GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrConicEffect);
-GrGeometryProcessor* GrConicEffect::TestCreate(SkRandom* random,
- GrContext*,
- const GrCaps& caps,
- GrTexture*[]) {
+GrGeometryProcessor* GrConicEffect::TestCreate(GrProcessorTestData* d) {
GrGeometryProcessor* gp;
do {
- GrPrimitiveEdgeType edgeType = static_cast<GrPrimitiveEdgeType>(
- random->nextULessThan(kGrProcessorEdgeTypeCnt));
- gp = GrConicEffect::Create(GrRandomColor(random), GrTest::TestMatrix(random),
- edgeType, caps,
- GrTest::TestMatrix(random), random->nextBool());
+ GrPrimitiveEdgeType edgeType =
+ static_cast<GrPrimitiveEdgeType>(
+ d->fRandom->nextULessThan(kGrProcessorEdgeTypeCnt));
+ gp = GrConicEffect::Create(GrRandomColor(d->fRandom), GrTest::TestMatrix(d->fRandom),
+ edgeType, *d->fCaps,
+ GrTest::TestMatrix(d->fRandom), d->fRandom->nextBool());
} while (NULL == gp);
return gp;
}
@@ -427,19 +425,16 @@ GrQuadEffect::GrQuadEffect(GrColor color, const SkMatrix& viewMatrix, uint8_t co
GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrQuadEffect);
-GrGeometryProcessor* GrQuadEffect::TestCreate(SkRandom* random,
- GrContext*,
- const GrCaps& caps,
- GrTexture*[]) {
+GrGeometryProcessor* GrQuadEffect::TestCreate(GrProcessorTestData* d) {
GrGeometryProcessor* gp;
do {
GrPrimitiveEdgeType edgeType = static_cast<GrPrimitiveEdgeType>(
- random->nextULessThan(kGrProcessorEdgeTypeCnt));
- gp = GrQuadEffect::Create(GrRandomColor(random),
- GrTest::TestMatrix(random),
- edgeType, caps,
- GrTest::TestMatrix(random),
- random->nextBool());
+ d->fRandom->nextULessThan(kGrProcessorEdgeTypeCnt));
+ gp = GrQuadEffect::Create(GrRandomColor(d->fRandom),
+ GrTest::TestMatrix(d->fRandom),
+ edgeType, *d->fCaps,
+ GrTest::TestMatrix(d->fRandom),
+ d->fRandom->nextBool());
} while (NULL == gp);
return gp;
}
@@ -650,16 +645,14 @@ GrCubicEffect::GrCubicEffect(GrColor color, const SkMatrix& viewMatrix,
GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrCubicEffect);
-GrGeometryProcessor* GrCubicEffect::TestCreate(SkRandom* random,
- GrContext*,
- const GrCaps& caps,
- GrTexture*[]) {
+GrGeometryProcessor* GrCubicEffect::TestCreate(GrProcessorTestData* d) {
GrGeometryProcessor* gp;
do {
- GrPrimitiveEdgeType edgeType = static_cast<GrPrimitiveEdgeType>(
- random->nextULessThan(kGrProcessorEdgeTypeCnt));
- gp = GrCubicEffect::Create(GrRandomColor(random),
- GrTest::TestMatrix(random), edgeType, caps);
+ GrPrimitiveEdgeType edgeType =
+ static_cast<GrPrimitiveEdgeType>(
+ d->fRandom->nextULessThan(kGrProcessorEdgeTypeCnt));
+ gp = GrCubicEffect::Create(GrRandomColor(d->fRandom),
+ GrTest::TestMatrix(d->fRandom), edgeType, *d->fCaps);
} while (NULL == gp);
return gp;
}
« no previous file with comments | « src/gpu/GrOvalRenderer.cpp ('k') | src/gpu/effects/GrBicubicEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698