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

Unified Diff: src/gpu/GrDefaultGeoProcFactory.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/GrAAConvexPathRenderer.cpp ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDefaultGeoProcFactory.cpp
diff --git a/src/gpu/GrDefaultGeoProcFactory.cpp b/src/gpu/GrDefaultGeoProcFactory.cpp
index 39efd248eaa3cf437cbbdfdace85dc4ff2cec8fd..48aa813182b99ea5afc0aca15092c18b23b6bc87 100644
--- a/src/gpu/GrDefaultGeoProcFactory.cpp
+++ b/src/gpu/GrDefaultGeoProcFactory.cpp
@@ -239,28 +239,25 @@ private:
GR_DEFINE_GEOMETRY_PROCESSOR_TEST(DefaultGeoProc);
-GrGeometryProcessor* DefaultGeoProc::TestCreate(SkRandom* random,
- GrContext*,
- const GrCaps& caps,
- GrTexture*[]) {
+GrGeometryProcessor* DefaultGeoProc::TestCreate(GrProcessorTestData* d) {
uint32_t flags = 0;
- if (random->nextBool()) {
+ if (d->fRandom->nextBool()) {
flags |= GrDefaultGeoProcFactory::kColor_GPType;
}
- if (random->nextBool()) {
+ if (d->fRandom->nextBool()) {
flags |= GrDefaultGeoProcFactory::kCoverage_GPType;
}
- if (random->nextBool()) {
+ if (d->fRandom->nextBool()) {
flags |= GrDefaultGeoProcFactory::kLocalCoord_GPType;
}
return DefaultGeoProc::Create(flags,
- GrRandomColor(random),
- GrTest::TestMatrix(random),
- GrTest::TestMatrix(random),
- random->nextBool(),
- random->nextBool(),
- GrRandomCoverage(random));
+ GrRandomColor(d->fRandom),
+ GrTest::TestMatrix(d->fRandom),
+ GrTest::TestMatrix(d->fRandom),
+ d->fRandom->nextBool(),
+ d->fRandom->nextBool(),
+ GrRandomCoverage(d->fRandom));
}
const GrGeometryProcessor* GrDefaultGeoProcFactory::Create(uint32_t gpTypeFlags,
« no previous file with comments | « src/gpu/GrAAConvexPathRenderer.cpp ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698