aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2018-06-14 11:44:02 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-06-14 17:02:07 +0000
commit653f34da95f3717d048b1961760f09dc28138321 (patch)
tree3140ad390554d377b57015cefe961f6893a1b2e9 /src/effects
parent5538c1390649811eb6498eeca53cc1db00877503 (diff)
Remove GrPixelConfig argument to GrColorSpaceXform[Effect]::Make
This was for sRGB configs, which are no longer treated special. Pulling this out of https://skia-review.googlesource.com/c/skia/+/132090 to land separately. Change-Id: Id04c4e82ad4ffe375cfd384490839b0488e54d44 Reviewed-on: https://skia-review.googlesource.com/134843 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/effects')
-rw-r--r--src/effects/SkAlphaThresholdFilter.cpp3
-rw-r--r--src/effects/SkArithmeticImageFilter.cpp6
-rw-r--r--src/effects/SkDisplacementMapEffect.cpp4
-rw-r--r--src/effects/SkMagnifierImageFilter.cpp3
-rw-r--r--src/effects/SkXfermodeImageFilter.cpp6
5 files changed, 7 insertions, 15 deletions
diff --git a/src/effects/SkAlphaThresholdFilter.cpp b/src/effects/SkAlphaThresholdFilter.cpp
index 5bd2571842..9dc8ae4b02 100644
--- a/src/effects/SkAlphaThresholdFilter.cpp
+++ b/src/effects/SkAlphaThresholdFilter.cpp
@@ -174,10 +174,9 @@ sk_sp<SkSpecialImage> SkAlphaThresholdFilterImpl::onFilterImage(SkSpecialImage*
}
const OutputProperties& outProps = ctx.outputProperties();
- GrPixelConfig inputConfig = inputProxy->config();
auto textureFP = GrSimpleTextureEffect::Make(std::move(inputProxy), SkMatrix::I());
textureFP = GrColorSpaceXformEffect::Make(std::move(textureFP), input->getColorSpace(),
- inputConfig, outProps.colorSpace());
+ outProps.colorSpace());
if (!textureFP) {
return nullptr;
}
diff --git a/src/effects/SkArithmeticImageFilter.cpp b/src/effects/SkArithmeticImageFilter.cpp
index 1a16465d9d..3fc065536b 100644
--- a/src/effects/SkArithmeticImageFilter.cpp
+++ b/src/effects/SkArithmeticImageFilter.cpp
@@ -311,13 +311,12 @@ sk_sp<SkSpecialImage> ArithmeticImageFilterImpl::filterImageGPU(
if (backgroundProxy) {
SkMatrix backgroundMatrix = SkMatrix::MakeTrans(-SkIntToScalar(backgroundOffset.fX),
-SkIntToScalar(backgroundOffset.fY));
- GrPixelConfig bgConfig = backgroundProxy->config();
bgFP = GrTextureDomainEffect::Make(
std::move(backgroundProxy), backgroundMatrix,
GrTextureDomain::MakeTexelDomain(background->subset()),
GrTextureDomain::kDecal_Mode, GrSamplerState::Filter::kNearest);
bgFP = GrColorSpaceXformEffect::Make(std::move(bgFP), background->getColorSpace(),
- bgConfig, outputProperties.colorSpace());
+ outputProperties.colorSpace());
} else {
bgFP = GrConstColorProcessor::Make(GrColor4f::TransparentBlack(),
GrConstColorProcessor::InputMode::kIgnore);
@@ -326,13 +325,12 @@ sk_sp<SkSpecialImage> ArithmeticImageFilterImpl::filterImageGPU(
if (foregroundProxy) {
SkMatrix foregroundMatrix = SkMatrix::MakeTrans(-SkIntToScalar(foregroundOffset.fX),
-SkIntToScalar(foregroundOffset.fY));
- GrPixelConfig fgConfig = foregroundProxy->config();
auto foregroundFP = GrTextureDomainEffect::Make(
std::move(foregroundProxy), foregroundMatrix,
GrTextureDomain::MakeTexelDomain(foreground->subset()),
GrTextureDomain::kDecal_Mode, GrSamplerState::Filter::kNearest);
foregroundFP = GrColorSpaceXformEffect::Make(std::move(foregroundFP),
- foreground->getColorSpace(), fgConfig,
+ foreground->getColorSpace(),
outputProperties.colorSpace());
paint.addColorFragmentProcessor(std::move(foregroundFP));
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp
index 9ac46f1713..8983fcacbd 100644
--- a/src/effects/SkDisplacementMapEffect.cpp
+++ b/src/effects/SkDisplacementMapEffect.cpp
@@ -293,7 +293,6 @@ sk_sp<SkSpecialImage> SkDisplacementMapEffect::onFilterImage(SkSpecialImage* sou
SkIntToScalar(colorOffset.fY - displOffset.fY));
SkColorSpace* colorSpace = ctx.outputProperties().colorSpace();
- GrPixelConfig colorConfig = colorProxy->config();
std::unique_ptr<GrFragmentProcessor> fp =
GrDisplacementMapEffect::Make(fXChannelSelector,
fYChannelSelector,
@@ -302,8 +301,7 @@ sk_sp<SkSpecialImage> SkDisplacementMapEffect::onFilterImage(SkSpecialImage* sou
offsetMatrix,
std::move(colorProxy),
SkISize::Make(color->width(), color->height()));
- fp = GrColorSpaceXformEffect::Make(std::move(fp), color->getColorSpace(), colorConfig,
- colorSpace);
+ fp = GrColorSpaceXformEffect::Make(std::move(fp), color->getColorSpace(), colorSpace);
GrPaint paint;
paint.addColorFragmentProcessor(std::move(fp));
diff --git a/src/effects/SkMagnifierImageFilter.cpp b/src/effects/SkMagnifierImageFilter.cpp
index 7df30cee72..40624ab05a 100644
--- a/src/effects/SkMagnifierImageFilter.cpp
+++ b/src/effects/SkMagnifierImageFilter.cpp
@@ -108,7 +108,6 @@ sk_sp<SkSpecialImage> SkMagnifierImageFilter::onFilterImage(SkSpecialImage* sour
offset->fY = bounds.top();
bounds.offset(-inputOffset);
- GrPixelConfig inputConfig = inputProxy->config();
auto fp = GrMagnifierEffect::Make(std::move(inputProxy),
bounds,
fSrcRect,
@@ -117,7 +116,7 @@ sk_sp<SkSpecialImage> SkMagnifierImageFilter::onFilterImage(SkSpecialImage* sour
bounds.width() * invInset,
bounds.height() * invInset);
fp = GrColorSpaceXformEffect::Make(std::move(fp), input->getColorSpace(),
- inputConfig, ctx.outputProperties().colorSpace());
+ ctx.outputProperties().colorSpace());
if (!fp) {
return nullptr;
}
diff --git a/src/effects/SkXfermodeImageFilter.cpp b/src/effects/SkXfermodeImageFilter.cpp
index d32488d5f6..7393ab9485 100644
--- a/src/effects/SkXfermodeImageFilter.cpp
+++ b/src/effects/SkXfermodeImageFilter.cpp
@@ -281,13 +281,12 @@ sk_sp<SkSpecialImage> SkXfermodeImageFilter_Base::filterImageGPU(
if (backgroundProxy) {
SkMatrix bgMatrix = SkMatrix::MakeTrans(-SkIntToScalar(backgroundOffset.fX),
-SkIntToScalar(backgroundOffset.fY));
- GrPixelConfig bgConfig = backgroundProxy->config();
bgFP = GrTextureDomainEffect::Make(std::move(backgroundProxy), bgMatrix,
GrTextureDomain::MakeTexelDomain(background->subset()),
GrTextureDomain::kDecal_Mode,
GrSamplerState::Filter::kNearest);
bgFP = GrColorSpaceXformEffect::Make(std::move(bgFP), background->getColorSpace(),
- bgConfig, outputProperties.colorSpace());
+ outputProperties.colorSpace());
} else {
bgFP = GrConstColorProcessor::Make(GrColor4f::TransparentBlack(),
GrConstColorProcessor::InputMode::kIgnore);
@@ -296,13 +295,12 @@ sk_sp<SkSpecialImage> SkXfermodeImageFilter_Base::filterImageGPU(
if (foregroundProxy) {
SkMatrix fgMatrix = SkMatrix::MakeTrans(-SkIntToScalar(foregroundOffset.fX),
-SkIntToScalar(foregroundOffset.fY));
- GrPixelConfig fgConfig = foregroundProxy->config();
auto foregroundFP = GrTextureDomainEffect::Make(
std::move(foregroundProxy), fgMatrix,
GrTextureDomain::MakeTexelDomain(foreground->subset()),
GrTextureDomain::kDecal_Mode, GrSamplerState::Filter::kNearest);
foregroundFP = GrColorSpaceXformEffect::Make(std::move(foregroundFP),
- foreground->getColorSpace(), fgConfig,
+ foreground->getColorSpace(),
outputProperties.colorSpace());
paint.addColorFragmentProcessor(std::move(foregroundFP));