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

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

Issue 2037413002: Add SkSourceGammaTreatment enum so we know how to create mips (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix DM compilation Created 4 years, 6 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/SkLinearGradient.h ('k') | src/effects/gradients/SkRadialGradient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkLinearGradient.cpp
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp
index 7752aac51d5431d281c11aac1ae94ac48d287928..cd55673dc982e76e1ce0a2097af4db4b06301178 100644
--- a/src/effects/gradients/SkLinearGradient.cpp
+++ b/src/effects/gradients/SkLinearGradient.cpp
@@ -418,7 +418,8 @@ const GrFragmentProcessor* GrLinearGradient::TestCreate(GrProcessorTestData* d)
int colorCount = RandomGradientParams(d->fRandom, colors, &stops, &tm);
auto shader = SkGradientShader::MakeLinear(points, colors, stops, colorCount, tm);
const GrFragmentProcessor* fp = shader->asFragmentProcessor(d->fContext,
- GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality);
+ GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality,
+ SkSourceGammaTreatment::kRespect);
GrAlwaysAssert(fp);
return fp;
}
@@ -445,7 +446,8 @@ const GrFragmentProcessor* SkLinearGradient::asFragmentProcessor(
GrContext* context,
const SkMatrix& viewm,
const SkMatrix* localMatrix,
- SkFilterQuality) const {
+ SkFilterQuality,
+ SkSourceGammaTreatment) const {
SkASSERT(context);
SkMatrix matrix;
« no previous file with comments | « src/effects/gradients/SkLinearGradient.h ('k') | src/effects/gradients/SkRadialGradient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698