diff options
author | Brian Osman <brianosman@google.com> | 2016-11-08 17:08:54 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-11-09 01:05:07 +0000 |
commit | 7b8400dad2f82dcc6ed3c7cc1707ebaf85f04840 (patch) | |
tree | dc1e131776fb1922b113f1a5e723205d8c13ccfe /src/effects | |
parent | c8b15684fe5b5b924b90091fedfbedf2806535e0 (diff) |
Rename SkSourceGammaTreatment to SkDestinationSurfaceColorMode
This is much more explicit about what that type represents (are we in
legacy mode or not), which also makes it suitable for other (upcoming)
usage.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4529
Change-Id: Iacb397c34e7765f1ca86c0195bc622b2be4d9acf
Reviewed-on: https://skia-review.googlesource.com/4529
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/effects')
-rw-r--r-- | src/effects/SkPerlinNoiseShader.cpp | 4 | ||||
-rw-r--r-- | src/effects/SkTableColorFilter.cpp | 5 | ||||
-rw-r--r-- | src/effects/gradients/SkGradientShader.cpp | 6 |
3 files changed, 8 insertions, 7 deletions
diff --git a/src/effects/SkPerlinNoiseShader.cpp b/src/effects/SkPerlinNoiseShader.cpp index 87db93d303..0b34d161b1 100644 --- a/src/effects/SkPerlinNoiseShader.cpp +++ b/src/effects/SkPerlinNoiseShader.cpp @@ -926,10 +926,10 @@ sk_sp<GrFragmentProcessor> SkPerlinNoiseShader::asFragmentProcessor(const AsFPAr new PaintingData(fTileSize, fSeed, fBaseFrequencyX, fBaseFrequencyY, matrix); sk_sp<GrTexture> permutationsTexture( GrRefCachedBitmapTexture(args.fContext, paintingData->getPermutationsBitmap(), - GrTextureParams::ClampNoFilter(), args.fGammaTreatment)); + GrTextureParams::ClampNoFilter(), args.fColorMode)); sk_sp<GrTexture> noiseTexture( GrRefCachedBitmapTexture(args.fContext, paintingData->getNoiseBitmap(), - GrTextureParams::ClampNoFilter(), args.fGammaTreatment)); + GrTextureParams::ClampNoFilter(), args.fColorMode)); SkMatrix m = *args.fViewMatrix; m.setTranslateX(-localMatrix.getTranslateX() + SK_Scalar1); diff --git a/src/effects/SkTableColorFilter.cpp b/src/effects/SkTableColorFilter.cpp index 289dee7aee..cd786dfee6 100644 --- a/src/effects/SkTableColorFilter.cpp +++ b/src/effects/SkTableColorFilter.cpp @@ -473,8 +473,9 @@ sk_sp<GrFragmentProcessor> ColorTableEffect::Make(GrContext* context, SkBitmap b sk_sp<GrTexture> texture; if (-1 == row) { atlas = nullptr; - texture.reset(GrRefCachedBitmapTexture(context, bitmap, GrTextureParams::ClampNoFilter(), - SkSourceGammaTreatment::kRespect)); + texture.reset( + GrRefCachedBitmapTexture(context, bitmap, GrTextureParams::ClampNoFilter(), + SkDestinationSurfaceColorMode::kGammaAndColorSpaceAware)); } else { texture.reset(SkRef(atlas->getTexture())); } diff --git a/src/effects/gradients/SkGradientShader.cpp b/src/effects/gradients/SkGradientShader.cpp index 0bd9c8748d..3bf569c888 100644 --- a/src/effects/gradients/SkGradientShader.cpp +++ b/src/effects/gradients/SkGradientShader.cpp @@ -1661,9 +1661,9 @@ GrGradientEffect::GrGradientEffect(const CreateArgs& args) { fCoordTransform.reset(*args.fMatrix, fAtlas->getTexture(), params.filterMode()); fTextureAccess.reset(fAtlas->getTexture(), params); } else { - sk_sp<GrTexture> texture( - GrRefCachedBitmapTexture(args.fContext, bitmap, params, - SkSourceGammaTreatment::kRespect)); + sk_sp<GrTexture> texture(GrRefCachedBitmapTexture( + args.fContext, bitmap, params, + SkDestinationSurfaceColorMode::kGammaAndColorSpaceAware)); if (!texture) { return; } |