diff options
author | Brian Osman <brianosman@google.com> | 2017-10-18 10:23:18 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-10-18 15:24:45 +0000 |
commit | 5e34167d53c06c3c4512592bd1477fcf2df97172 (patch) | |
tree | b8fb506c8e6abf763c84a19d28b74cce2a0f4ffa /src/gpu/GrTextureProducer.cpp | |
parent | bd2c653e8aba1077ac1a5d8fed5cfc304e4095a8 (diff) |
Convert more code to use color space xform FP
Special images, image shaders, and all texture producers,
as well as bicubic (which simplifies factory call sites).
Bug: skia:
Change-Id: I3f7c178060f25db8b659fe66e132f5ea066317b1
Reviewed-on: https://skia-review.googlesource.com/61261
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/GrTextureProducer.cpp')
-rw-r--r-- | src/gpu/GrTextureProducer.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/gpu/GrTextureProducer.cpp b/src/gpu/GrTextureProducer.cpp index 2b9679a478..f8a0df7937 100644 --- a/src/gpu/GrTextureProducer.cpp +++ b/src/gpu/GrTextureProducer.cpp @@ -221,7 +221,6 @@ GrTextureProducer::DomainMode GrTextureProducer::DetermineDomainMode( std::unique_ptr<GrFragmentProcessor> GrTextureProducer::CreateFragmentProcessorForDomainAndFilter( sk_sp<GrTextureProxy> proxy, - sk_sp<GrColorSpaceXform> colorSpaceXform, const SkMatrix& textureMatrix, DomainMode domainMode, const SkRect& domain, @@ -229,24 +228,21 @@ std::unique_ptr<GrFragmentProcessor> GrTextureProducer::CreateFragmentProcessorF SkASSERT(kTightCopy_DomainMode != domainMode); if (filterOrNullForBicubic) { if (kDomain_DomainMode == domainMode) { - return GrTextureDomainEffect::Make(std::move(proxy), - std::move(colorSpaceXform), textureMatrix, - domain, GrTextureDomain::kClamp_Mode, + return GrTextureDomainEffect::Make(std::move(proxy), nullptr, textureMatrix, domain, + GrTextureDomain::kClamp_Mode, *filterOrNullForBicubic); } else { GrSamplerState samplerState(GrSamplerState::WrapMode::kClamp, *filterOrNullForBicubic); - return GrSimpleTextureEffect::Make(std::move(proxy), std::move(colorSpaceXform), - textureMatrix, samplerState); + return GrSimpleTextureEffect::Make(std::move(proxy), nullptr, textureMatrix, + samplerState); } } else { if (kDomain_DomainMode == domainMode) { - return GrBicubicEffect::Make(std::move(proxy), std::move(colorSpaceXform), - textureMatrix, domain); + return GrBicubicEffect::Make(std::move(proxy), textureMatrix, domain); } else { static const GrSamplerState::WrapMode kClampClamp[] = { GrSamplerState::WrapMode::kClamp, GrSamplerState::WrapMode::kClamp}; - return GrBicubicEffect::Make(std::move(proxy), std::move(colorSpaceXform), - textureMatrix, kClampClamp); + return GrBicubicEffect::Make(std::move(proxy), textureMatrix, kClampClamp); } } } |