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

Unified Diff: src/effects/SkPerlinNoiseShader.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/core/SkSpecialImage.cpp ('k') | src/effects/SkTableColorFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkPerlinNoiseShader.cpp
diff --git a/src/effects/SkPerlinNoiseShader.cpp b/src/effects/SkPerlinNoiseShader.cpp
index 63916d3ca74112045529ea2f71463af46038f567..d2d460648f4f6f239c78fd5f9f56ae1fa27f1585 100644
--- a/src/effects/SkPerlinNoiseShader.cpp
+++ b/src/effects/SkPerlinNoiseShader.cpp
@@ -593,7 +593,7 @@ const GrFragmentProcessor* GrPerlinNoiseEffect::TestCreate(GrProcessorTestData*
return shader->asFragmentProcessor(d->fContext,
GrTest::TestMatrix(d->fRandom), nullptr,
- kNone_SkFilterQuality);
+ kNone_SkFilterQuality, SkSourceGammaTreatment::kRespect);
}
void GrGLPerlinNoise::emitCode(EmitArgs& args) {
@@ -893,10 +893,11 @@ void GrGLPerlinNoise::onSetData(const GrGLSLProgramDataManager& pdman,
/////////////////////////////////////////////////////////////////////
const GrFragmentProcessor* SkPerlinNoiseShader::asFragmentProcessor(
- GrContext* context,
- const SkMatrix& viewM,
- const SkMatrix* externalLocalMatrix,
- SkFilterQuality) const {
+ GrContext* context,
+ const SkMatrix& viewM,
+ const SkMatrix* externalLocalMatrix,
+ SkFilterQuality,
+ SkSourceGammaTreatment gammaTreatment) const {
SkASSERT(context);
SkMatrix localMatrix = this->getLocalMatrix();
@@ -926,10 +927,10 @@ const GrFragmentProcessor* SkPerlinNoiseShader::asFragmentProcessor(
new PaintingData(fTileSize, fSeed, fBaseFrequencyX, fBaseFrequencyY, matrix);
SkAutoTUnref<GrTexture> permutationsTexture(
GrRefCachedBitmapTexture(context, paintingData->getPermutationsBitmap(),
- GrTextureParams::ClampNoFilter()));
+ GrTextureParams::ClampNoFilter(), gammaTreatment));
SkAutoTUnref<GrTexture> noiseTexture(
GrRefCachedBitmapTexture(context, paintingData->getNoiseBitmap(),
- GrTextureParams::ClampNoFilter()));
+ GrTextureParams::ClampNoFilter(), gammaTreatment));
SkMatrix m = viewM;
m.setTranslateX(-localMatrix.getTranslateX() + SK_Scalar1);
« no previous file with comments | « src/core/SkSpecialImage.cpp ('k') | src/effects/SkTableColorFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698