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

Unified Diff: experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.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 | « experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.h ('k') | gm/dcshader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp
diff --git a/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp b/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp
index 42211e4d7b4840fea90d8844cad6347c4b57ceb5..ab0c46c3501772eec4e9c0f40da31d6796affd8c 100644
--- a/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp
+++ b/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp
@@ -729,7 +729,7 @@ const GrFragmentProcessor* GrPerlinNoise2Effect::TestCreate(GrProcessorTestData*
GrPaint grPaint;
return shader->asFragmentProcessor(d->fContext,
GrTest::TestMatrix(d->fRandom), nullptr,
- kNone_SkFilterQuality);
+ kNone_SkFilterQuality, SkSourceGammaTreatment::kRespect);
}
void GrGLPerlinNoise2::emitCode(EmitArgs& args) {
@@ -1134,7 +1134,7 @@ const GrFragmentProcessor* GrImprovedPerlinNoiseEffect::TestCreate(GrProcessorTe
GrPaint grPaint;
return shader->asFragmentProcessor(d->fContext,
GrTest::TestMatrix(d->fRandom), nullptr,
- kNone_SkFilterQuality);
+ kNone_SkFilterQuality, SkSourceGammaTreatment::kRespect);
}
void GrGLImprovedPerlinNoise::emitCode(EmitArgs& args) {
@@ -1302,7 +1302,8 @@ const GrFragmentProcessor* SkPerlinNoiseShader2::asFragmentProcessor(
GrContext* context,
const SkMatrix& viewM,
const SkMatrix* externalLocalMatrix,
- SkFilterQuality) const {
+ SkFilterQuality,
+ SkSourceGammaTreatment gammaTreatment) const {
SkASSERT(context);
SkMatrix localMatrix = this->getLocalMatrix();
@@ -1328,10 +1329,10 @@ const GrFragmentProcessor* SkPerlinNoiseShader2::asFragmentProcessor(
GrTextureParams::FilterMode::kNone_FilterMode);
SkAutoTUnref<GrTexture> permutationsTexture(
GrRefCachedBitmapTexture(context, paintingData->getImprovedPermutationsBitmap(),
- textureParams));
+ textureParams, gammaTreatment));
SkAutoTUnref<GrTexture> gradientTexture(
GrRefCachedBitmapTexture(context, paintingData->getGradientBitmap(),
- textureParams));
+ textureParams, gammaTreatment));
return GrImprovedPerlinNoiseEffect::Create(fNumOctaves, fSeed, paintingData,
permutationsTexture, gradientTexture, m);
}
@@ -1350,10 +1351,10 @@ const GrFragmentProcessor* SkPerlinNoiseShader2::asFragmentProcessor(
SkAutoTUnref<GrTexture> permutationsTexture(
GrRefCachedBitmapTexture(context, paintingData->getPermutationsBitmap(),
- GrTextureParams::ClampNoFilter()));
+ GrTextureParams::ClampNoFilter(), gammaTreatment));
SkAutoTUnref<GrTexture> noiseTexture(
GrRefCachedBitmapTexture(context, paintingData->getNoiseBitmap(),
- GrTextureParams::ClampNoFilter()));
+ GrTextureParams::ClampNoFilter(), gammaTreatment));
if ((permutationsTexture) && (noiseTexture)) {
SkAutoTUnref<GrFragmentProcessor> inner(
« no previous file with comments | « experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.h ('k') | gm/dcshader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698