aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-10-18 13:15:13 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-18 18:46:25 +0000
commit2240be96d97b5ac0886381d74a21f1e2a0928f55 (patch)
treee0148f28dd2eb10bbfd3541213e4720b10b043b0 /src/gpu/effects
parent8fed655df87618f8460af2a6284bdef764cf84c8 (diff)
Remove color space xform from GrTextureDomain & GrSimpleTextureEffect
Bug: skia: Change-Id: I31435d334da28cce9bbc654c4b98746b03078897 Reviewed-on: https://skia-review.googlesource.com/61460 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/effects')
-rw-r--r--src/gpu/effects/GrConfigConversionEffect.fp8
-rw-r--r--src/gpu/effects/GrConfigConversionEffect.h6
-rw-r--r--src/gpu/effects/GrSimpleTextureEffect.cpp35
-rw-r--r--src/gpu/effects/GrSimpleTextureEffect.fp16
-rw-r--r--src/gpu/effects/GrSimpleTextureEffect.h19
-rw-r--r--src/gpu/effects/GrTextureDomain.cpp38
-rw-r--r--src/gpu/effects/GrTextureDomain.h10
7 files changed, 33 insertions, 99 deletions
diff --git a/src/gpu/effects/GrConfigConversionEffect.fp b/src/gpu/effects/GrConfigConversionEffect.fp
index 9c697b41cb..4c09bf468d 100644
--- a/src/gpu/effects/GrConfigConversionEffect.fp
+++ b/src/gpu/effects/GrConfigConversionEffect.fp
@@ -73,7 +73,7 @@
std::unique_ptr<GrFragmentProcessor> upmToPM(
new GrConfigConversionEffect(kToPremul_PMConversion));
- paint1.addColorTextureProcessor(dataProxy, nullptr, SkMatrix::I());
+ paint1.addColorTextureProcessor(dataProxy, SkMatrix::I());
paint1.addColorFragmentProcessor(pmToUPM->clone());
paint1.setPorterDuffXPFactory(SkBlendMode::kSrc);
@@ -83,16 +83,14 @@
return false;
}
- paint2.addColorTextureProcessor(readRTC->asTextureProxyRef(), nullptr,
- SkMatrix::I());
+ paint2.addColorTextureProcessor(readRTC->asTextureProxyRef(), SkMatrix::I());
paint2.addColorFragmentProcessor(std::move(upmToPM));
paint2.setPorterDuffXPFactory(SkBlendMode::kSrc);
tempRTC->fillRectToRect(GrNoClip(), std::move(paint2), GrAA::kNo, SkMatrix::I(), kRect,
kRect);
- paint3.addColorTextureProcessor(tempRTC->asTextureProxyRef(), nullptr,
- SkMatrix::I());
+ paint3.addColorTextureProcessor(tempRTC->asTextureProxyRef(), SkMatrix::I());
paint3.addColorFragmentProcessor(std::move(pmToUPM));
paint3.setPorterDuffXPFactory(SkBlendMode::kSrc);
diff --git a/src/gpu/effects/GrConfigConversionEffect.h b/src/gpu/effects/GrConfigConversionEffect.h
index 470f060d8b..803a4ff5e6 100644
--- a/src/gpu/effects/GrConfigConversionEffect.h
+++ b/src/gpu/effects/GrConfigConversionEffect.h
@@ -84,7 +84,7 @@ public:
std::unique_ptr<GrFragmentProcessor> upmToPM(
new GrConfigConversionEffect(kToPremul_PMConversion));
- paint1.addColorTextureProcessor(dataProxy, nullptr, SkMatrix::I());
+ paint1.addColorTextureProcessor(dataProxy, SkMatrix::I());
paint1.addColorFragmentProcessor(pmToUPM->clone());
paint1.setPorterDuffXPFactory(SkBlendMode::kSrc);
@@ -94,14 +94,14 @@ public:
return false;
}
- paint2.addColorTextureProcessor(readRTC->asTextureProxyRef(), nullptr, SkMatrix::I());
+ paint2.addColorTextureProcessor(readRTC->asTextureProxyRef(), SkMatrix::I());
paint2.addColorFragmentProcessor(std::move(upmToPM));
paint2.setPorterDuffXPFactory(SkBlendMode::kSrc);
tempRTC->fillRectToRect(GrNoClip(), std::move(paint2), GrAA::kNo, SkMatrix::I(), kRect,
kRect);
- paint3.addColorTextureProcessor(tempRTC->asTextureProxyRef(), nullptr, SkMatrix::I());
+ paint3.addColorTextureProcessor(tempRTC->asTextureProxyRef(), SkMatrix::I());
paint3.addColorFragmentProcessor(std::move(pmToUPM));
paint3.setPorterDuffXPFactory(SkBlendMode::kSrc);
diff --git a/src/gpu/effects/GrSimpleTextureEffect.cpp b/src/gpu/effects/GrSimpleTextureEffect.cpp
index c3634f5739..595c5e6324 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.cpp
+++ b/src/gpu/effects/GrSimpleTextureEffect.cpp
@@ -23,60 +23,37 @@ public:
GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder;
const GrSimpleTextureEffect& _outer = args.fFp.cast<GrSimpleTextureEffect>();
(void)_outer;
- auto colorXform = _outer.colorXform();
- (void)colorXform;
auto matrix = _outer.matrix();
(void)matrix;
- fColorSpaceHelper.emitCode(args.fUniformHandler, _outer.colorXform().get());
SkString sk_TransformedCoords2D_0 = fragBuilder->ensureCoords2D(args.fTransformedCoords[0]);
fragBuilder->codeAppendf(
- "half4 _tmpVar1;%s = %s * %stexture(%s, %s).%s%s;\n", args.fOutputColor,
+ "%s = %s * texture(%s, %s).%s;\n", args.fOutputColor,
args.fInputColor ? args.fInputColor : "half4(1)",
- fColorSpaceHelper.isValid() ? "(_tmpVar1 = " : "",
fragBuilder->getProgramBuilder()->samplerVariable(args.fTexSamplers[0]).c_str(),
sk_TransformedCoords2D_0.c_str(),
- fragBuilder->getProgramBuilder()->samplerSwizzle(args.fTexSamplers[0]).c_str(),
- fColorSpaceHelper.isValid()
- ? SkStringPrintf(", half4(clamp((%s * half4(_tmpVar1.rgb, 1.0)).rgb, 0.0, "
- "_tmpVar1.a), _tmpVar1.a))",
- args.fUniformHandler->getUniformCStr(
- fColorSpaceHelper.gamutXformUniform()))
- .c_str()
- : "");
+ fragBuilder->getProgramBuilder()->samplerSwizzle(args.fTexSamplers[0]).c_str());
}
private:
void onSetData(const GrGLSLProgramDataManager& pdman,
- const GrFragmentProcessor& _proc) override {
- const GrSimpleTextureEffect& _outer = _proc.cast<GrSimpleTextureEffect>();
- {
- if (fColorSpaceHelper.isValid()) {
- fColorSpaceHelper.setData(pdman, _outer.colorXform().get());
- }
- }
- }
+ const GrFragmentProcessor& _proc) override {}
UniformHandle fImageVar;
- GrGLSLColorSpaceXformHelper fColorSpaceHelper;
};
GrGLSLFragmentProcessor* GrSimpleTextureEffect::onCreateGLSLInstance() const {
return new GrGLSLSimpleTextureEffect();
}
void GrSimpleTextureEffect::onGetGLSLProcessorKey(const GrShaderCaps& caps,
- GrProcessorKeyBuilder* b) const {
- b->add32(GrColorSpaceXform::XformKey(fColorXform.get()));
-}
+ GrProcessorKeyBuilder* b) const {}
bool GrSimpleTextureEffect::onIsEqual(const GrFragmentProcessor& other) const {
const GrSimpleTextureEffect& that = other.cast<GrSimpleTextureEffect>();
(void)that;
if (fImage != that.fImage) return false;
- if (fColorXform != that.fColorXform) return false;
if (fMatrix != that.fMatrix) return false;
return true;
}
GrSimpleTextureEffect::GrSimpleTextureEffect(const GrSimpleTextureEffect& src)
: INHERITED(kGrSimpleTextureEffect_ClassID, src.optimizationFlags())
, fImage(src.fImage)
- , fColorXform(src.fColorXform)
, fMatrix(src.fMatrix)
, fImageCoordTransform(src.fImageCoordTransform) {
this->addTextureSampler(&fImage);
@@ -98,9 +75,7 @@ std::unique_ptr<GrFragmentProcessor> GrSimpleTextureEffect::TestCreate(
: GrSamplerState::Filter::kNearest);
const SkMatrix& matrix = GrTest::TestMatrix(testData->fRandom);
- sk_sp<GrColorSpaceXform> colorSpaceXform = GrTest::TestColorXform(testData->fRandom);
- return GrSimpleTextureEffect::Make(testData->textureProxy(texIdx), std::move(colorSpaceXform),
- matrix);
+ return GrSimpleTextureEffect::Make(testData->textureProxy(texIdx), matrix);
}
#endif
#endif
diff --git a/src/gpu/effects/GrSimpleTextureEffect.fp b/src/gpu/effects/GrSimpleTextureEffect.fp
index 456448a6ea..9e9685f626 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.fp
+++ b/src/gpu/effects/GrSimpleTextureEffect.fp
@@ -6,7 +6,6 @@
*/
in uniform sampler2D image;
-in uniform colorSpaceXform colorXform;
in half4x4 matrix;
@constructorParams {
@@ -23,29 +22,26 @@ in half4x4 matrix;
@make {
static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
- sk_sp<GrColorSpaceXform> colorSpaceXform,
const SkMatrix& matrix) {
return std::unique_ptr<GrFragmentProcessor>(
- new GrSimpleTextureEffect(std::move(proxy), std::move(colorSpaceXform), matrix,
+ new GrSimpleTextureEffect(std::move(proxy), matrix,
GrSamplerState(GrSamplerState::WrapMode::kClamp, GrSamplerState::Filter::kNearest)));
}
/* clamp mode */
static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
- sk_sp<GrColorSpaceXform> colorSpaceXform,
const SkMatrix& matrix,
GrSamplerState::Filter filter) {
return std::unique_ptr<GrFragmentProcessor>(
- new GrSimpleTextureEffect(std::move(proxy), std::move(colorSpaceXform), matrix,
+ new GrSimpleTextureEffect(std::move(proxy), matrix,
GrSamplerState(GrSamplerState::WrapMode::kClamp, filter)));
}
static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
- sk_sp<GrColorSpaceXform> colorSpaceXform,
const SkMatrix& matrix,
const GrSamplerState& p) {
return std::unique_ptr<GrFragmentProcessor>(
- new GrSimpleTextureEffect(std::move(proxy), std::move(colorSpaceXform), matrix, p));
+ new GrSimpleTextureEffect(std::move(proxy), matrix, p));
}
}
@@ -56,7 +52,7 @@ in half4x4 matrix;
}
void main() {
- sk_OutColor = sk_InColor * texture(image, sk_TransformedCoords2D[0], colorXform);
+ sk_OutColor = sk_InColor * texture(image, sk_TransformedCoords2D[0]);
}
@test(testData) {
@@ -69,7 +65,5 @@ void main() {
: GrSamplerState::Filter::kNearest);
const SkMatrix& matrix = GrTest::TestMatrix(testData->fRandom);
- sk_sp<GrColorSpaceXform> colorSpaceXform = GrTest::TestColorXform(testData->fRandom);
- return GrSimpleTextureEffect::Make(testData->textureProxy(texIdx), std::move(colorSpaceXform),
- matrix);
+ return GrSimpleTextureEffect::Make(testData->textureProxy(texIdx), matrix);
}
diff --git a/src/gpu/effects/GrSimpleTextureEffect.h b/src/gpu/effects/GrSimpleTextureEffect.h
index 7f98b13fd2..b0874977f2 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.h
+++ b/src/gpu/effects/GrSimpleTextureEffect.h
@@ -17,52 +17,44 @@
#include "GrColorSpaceXform.h"
class GrSimpleTextureEffect : public GrFragmentProcessor {
public:
- sk_sp<GrColorSpaceXform> colorXform() const { return fColorXform; }
SkMatrix44 matrix() const { return fMatrix; }
static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
- sk_sp<GrColorSpaceXform>
- colorSpaceXform,
const SkMatrix& matrix) {
return std::unique_ptr<GrFragmentProcessor>(
- new GrSimpleTextureEffect(std::move(proxy), std::move(colorSpaceXform), matrix,
+ new GrSimpleTextureEffect(std::move(proxy), matrix,
GrSamplerState(GrSamplerState::WrapMode::kClamp,
GrSamplerState::Filter::kNearest)));
}
/* clamp mode */
static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
- sk_sp<GrColorSpaceXform>
- colorSpaceXform,
const SkMatrix& matrix,
GrSamplerState::Filter filter) {
return std::unique_ptr<GrFragmentProcessor>(new GrSimpleTextureEffect(
- std::move(proxy), std::move(colorSpaceXform), matrix,
+ std::move(proxy), matrix,
GrSamplerState(GrSamplerState::WrapMode::kClamp, filter)));
}
static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
- sk_sp<GrColorSpaceXform>
- colorSpaceXform,
const SkMatrix& matrix,
const GrSamplerState& p) {
return std::unique_ptr<GrFragmentProcessor>(
- new GrSimpleTextureEffect(std::move(proxy), std::move(colorSpaceXform), matrix, p));
+ new GrSimpleTextureEffect(std::move(proxy), matrix, p));
}
GrSimpleTextureEffect(const GrSimpleTextureEffect& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "SimpleTextureEffect"; }
private:
- GrSimpleTextureEffect(sk_sp<GrTextureProxy> image, sk_sp<GrColorSpaceXform> colorXform,
- SkMatrix44 matrix, GrSamplerState samplerParams)
+ GrSimpleTextureEffect(sk_sp<GrTextureProxy> image, SkMatrix44 matrix,
+ GrSamplerState samplerParams)
: INHERITED(kGrSimpleTextureEffect_ClassID,
(OptimizationFlags)kCompatibleWithCoverageAsAlpha_OptimizationFlag |
(GrPixelConfigIsOpaque(image->config())
? kPreservesOpaqueInput_OptimizationFlag
: kNone_OptimizationFlags))
, fImage(std::move(image), samplerParams)
- , fColorXform(colorXform)
, fMatrix(matrix)
, fImageCoordTransform(matrix, fImage.proxy()) {
this->addTextureSampler(&fImage);
@@ -73,7 +65,6 @@ private:
bool onIsEqual(const GrFragmentProcessor&) const override;
GR_DECLARE_FRAGMENT_PROCESSOR_TEST
TextureSampler fImage;
- sk_sp<GrColorSpaceXform> fColorXform;
SkMatrix44 fMatrix;
GrCoordTransform fImageCoordTransform;
typedef GrFragmentProcessor INHERITED;
diff --git a/src/gpu/effects/GrTextureDomain.cpp b/src/gpu/effects/GrTextureDomain.cpp
index 9e4abeb5dd..e1da72135d 100644
--- a/src/gpu/effects/GrTextureDomain.cpp
+++ b/src/gpu/effects/GrTextureDomain.cpp
@@ -13,7 +13,6 @@
#include "GrSurfaceProxyPriv.h"
#include "GrTexture.h"
#include "SkFloatingPoint.h"
-#include "glsl/GrGLSLColorSpaceXformHelper.h"
#include "glsl/GrGLSLFragmentProcessor.h"
#include "glsl/GrGLSLFragmentShaderBuilder.h"
#include "glsl/GrGLSLProgramDataManager.h"
@@ -67,8 +66,7 @@ void GrTextureDomain::GLDomain::sampleTexture(GrGLSLShaderBuilder* builder,
const char* outColor,
const SkString& inCoords,
GrGLSLFragmentProcessor::SamplerHandle sampler,
- const char* inModulateColor,
- GrGLSLColorSpaceXformHelper* colorXformHelper) {
+ const char* inModulateColor) {
SkASSERT((Mode)-1 == fMode || textureDomain.mode() == fMode);
SkDEBUGCODE(fMode = textureDomain.mode();)
@@ -87,7 +85,7 @@ void GrTextureDomain::GLDomain::sampleTexture(GrGLSLShaderBuilder* builder,
case kIgnore_Mode: {
builder->codeAppendf("%s = ", outColor);
builder->appendTextureLookupAndModulate(inModulateColor, sampler, inCoords.c_str(),
- kFloat2_GrSLType, colorXformHelper);
+ kFloat2_GrSLType);
builder->codeAppend(";");
break;
}
@@ -98,7 +96,7 @@ void GrTextureDomain::GLDomain::sampleTexture(GrGLSLShaderBuilder* builder,
builder->codeAppendf("%s = ", outColor);
builder->appendTextureLookupAndModulate(inModulateColor, sampler, clampedCoords.c_str(),
- kFloat2_GrSLType, colorXformHelper);
+ kFloat2_GrSLType);
builder->codeAppend(";");
break;
}
@@ -117,7 +115,7 @@ void GrTextureDomain::GLDomain::sampleTexture(GrGLSLShaderBuilder* builder,
builder->codeAppend("half4 outside = half4(0.0, 0.0, 0.0, 0.0);");
builder->codeAppend("half4 inside = ");
builder->appendTextureLookupAndModulate(inModulateColor, sampler, inCoords.c_str(),
- kFloat2_GrSLType, colorXformHelper);
+ kFloat2_GrSLType);
builder->codeAppend(";");
builder->codeAppendf("float x = (%s).x;", inCoords.c_str());
@@ -138,7 +136,7 @@ void GrTextureDomain::GLDomain::sampleTexture(GrGLSLShaderBuilder* builder,
builder->codeAppendf("%s = any(outside) ? half4(0.0, 0.0, 0.0, 0.0) : ",
outColor);
builder->appendTextureLookupAndModulate(inModulateColor, sampler, inCoords.c_str(),
- kFloat2_GrSLType, colorXformHelper);
+ kFloat2_GrSLType);
builder->codeAppend(";");
}
break;
@@ -151,7 +149,7 @@ void GrTextureDomain::GLDomain::sampleTexture(GrGLSLShaderBuilder* builder,
builder->codeAppendf("%s = ", outColor);
builder->appendTextureLookupAndModulate(inModulateColor, sampler, clampedCoords.c_str(),
- kFloat2_GrSLType, colorXformHelper);
+ kFloat2_GrSLType);
builder->codeAppend(";");
break;
}
@@ -207,23 +205,20 @@ inline GrFragmentProcessor::OptimizationFlags GrTextureDomainEffect::OptFlags(
std::unique_ptr<GrFragmentProcessor> GrTextureDomainEffect::Make(
sk_sp<GrTextureProxy> proxy,
- sk_sp<GrColorSpaceXform> colorSpaceXform,
const SkMatrix& matrix,
const SkRect& domain,
GrTextureDomain::Mode mode,
GrSamplerState::Filter filterMode) {
if (GrTextureDomain::kIgnore_Mode == mode ||
(GrTextureDomain::kClamp_Mode == mode && can_ignore_rect(proxy.get(), domain))) {
- return GrSimpleTextureEffect::Make(std::move(proxy),
- std::move(colorSpaceXform), matrix, filterMode);
+ return GrSimpleTextureEffect::Make(std::move(proxy), matrix, filterMode);
} else {
return std::unique_ptr<GrFragmentProcessor>(new GrTextureDomainEffect(
- std::move(proxy), std::move(colorSpaceXform), matrix, domain, mode, filterMode));
+ std::move(proxy), matrix, domain, mode, filterMode));
}
}
GrTextureDomainEffect::GrTextureDomainEffect(sk_sp<GrTextureProxy> proxy,
- sk_sp<GrColorSpaceXform> colorSpaceXform,
const SkMatrix& matrix,
const SkRect& domain,
GrTextureDomain::Mode mode,
@@ -231,8 +226,7 @@ GrTextureDomainEffect::GrTextureDomainEffect(sk_sp<GrTextureProxy> proxy,
: INHERITED(kGrTextureDomainEffect_ClassID, OptFlags(proxy->config(), mode))
, fCoordTransform(matrix, proxy.get())
, fTextureDomain(proxy.get(), domain, mode)
- , fTextureSampler(std::move(proxy), filterMode)
- , fColorSpaceXform(std::move(colorSpaceXform)) {
+ , fTextureSampler(std::move(proxy), filterMode) {
SkASSERT(mode != GrTextureDomain::kRepeat_Mode ||
filterMode == GrSamplerState::Filter::kNearest);
this->addCoordTransform(&fCoordTransform);
@@ -243,8 +237,7 @@ GrTextureDomainEffect::GrTextureDomainEffect(const GrTextureDomainEffect& that)
: INHERITED(kGrTextureDomainEffect_ClassID, that.optimizationFlags())
, fCoordTransform(that.fCoordTransform)
, fTextureDomain(that.fTextureDomain)
- , fTextureSampler(that.fTextureSampler)
- , fColorSpaceXform(that.fColorSpaceXform) {
+ , fTextureSampler(that.fTextureSampler) {
this->addCoordTransform(&fCoordTransform);
this->addTextureSampler(&fTextureSampler);
}
@@ -252,7 +245,6 @@ GrTextureDomainEffect::GrTextureDomainEffect(const GrTextureDomainEffect& that)
void GrTextureDomainEffect::onGetGLSLProcessorKey(const GrShaderCaps& caps,
GrProcessorKeyBuilder* b) const {
b->add32(GrTextureDomain::GLDomain::DomainKey(fTextureDomain));
- b->add32(GrColorSpaceXform::XformKey(this->colorSpaceXform()));
}
GrGLSLFragmentProcessor* GrTextureDomainEffect::onCreateGLSLInstance() const {
@@ -265,7 +257,6 @@ GrGLSLFragmentProcessor* GrTextureDomainEffect::onCreateGLSLInstance() const {
GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder;
SkString coords2D = fragBuilder->ensureCoords2D(args.fTransformedCoords[0]);
- fColorSpaceHelper.emitCode(args.fUniformHandler, tde.colorSpaceXform());
fGLDomain.sampleTexture(fragBuilder,
args.fUniformHandler,
args.fShaderCaps,
@@ -273,8 +264,7 @@ GrGLSLFragmentProcessor* GrTextureDomainEffect::onCreateGLSLInstance() const {
args.fOutputColor,
coords2D,
args.fTexSamplers[0],
- args.fInputColor,
- &fColorSpaceHelper);
+ args.fInputColor);
}
protected:
@@ -285,14 +275,10 @@ GrGLSLFragmentProcessor* GrTextureDomainEffect::onCreateGLSLInstance() const {
GrSurfaceProxy* proxy = tde.textureSampler(0).proxy();
fGLDomain.setData(pdman, domain, proxy);
- if (SkToBool(tde.colorSpaceXform())) {
- fColorSpaceHelper.setData(pdman, tde.colorSpaceXform());
- }
}
private:
GrTextureDomain::GLDomain fGLDomain;
- GrGLSLColorSpaceXformHelper fColorSpaceHelper;
};
return new GLSLProcessor;
@@ -321,10 +307,8 @@ std::unique_ptr<GrFragmentProcessor> GrTextureDomainEffect::TestCreate(GrProcess
(GrTextureDomain::Mode) d->fRandom->nextULessThan(GrTextureDomain::kModeCount);
const SkMatrix& matrix = GrTest::TestMatrix(d->fRandom);
bool bilerp = mode != GrTextureDomain::kRepeat_Mode ? d->fRandom->nextBool() : false;
- sk_sp<GrColorSpaceXform> colorSpaceXform = GrTest::TestColorXform(d->fRandom);
return GrTextureDomainEffect::Make(
std::move(proxy),
- std::move(colorSpaceXform),
matrix,
domain,
mode,
diff --git a/src/gpu/effects/GrTextureDomain.h b/src/gpu/effects/GrTextureDomain.h
index 6d1f4b268c..166ae2b2b7 100644
--- a/src/gpu/effects/GrTextureDomain.h
+++ b/src/gpu/effects/GrTextureDomain.h
@@ -10,12 +10,10 @@
#include "GrCoordTransform.h"
#include "GrFragmentProcessor.h"
-#include "GrColorSpaceXform.h"
#include "glsl/GrGLSLFragmentProcessor.h"
#include "glsl/GrGLSLProgramDataManager.h"
class GrGLProgramBuilder;
-class GrGLSLColorSpaceXformHelper;
class GrGLSLShaderBuilder;
class GrInvariantOutput;
class GrGLSLUniformHandler;
@@ -111,8 +109,7 @@ public:
const char* outColor,
const SkString& inCoords,
GrGLSLFragmentProcessor::SamplerHandle sampler,
- const char* inModulateColor = nullptr,
- GrGLSLColorSpaceXformHelper* colorXformHelper = nullptr);
+ const char* inModulateColor = nullptr);
/**
* Call this from GrGLSLFragmentProcessor::setData() to upload uniforms necessary for the
@@ -154,7 +151,6 @@ protected:
class GrTextureDomainEffect : public GrFragmentProcessor {
public:
static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy>,
- sk_sp<GrColorSpaceXform>,
const SkMatrix&,
const SkRect& domain,
GrTextureDomain::Mode,
@@ -179,10 +175,8 @@ private:
GrCoordTransform fCoordTransform;
GrTextureDomain fTextureDomain;
TextureSampler fTextureSampler;
- sk_sp<GrColorSpaceXform> fColorSpaceXform;
GrTextureDomainEffect(sk_sp<GrTextureProxy>,
- sk_sp<GrColorSpaceXform>,
const SkMatrix&,
const SkRect& domain,
GrTextureDomain::Mode,
@@ -198,8 +192,6 @@ private:
bool onIsEqual(const GrFragmentProcessor&) const override;
- const GrColorSpaceXform* colorSpaceXform() const { return fColorSpaceXform.get(); }
-
GR_DECLARE_FRAGMENT_PROCESSOR_TEST
typedef GrFragmentProcessor INHERITED;