diff options
author | Brian Salomon <bsalomon@google.com> | 2017-10-24 12:52:33 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-10-24 20:43:02 +0000 |
commit | f3569f0f6d312570c7344b345f8b3a03a892f751 (patch) | |
tree | 2da4cd0b0bac2b4b47d6ce91e7db53fa3b5dcad7 /src/core/SkGpuBlurUtils.cpp | |
parent | 6dd0d8a2659d5976fdd2b6528f787ac7f0b0005b (diff) |
Add GrColorSpaceInfo and use in place of GrRenderTargetContext in paint conversion.
This moves us closer to making GrAtlasTextContext and related classes usable without a GrRenderTargetContext.
Change-Id: Ife52d69a3f925e23da88043acb4d8dc9f672a025
Reviewed-on: https://skia-review.googlesource.com/63304
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/core/SkGpuBlurUtils.cpp')
-rw-r--r-- | src/core/SkGpuBlurUtils.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/SkGpuBlurUtils.cpp b/src/core/SkGpuBlurUtils.cpp index 647cebd1f2..d1ee3a2c8a 100644 --- a/src/core/SkGpuBlurUtils.cpp +++ b/src/core/SkGpuBlurUtils.cpp @@ -79,7 +79,7 @@ static void convolve_gaussian_1d(GrRenderTargetContext* renderTargetContext, GrTextureDomain::Mode mode, int bounds[2]) { GrPaint paint; - paint.setGammaCorrect(renderTargetContext->isGammaCorrect()); + paint.setGammaCorrect(renderTargetContext->colorSpaceInfo().isGammaCorrect()); std::unique_ptr<GrFragmentProcessor> conv(GrGaussianConvolutionFragmentProcessor::Make( std::move(proxy), direction, radius, sigma, mode, bounds)); @@ -107,7 +107,7 @@ static void convolve_gaussian_2d(GrRenderTargetContext* renderTargetContext, SkISize size = SkISize::Make(2 * radiusX + 1, 2 * radiusY + 1); SkIPoint kernelOffset = SkIPoint::Make(radiusX, radiusY); GrPaint paint; - paint.setGammaCorrect(renderTargetContext->isGammaCorrect()); + paint.setGammaCorrect(renderTargetContext->colorSpaceInfo().isGammaCorrect()); auto conv = GrMatrixConvolutionEffect::MakeGaussian(std::move(proxy), srcBounds, size, 1.0, 0.0, kernelOffset, mode, true, sigmaX, sigmaY); @@ -273,7 +273,7 @@ sk_sp<GrRenderTargetContext> GaussianBlur(GrContext* context, } GrPaint paint; - paint.setGammaCorrect(dstRenderTargetContext->isGammaCorrect()); + paint.setGammaCorrect(dstRenderTargetContext->colorSpaceInfo().isGammaCorrect()); if (GrTextureDomain::kIgnore_Mode != mode && i == 1) { SkRect domain = SkRect::Make(localSrcBounds); @@ -394,7 +394,7 @@ sk_sp<GrRenderTargetContext> GaussianBlur(GrContext* context, } GrPaint paint; - paint.setGammaCorrect(dstRenderTargetContext->isGammaCorrect()); + paint.setGammaCorrect(dstRenderTargetContext->colorSpaceInfo().isGammaCorrect()); if (GrTextureDomain::kIgnore_Mode != mode) { SkRect domain = SkRect::Make(localSrcBounds); |