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

Unified Diff: src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp

Issue 2175563003: Bundle SkShader::asFragmentProcessor arguments in a struct (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix indentation to be less arbitrary Created 4 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/gradients/SkTwoPointConicalGradient.cpp ('k') | src/gpu/SkGr.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp
diff --git a/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp b/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp
index 91b0a9326db84e52c7db5828155277d3ee3af0de..438b1b5dc41870d2d362d1174661136ea05fd91f 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp
+++ b/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp
@@ -208,9 +208,9 @@ sk_sp<GrFragmentProcessor> Edge2PtConicalEffect::TestCreate(GrProcessorTestData*
int colorCount = RandomGradientParams(d->fRandom, colors, &stops, &tm);
auto shader = SkGradientShader::MakeTwoPointConical(center1, radius1, center2, radius2,
colors, stops, colorCount, tm);
- sk_sp<GrFragmentProcessor> fp = shader->asFragmentProcessor(d->fContext,
- GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality,
- SkSourceGammaTreatment::kRespect);
+ SkMatrix viewMatrix = GrTest::TestMatrix(d->fRandom);
+ sk_sp<GrFragmentProcessor> fp = shader->asFragmentProcessor(SkShader::AsFPArgs(
+ d->fContext, &viewMatrix, NULL, kNone_SkFilterQuality, SkSourceGammaTreatment::kRespect));
GrAlwaysAssert(fp);
return fp;
}
@@ -485,9 +485,9 @@ sk_sp<GrFragmentProcessor> FocalOutside2PtConicalEffect::TestCreate(GrProcessorT
int colorCount = RandomGradientParams(d->fRandom, colors, &stops, &tm);
auto shader = SkGradientShader::MakeTwoPointConical(center1, radius1, center2, radius2,
colors, stops, colorCount, tm);
- sk_sp<GrFragmentProcessor> fp = shader->asFragmentProcessor(d->fContext,
- GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality,
- SkSourceGammaTreatment::kRespect);
+ SkMatrix viewMatrix = GrTest::TestMatrix(d->fRandom);
+ sk_sp<GrFragmentProcessor> fp = shader->asFragmentProcessor(SkShader::AsFPArgs(
+ d->fContext, &viewMatrix, NULL, kNone_SkFilterQuality, SkSourceGammaTreatment::kRespect));
GrAlwaysAssert(fp);
return fp;
}
@@ -693,9 +693,9 @@ sk_sp<GrFragmentProcessor> FocalInside2PtConicalEffect::TestCreate(GrProcessorTe
int colorCount = RandomGradientParams(d->fRandom, colors, &stops, &tm);
auto shader = SkGradientShader::MakeTwoPointConical(center1, radius1, center2, radius2,
colors, stops, colorCount, tm);
- sk_sp<GrFragmentProcessor> fp = shader->asFragmentProcessor(d->fContext,
- GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality,
- SkSourceGammaTreatment::kRespect);
+ SkMatrix viewMatrix = GrTest::TestMatrix(d->fRandom);
+ sk_sp<GrFragmentProcessor> fp = shader->asFragmentProcessor(SkShader::AsFPArgs(
+ d->fContext, &viewMatrix, NULL, kNone_SkFilterQuality, SkSourceGammaTreatment::kRespect));
GrAlwaysAssert(fp);
return fp;
}
@@ -941,9 +941,9 @@ sk_sp<GrFragmentProcessor> CircleInside2PtConicalEffect::TestCreate(GrProcessorT
int colorCount = RandomGradientParams(d->fRandom, colors, &stops, &tm);
auto shader = SkGradientShader::MakeTwoPointConical(center1, radius1, center2, radius2,
colors, stops, colorCount, tm);
- sk_sp<GrFragmentProcessor> fp = shader->asFragmentProcessor(d->fContext,
- GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality,
- SkSourceGammaTreatment::kRespect);
+ SkMatrix viewMatrix = GrTest::TestMatrix(d->fRandom);
+ sk_sp<GrFragmentProcessor> fp = shader->asFragmentProcessor(SkShader::AsFPArgs(
+ d->fContext, &viewMatrix, NULL, kNone_SkFilterQuality, SkSourceGammaTreatment::kRespect));
GrAlwaysAssert(fp);
return fp;
}
@@ -1174,9 +1174,9 @@ sk_sp<GrFragmentProcessor> CircleOutside2PtConicalEffect::TestCreate(GrProcessor
int colorCount = RandomGradientParams(d->fRandom, colors, &stops, &tm);
auto shader = SkGradientShader::MakeTwoPointConical(center1, radius1, center2, radius2,
colors, stops, colorCount, tm);
- sk_sp<GrFragmentProcessor> fp = shader->asFragmentProcessor(
- d->fContext,GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality,
- SkSourceGammaTreatment::kRespect);
+ SkMatrix viewMatrix = GrTest::TestMatrix(d->fRandom);
+ sk_sp<GrFragmentProcessor> fp = shader->asFragmentProcessor(SkShader::AsFPArgs(
+ d->fContext, &viewMatrix, NULL, kNone_SkFilterQuality, SkSourceGammaTreatment::kRespect));
GrAlwaysAssert(fp);
return fp;
}
« no previous file with comments | « src/effects/gradients/SkTwoPointConicalGradient.cpp ('k') | src/gpu/SkGr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698