Bye bye processor data manager.
Review URL: https://codereview.chromium.org/1388113002
diff --git a/src/gpu/effects/Gr1DKernelEffect.h b/src/gpu/effects/Gr1DKernelEffect.h
index 0aec4b1..3ceb75d 100644
--- a/src/gpu/effects/Gr1DKernelEffect.h
+++ b/src/gpu/effects/Gr1DKernelEffect.h
@@ -28,11 +28,10 @@
kY_Direction,
};
- Gr1DKernelEffect(GrProcessorDataManager* procDataManager,
- GrTexture* texture,
+ Gr1DKernelEffect(GrTexture* texture,
Direction direction,
int radius)
- : INHERITED(procDataManager, texture, GrCoordTransform::MakeDivByTextureWHMatrix(texture))
+ : INHERITED(texture, GrCoordTransform::MakeDivByTextureWHMatrix(texture))
, fDirection(direction)
, fRadius(radius) {}
diff --git a/src/gpu/effects/GrBicubicEffect.cpp b/src/gpu/effects/GrBicubicEffect.cpp
index d8a9726..afcb55e 100644
--- a/src/gpu/effects/GrBicubicEffect.cpp
+++ b/src/gpu/effects/GrBicubicEffect.cpp
@@ -126,24 +126,21 @@
}
}
-GrBicubicEffect::GrBicubicEffect(GrProcessorDataManager* procDataManager,
- GrTexture* texture,
+GrBicubicEffect::GrBicubicEffect(GrTexture* texture,
const SkScalar coefficients[16],
const SkMatrix &matrix,
const SkShader::TileMode tileModes[2])
- : INHERITED(procDataManager, texture, matrix,
- GrTextureParams(tileModes, GrTextureParams::kNone_FilterMode))
+ : INHERITED(texture, matrix, GrTextureParams(tileModes, GrTextureParams::kNone_FilterMode))
, fDomain(GrTextureDomain::IgnoredDomain()) {
this->initClassID<GrBicubicEffect>();
convert_row_major_scalar_coeffs_to_column_major_floats(fCoefficients, coefficients);
}
-GrBicubicEffect::GrBicubicEffect(GrProcessorDataManager* procDataManager,
- GrTexture* texture,
+GrBicubicEffect::GrBicubicEffect(GrTexture* texture,
const SkScalar coefficients[16],
const SkMatrix &matrix,
const SkRect& domain)
- : INHERITED(procDataManager, texture, matrix,
+ : INHERITED(texture, matrix,
GrTextureParams(SkShader::kClamp_TileMode, GrTextureParams::kNone_FilterMode))
, fDomain(domain, GrTextureDomain::kClamp_Mode) {
this->initClassID<GrBicubicEffect>();
@@ -182,7 +179,7 @@
for (int i = 0; i < 16; i++) {
coefficients[i] = d->fRandom->nextSScalar1();
}
- return GrBicubicEffect::Create(d->fProcDataManager, d->fTextures[texIdx], coefficients);
+ return GrBicubicEffect::Create(d->fTextures[texIdx], coefficients);
}
//////////////////////////////////////////////////////////////////////////////
diff --git a/src/gpu/effects/GrBicubicEffect.h b/src/gpu/effects/GrBicubicEffect.h
index 18382a3..9167b9c 100644
--- a/src/gpu/effects/GrBicubicEffect.h
+++ b/src/gpu/effects/GrBicubicEffect.h
@@ -32,16 +32,15 @@
/**
* Create a simple filter effect with custom bicubic coefficients and optional domain.
*/
- static GrFragmentProcessor* Create(GrProcessorDataManager* procDataManager, GrTexture* tex,
- const SkScalar coefficients[16],
+ static GrFragmentProcessor* Create(GrTexture* tex, const SkScalar coefficients[16],
const SkRect* domain = nullptr) {
if (nullptr == domain) {
static const SkShader::TileMode kTileModes[] = { SkShader::kClamp_TileMode,
SkShader::kClamp_TileMode };
- return Create(procDataManager, tex, coefficients,
- GrCoordTransform::MakeDivByTextureWHMatrix(tex), kTileModes);
+ return Create(tex, coefficients, GrCoordTransform::MakeDivByTextureWHMatrix(tex),
+ kTileModes);
} else {
- return new GrBicubicEffect(procDataManager, tex, coefficients,
+ return new GrBicubicEffect(tex, coefficients,
GrCoordTransform::MakeDivByTextureWHMatrix(tex), *domain);
}
}
@@ -49,28 +48,27 @@
/**
* Create a Mitchell filter effect with specified texture matrix and x/y tile modes.
*/
- static GrFragmentProcessor* Create(GrProcessorDataManager* procDataManager, GrTexture* tex,
- const SkMatrix& matrix,
+ static GrFragmentProcessor* Create(GrTexture* tex, const SkMatrix& matrix,
SkShader::TileMode tileModes[2]) {
- return Create(procDataManager, tex, gMitchellCoefficients, matrix, tileModes);
+ return Create(tex, gMitchellCoefficients, matrix, tileModes);
}
/**
* Create a filter effect with custom bicubic coefficients, the texture matrix, and the x/y
* tilemodes.
*/
- static GrFragmentProcessor* Create(GrProcessorDataManager* procDataManager, GrTexture* tex,
- const SkScalar coefficients[16], const SkMatrix& matrix,
+ static GrFragmentProcessor* Create(GrTexture* tex, const SkScalar coefficients[16],
+ const SkMatrix& matrix,
const SkShader::TileMode tileModes[2]) {
- return new GrBicubicEffect(procDataManager, tex, coefficients, matrix, tileModes);
+ return new GrBicubicEffect(tex, coefficients, matrix, tileModes);
}
/**
* Create a Mitchell filter effect with a texture matrix and a domain.
*/
- static GrFragmentProcessor* Create(GrProcessorDataManager* procDataManager, GrTexture* tex,
- const SkMatrix& matrix, const SkRect& domain) {
- return new GrBicubicEffect(procDataManager, tex, gMitchellCoefficients, matrix, domain);
+ static GrFragmentProcessor* Create(GrTexture* tex, const SkMatrix& matrix,
+ const SkRect& domain) {
+ return new GrBicubicEffect(tex, gMitchellCoefficients, matrix, domain);
}
/**
@@ -84,10 +82,10 @@
GrTextureParams::FilterMode* filterMode);
private:
- GrBicubicEffect(GrProcessorDataManager*, GrTexture*, const SkScalar coefficients[16],
- const SkMatrix &matrix, const SkShader::TileMode tileModes[2]);
- GrBicubicEffect(GrProcessorDataManager*, GrTexture*, const SkScalar coefficients[16],
- const SkMatrix &matrix, const SkRect& domain);
+ GrBicubicEffect(GrTexture*, const SkScalar coefficients[16], const SkMatrix &matrix,
+ const SkShader::TileMode tileModes[2]);
+ GrBicubicEffect(GrTexture*, const SkScalar coefficients[16], const SkMatrix &matrix,
+ const SkRect& domain);
GrGLFragmentProcessor* onCreateGLInstance() const override;
diff --git a/src/gpu/effects/GrConfigConversionEffect.cpp b/src/gpu/effects/GrConfigConversionEffect.cpp
index 042e5f8..909e461 100644
--- a/src/gpu/effects/GrConfigConversionEffect.cpp
+++ b/src/gpu/effects/GrConfigConversionEffect.cpp
@@ -96,12 +96,11 @@
///////////////////////////////////////////////////////////////////////////////
-GrConfigConversionEffect::GrConfigConversionEffect(GrProcessorDataManager* procDataManager,
- GrTexture* texture,
+GrConfigConversionEffect::GrConfigConversionEffect(GrTexture* texture,
bool swapRedAndBlue,
PMConversion pmConversion,
const SkMatrix& matrix)
- : INHERITED(procDataManager, texture, matrix)
+ : INHERITED(texture, matrix)
, fSwapRedAndBlue(swapRedAndBlue)
, fPMConversion(pmConversion) {
this->initClassID<GrConfigConversionEffect>();
@@ -136,8 +135,7 @@
} else {
swapRB = d->fRandom->nextBool();
}
- return new GrConfigConversionEffect(d->fProcDataManager,
- d->fTextures[GrProcessorUnitTest::kSkiaPMTextureIdx],
+ return new GrConfigConversionEffect(d->fTextures[GrProcessorUnitTest::kSkiaPMTextureIdx],
swapRB, pmConv, GrTest::TestMatrix(d->fRandom));
}
@@ -217,11 +215,11 @@
GrPaint paint2;
GrPaint paint3;
SkAutoTUnref<GrFragmentProcessor> pmToUPM1(new GrConfigConversionEffect(
- paint1.getProcessorDataManager(), dataTex, false, *pmToUPMRule, SkMatrix::I()));
+ dataTex, false, *pmToUPMRule, SkMatrix::I()));
SkAutoTUnref<GrFragmentProcessor> upmToPM(new GrConfigConversionEffect(
- paint2.getProcessorDataManager(), readTex, false, *upmToPMRule, SkMatrix::I()));
+ readTex, false, *upmToPMRule, SkMatrix::I()));
SkAutoTUnref<GrFragmentProcessor> pmToUPM2(new GrConfigConversionEffect(
- paint3.getProcessorDataManager(), tempTex, false, *pmToUPMRule, SkMatrix::I()));
+ tempTex, false, *pmToUPMRule, SkMatrix::I()));
paint1.addColorFragmentProcessor(pmToUPM1);
@@ -288,8 +286,7 @@
}
}
-const GrFragmentProcessor* GrConfigConversionEffect::Create(GrProcessorDataManager* procDataManager,
- GrTexture* texture,
+const GrFragmentProcessor* GrConfigConversionEffect::Create(GrTexture* texture,
bool swapRedAndBlue,
PMConversion pmConversion,
const SkMatrix& matrix) {
@@ -297,7 +294,7 @@
// If we returned a GrConfigConversionEffect that was equivalent to a GrSimpleTextureEffect
// then we may pollute our texture cache with redundant shaders. So in the case that no
// conversions were requested we instead return a GrSimpleTextureEffect.
- return GrSimpleTextureEffect::Create(procDataManager, texture, matrix);
+ return GrSimpleTextureEffect::Create(texture, matrix);
} else {
if (kRGBA_8888_GrPixelConfig != texture->config() &&
kBGRA_8888_GrPixelConfig != texture->config() &&
@@ -305,7 +302,6 @@
// The PM conversions assume colors are 0..255
return nullptr;
}
- return new GrConfigConversionEffect(procDataManager, texture, swapRedAndBlue, pmConversion,
- matrix);
+ return new GrConfigConversionEffect(texture, swapRedAndBlue, pmConversion, matrix);
}
}
diff --git a/src/gpu/effects/GrConfigConversionEffect.h b/src/gpu/effects/GrConfigConversionEffect.h
index fc92a04..cf2fea3 100644
--- a/src/gpu/effects/GrConfigConversionEffect.h
+++ b/src/gpu/effects/GrConfigConversionEffect.h
@@ -33,8 +33,8 @@
kPMConversionCnt
};
- static const GrFragmentProcessor* Create(GrProcessorDataManager*, GrTexture*,
- bool swapRedAndBlue, PMConversion, const SkMatrix&);
+ static const GrFragmentProcessor* Create(GrTexture*, bool swapRedAndBlue, PMConversion,
+ const SkMatrix&);
const char* name() const override { return "Config Conversion"; }
@@ -51,8 +51,7 @@
PMConversion* UPMToPMRule);
private:
- GrConfigConversionEffect(GrProcessorDataManager*,
- GrTexture*,
+ GrConfigConversionEffect(GrTexture*,
bool swapRedAndBlue,
PMConversion pmConversion,
const SkMatrix& matrix);
diff --git a/src/gpu/effects/GrConvolutionEffect.cpp b/src/gpu/effects/GrConvolutionEffect.cpp
index 5fd62b8..071106e 100644
--- a/src/gpu/effects/GrConvolutionEffect.cpp
+++ b/src/gpu/effects/GrConvolutionEffect.cpp
@@ -145,14 +145,13 @@
///////////////////////////////////////////////////////////////////////////////
-GrConvolutionEffect::GrConvolutionEffect(GrProcessorDataManager* procDataManager,
- GrTexture* texture,
+GrConvolutionEffect::GrConvolutionEffect(GrTexture* texture,
Direction direction,
int radius,
const float* kernel,
bool useBounds,
float bounds[2])
- : INHERITED(procDataManager, texture, direction, radius), fUseBounds(useBounds) {
+ : INHERITED(texture, direction, radius), fUseBounds(useBounds) {
this->initClassID<GrConvolutionEffect>();
SkASSERT(radius <= kMaxKernelRadius);
SkASSERT(kernel);
@@ -163,14 +162,13 @@
memcpy(fBounds, bounds, sizeof(fBounds));
}
-GrConvolutionEffect::GrConvolutionEffect(GrProcessorDataManager* procDataManager,
- GrTexture* texture,
+GrConvolutionEffect::GrConvolutionEffect(GrTexture* texture,
Direction direction,
int radius,
float gaussianSigma,
bool useBounds,
float bounds[2])
- : INHERITED(procDataManager, texture, direction, radius), fUseBounds(useBounds) {
+ : INHERITED(texture, direction, radius), fUseBounds(useBounds) {
this->initClassID<GrConvolutionEffect>();
SkASSERT(radius <= kMaxKernelRadius);
int width = this->width();
@@ -232,8 +230,7 @@
}
bool useBounds = d->fRandom->nextBool();
- return GrConvolutionEffect::Create(d->fProcDataManager,
- d->fTextures[texIdx],
+ return GrConvolutionEffect::Create(d->fTextures[texIdx],
dir,
radius,
kernel,
diff --git a/src/gpu/effects/GrConvolutionEffect.h b/src/gpu/effects/GrConvolutionEffect.h
index 2cf36af..9db173a 100644
--- a/src/gpu/effects/GrConvolutionEffect.h
+++ b/src/gpu/effects/GrConvolutionEffect.h
@@ -21,27 +21,23 @@
public:
/// Convolve with an arbitrary user-specified kernel
- static GrFragmentProcessor* Create(GrProcessorDataManager* procDataManager,
- GrTexture* tex,
+ static GrFragmentProcessor* Create(GrTexture* tex,
Direction dir,
int halfWidth,
const float* kernel,
bool useBounds,
float bounds[2]) {
- return new GrConvolutionEffect(procDataManager, tex, dir, halfWidth, kernel, useBounds,
- bounds);
+ return new GrConvolutionEffect(tex, dir, halfWidth, kernel, useBounds, bounds);
}
/// Convolve with a Gaussian kernel
- static GrFragmentProcessor* CreateGaussian(GrProcessorDataManager* procDataManager,
- GrTexture* tex,
+ static GrFragmentProcessor* CreateGaussian(GrTexture* tex,
Direction dir,
int halfWidth,
float gaussianSigma,
bool useBounds,
float bounds[2]) {
- return new GrConvolutionEffect(procDataManager, tex, dir, halfWidth, gaussianSigma,
- useBounds, bounds);
+ return new GrConvolutionEffect(tex, dir, halfWidth, gaussianSigma, useBounds, bounds);
}
virtual ~GrConvolutionEffect();
@@ -71,16 +67,14 @@
float fBounds[2];
private:
- GrConvolutionEffect(GrProcessorDataManager*,
- GrTexture*, Direction,
+ GrConvolutionEffect(GrTexture*, Direction,
int halfWidth,
const float* kernel,
bool useBounds,
float bounds[2]);
/// Convolve with a Gaussian kernel
- GrConvolutionEffect(GrProcessorDataManager*,
- GrTexture*, Direction,
+ GrConvolutionEffect(GrTexture*, Direction,
int halfWidth,
float gaussianSigma,
bool useBounds,
diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.cpp b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
index 76fa642..8de8580 100644
--- a/src/gpu/effects/GrMatrixConvolutionEffect.cpp
+++ b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
@@ -129,8 +129,7 @@
fDomain.setData(pdman, conv.domain(), texture.origin());
}
-GrMatrixConvolutionEffect::GrMatrixConvolutionEffect(GrProcessorDataManager* procDataManager,
- GrTexture* texture,
+GrMatrixConvolutionEffect::GrMatrixConvolutionEffect(GrTexture* texture,
const SkIRect& bounds,
const SkISize& kernelSize,
const SkScalar* kernel,
@@ -139,7 +138,7 @@
const SkIPoint& kernelOffset,
GrTextureDomain::Mode tileMode,
bool convolveAlpha)
- : INHERITED(procDataManager, texture, GrCoordTransform::MakeDivByTextureWHMatrix(texture)),
+ : INHERITED(texture, GrCoordTransform::MakeDivByTextureWHMatrix(texture)),
fKernelSize(kernelSize),
fGain(SkScalarToFloat(gain)),
fBias(SkScalarToFloat(bias) / 255.0f),
@@ -179,8 +178,7 @@
// Static function to create a 2D convolution
GrFragmentProcessor*
-GrMatrixConvolutionEffect::CreateGaussian(GrProcessorDataManager* procDataManager,
- GrTexture* texture,
+GrMatrixConvolutionEffect::CreateGaussian(GrTexture* texture,
const SkIRect& bounds,
const SkISize& kernelSize,
SkScalar gain,
@@ -216,8 +214,8 @@
for (int i = 0; i < width * height; ++i) {
kernel[i] *= scale;
}
- return new GrMatrixConvolutionEffect(procDataManager, texture, bounds, kernelSize, kernel, gain,
- bias, kernelOffset, tileMode, convolveAlpha);
+ return new GrMatrixConvolutionEffect(texture, bounds, kernelSize, kernel, gain, bias,
+ kernelOffset, tileMode, convolveAlpha);
}
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrMatrixConvolutionEffect);
@@ -243,8 +241,7 @@
GrTextureDomain::Mode tileMode =
static_cast<GrTextureDomain::Mode>(d->fRandom->nextRangeU(0, 2));
bool convolveAlpha = d->fRandom->nextBool();
- return GrMatrixConvolutionEffect::Create(d->fProcDataManager,
- d->fTextures[texIdx],
+ return GrMatrixConvolutionEffect::Create(d->fTextures[texIdx],
bounds,
kernelSize,
kernel.get(),
diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.h b/src/gpu/effects/GrMatrixConvolutionEffect.h
index 0d6192d..3f16edb 100644
--- a/src/gpu/effects/GrMatrixConvolutionEffect.h
+++ b/src/gpu/effects/GrMatrixConvolutionEffect.h
@@ -18,8 +18,7 @@
class GrMatrixConvolutionEffect : public GrSingleTextureEffect {
public:
- static GrFragmentProcessor* Create(GrProcessorDataManager* procDataManager,
- GrTexture* texture,
+ static GrFragmentProcessor* Create(GrTexture* texture,
const SkIRect& bounds,
const SkISize& kernelSize,
const SkScalar* kernel,
@@ -28,12 +27,11 @@
const SkIPoint& kernelOffset,
GrTextureDomain::Mode tileMode,
bool convolveAlpha) {
- return new GrMatrixConvolutionEffect(procDataManager, texture, bounds, kernelSize, kernel,
- gain, bias, kernelOffset, tileMode, convolveAlpha);
+ return new GrMatrixConvolutionEffect(texture, bounds, kernelSize, kernel, gain, bias,
+ kernelOffset, tileMode, convolveAlpha);
}
- static GrFragmentProcessor* CreateGaussian(GrProcessorDataManager*,
- GrTexture* texture,
+ static GrFragmentProcessor* CreateGaussian(GrTexture* texture,
const SkIRect& bounds,
const SkISize& kernelSize,
SkScalar gain,
@@ -58,8 +56,7 @@
const char* name() const override { return "MatrixConvolution"; }
private:
- GrMatrixConvolutionEffect(GrProcessorDataManager*,
- GrTexture*,
+ GrMatrixConvolutionEffect(GrTexture*,
const SkIRect& bounds,
const SkISize& kernelSize,
const SkScalar* kernel,
diff --git a/src/gpu/effects/GrSimpleTextureEffect.cpp b/src/gpu/effects/GrSimpleTextureEffect.cpp
index 68e501c..89b3546 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.cpp
+++ b/src/gpu/effects/GrSimpleTextureEffect.cpp
@@ -72,6 +72,5 @@
GrCoordSet coordSet = kCoordSets[d->fRandom->nextULessThan(SK_ARRAY_COUNT(kCoordSets))];
const SkMatrix& matrix = GrTest::TestMatrix(d->fRandom);
- return GrSimpleTextureEffect::Create(d->fProcDataManager, d->fTextures[texIdx], matrix,
- coordSet);
+ return GrSimpleTextureEffect::Create(d->fTextures[texIdx], matrix, coordSet);
}
diff --git a/src/gpu/effects/GrSimpleTextureEffect.h b/src/gpu/effects/GrSimpleTextureEffect.h
index d99c30e..4e5b421 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.h
+++ b/src/gpu/effects/GrSimpleTextureEffect.h
@@ -21,29 +21,25 @@
class GrSimpleTextureEffect : public GrSingleTextureEffect {
public:
/* unfiltered, clamp mode */
- static const GrFragmentProcessor* Create(GrProcessorDataManager* procDataManager,
- GrTexture* tex,
+ static const GrFragmentProcessor* Create(GrTexture* tex,
const SkMatrix& matrix,
GrCoordSet coordSet = kLocal_GrCoordSet) {
- return new GrSimpleTextureEffect(procDataManager, tex, matrix,
- GrTextureParams::kNone_FilterMode, coordSet);
+ return new GrSimpleTextureEffect(tex, matrix, GrTextureParams::kNone_FilterMode, coordSet);
}
/* clamp mode */
- static GrFragmentProcessor* Create(GrProcessorDataManager* procDataManager,
- GrTexture* tex,
+ static GrFragmentProcessor* Create(GrTexture* tex,
const SkMatrix& matrix,
GrTextureParams::FilterMode filterMode,
GrCoordSet coordSet = kLocal_GrCoordSet) {
- return new GrSimpleTextureEffect(procDataManager, tex, matrix, filterMode, coordSet);
+ return new GrSimpleTextureEffect(tex, matrix, filterMode, coordSet);
}
- static GrFragmentProcessor* Create(GrProcessorDataManager* procDataManager,
- GrTexture* tex,
+ static GrFragmentProcessor* Create(GrTexture* tex,
const SkMatrix& matrix,
const GrTextureParams& p,
GrCoordSet coordSet = kLocal_GrCoordSet) {
- return new GrSimpleTextureEffect(procDataManager, tex, matrix, p, coordSet);
+ return new GrSimpleTextureEffect(tex, matrix, p, coordSet);
}
virtual ~GrSimpleTextureEffect() {}
@@ -51,21 +47,19 @@
const char* name() const override { return "SimpleTexture"; }
private:
- GrSimpleTextureEffect(GrProcessorDataManager* procDataManager,
- GrTexture* texture,
+ GrSimpleTextureEffect(GrTexture* texture,
const SkMatrix& matrix,
GrTextureParams::FilterMode filterMode,
GrCoordSet coordSet)
- : GrSingleTextureEffect(procDataManager, texture, matrix, filterMode, coordSet) {
+ : GrSingleTextureEffect(texture, matrix, filterMode, coordSet) {
this->initClassID<GrSimpleTextureEffect>();
}
- GrSimpleTextureEffect(GrProcessorDataManager* procDataManager,
- GrTexture* texture,
+ GrSimpleTextureEffect(GrTexture* texture,
const SkMatrix& matrix,
const GrTextureParams& params,
GrCoordSet coordSet)
- : GrSingleTextureEffect(procDataManager, texture, matrix, params, coordSet) {
+ : GrSingleTextureEffect(texture, matrix, params, coordSet) {
this->initClassID<GrSimpleTextureEffect>();
}
diff --git a/src/gpu/effects/GrSingleTextureEffect.cpp b/src/gpu/effects/GrSingleTextureEffect.cpp
index e4e20a9..c291735 100644
--- a/src/gpu/effects/GrSingleTextureEffect.cpp
+++ b/src/gpu/effects/GrSingleTextureEffect.cpp
@@ -7,8 +7,7 @@
#include "effects/GrSingleTextureEffect.h"
-GrSingleTextureEffect::GrSingleTextureEffect(GrProcessorDataManager* procDataManager,
- GrTexture* texture,
+GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture,
const SkMatrix& m,
GrCoordSet coordSet)
: fCoordTransform(coordSet, m, texture, GrTextureParams::kNone_FilterMode)
@@ -17,8 +16,7 @@
this->addTextureAccess(&fTextureAccess);
}
-GrSingleTextureEffect::GrSingleTextureEffect(GrProcessorDataManager* procDataManager,
- GrTexture* texture,
+GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture,
const SkMatrix& m,
GrTextureParams::FilterMode filterMode,
GrCoordSet coordSet)
@@ -28,8 +26,7 @@
this->addTextureAccess(&fTextureAccess);
}
-GrSingleTextureEffect::GrSingleTextureEffect(GrProcessorDataManager* procDataManager,
- GrTexture* texture,
+GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture,
const SkMatrix& m,
const GrTextureParams& params,
GrCoordSet coordSet)
diff --git a/src/gpu/effects/GrSingleTextureEffect.h b/src/gpu/effects/GrSingleTextureEffect.h
index cd952c4..9df0cff 100644
--- a/src/gpu/effects/GrSingleTextureEffect.h
+++ b/src/gpu/effects/GrSingleTextureEffect.h
@@ -25,14 +25,11 @@
protected:
/** unfiltered, clamp mode */
- GrSingleTextureEffect(GrProcessorDataManager*, GrTexture*, const SkMatrix&,
- GrCoordSet = kLocal_GrCoordSet);
+ GrSingleTextureEffect(GrTexture*, const SkMatrix&, GrCoordSet = kLocal_GrCoordSet);
/** clamp mode */
- GrSingleTextureEffect(GrProcessorDataManager*, GrTexture*, const SkMatrix&,
- GrTextureParams::FilterMode filterMode,
+ GrSingleTextureEffect(GrTexture*, const SkMatrix&, GrTextureParams::FilterMode filterMode,
GrCoordSet = kLocal_GrCoordSet);
- GrSingleTextureEffect(GrProcessorDataManager*,
- GrTexture*,
+ GrSingleTextureEffect(GrTexture*,
const SkMatrix&,
const GrTextureParams&,
GrCoordSet = kLocal_GrCoordSet);
diff --git a/src/gpu/effects/GrTextureDomain.cpp b/src/gpu/effects/GrTextureDomain.cpp
index 93a548a..bf8bb59 100644
--- a/src/gpu/effects/GrTextureDomain.cpp
+++ b/src/gpu/effects/GrTextureDomain.cpp
@@ -215,8 +215,7 @@
///////////////////////////////////////////////////////////////////////////////
-GrFragmentProcessor* GrTextureDomainEffect::Create(GrProcessorDataManager* procDataManager,
- GrTexture* texture,
+GrFragmentProcessor* GrTextureDomainEffect::Create(GrTexture* texture,
const SkMatrix& matrix,
const SkRect& domain,
GrTextureDomain::Mode mode,
@@ -225,21 +224,19 @@
static const SkRect kFullRect = {0, 0, SK_Scalar1, SK_Scalar1};
if (GrTextureDomain::kIgnore_Mode == mode ||
(GrTextureDomain::kClamp_Mode == mode && domain.contains(kFullRect))) {
- return GrSimpleTextureEffect::Create(procDataManager, texture, matrix, filterMode);
+ return GrSimpleTextureEffect::Create(texture, matrix, filterMode);
} else {
- return new GrTextureDomainEffect(procDataManager, texture, matrix, domain, mode, filterMode,
- coordSet);
+ return new GrTextureDomainEffect(texture, matrix, domain, mode, filterMode, coordSet);
}
}
-GrTextureDomainEffect::GrTextureDomainEffect(GrProcessorDataManager* procDataManager,
- GrTexture* texture,
+GrTextureDomainEffect::GrTextureDomainEffect(GrTexture* texture,
const SkMatrix& matrix,
const SkRect& domain,
GrTextureDomain::Mode mode,
GrTextureParams::FilterMode filterMode,
GrCoordSet coordSet)
- : GrSingleTextureEffect(procDataManager, texture, matrix, filterMode, coordSet)
+ : GrSingleTextureEffect(texture, matrix, filterMode, coordSet)
, fTextureDomain(domain, mode) {
SkASSERT(mode != GrTextureDomain::kRepeat_Mode ||
filterMode == GrTextureParams::kNone_FilterMode);
@@ -293,8 +290,7 @@
const SkMatrix& matrix = GrTest::TestMatrix(d->fRandom);
bool bilerp = mode != GrTextureDomain::kRepeat_Mode ? d->fRandom->nextBool() : false;
GrCoordSet coords = d->fRandom->nextBool() ? kLocal_GrCoordSet : kDevice_GrCoordSet;
- return GrTextureDomainEffect::Create(d->fProcDataManager,
- d->fTextures[texIdx],
+ return GrTextureDomainEffect::Create(d->fTextures[texIdx],
matrix,
domain,
mode,
diff --git a/src/gpu/effects/GrTextureDomain.h b/src/gpu/effects/GrTextureDomain.h
index f4c5e9c..f0d180d 100644
--- a/src/gpu/effects/GrTextureDomain.h
+++ b/src/gpu/effects/GrTextureDomain.h
@@ -160,8 +160,7 @@
class GrTextureDomainEffect : public GrSingleTextureEffect {
public:
- static GrFragmentProcessor* Create(GrProcessorDataManager*,
- GrTexture*,
+ static GrFragmentProcessor* Create(GrTexture*,
const SkMatrix&,
const SkRect& domain,
GrTextureDomain::Mode,
@@ -178,8 +177,7 @@
GrTextureDomain fTextureDomain;
private:
- GrTextureDomainEffect(GrProcessorDataManager*,
- GrTexture*,
+ GrTextureDomainEffect(GrTexture*,
const SkMatrix&,
const SkRect& domain,
GrTextureDomain::Mode,
diff --git a/src/gpu/effects/GrYUVtoRGBEffect.cpp b/src/gpu/effects/GrYUVtoRGBEffect.cpp
index ba975f7..a0ee114 100644
--- a/src/gpu/effects/GrYUVtoRGBEffect.cpp
+++ b/src/gpu/effects/GrYUVtoRGBEffect.cpp
@@ -17,9 +17,9 @@
class YUVtoRGBEffect : public GrFragmentProcessor {
public:
- static GrFragmentProcessor* Create(GrProcessorDataManager* procDataManager, GrTexture* yTexture,
- GrTexture* uTexture, GrTexture* vTexture,
- const SkISize sizes[3], SkYUVColorSpace colorSpace) {
+ static GrFragmentProcessor* Create(GrTexture* yTexture, GrTexture* uTexture,
+ GrTexture* vTexture, const SkISize sizes[3],
+ SkYUVColorSpace colorSpace) {
SkScalar w[3], h[3];
w[0] = SkIntToScalar(sizes[0].fWidth) / SkIntToScalar(yTexture->width());
h[0] = SkIntToScalar(sizes[0].fHeight) / SkIntToScalar(yTexture->height());
@@ -40,8 +40,8 @@
(sizes[2].fHeight != sizes[0].fHeight)) ?
GrTextureParams::kBilerp_FilterMode :
GrTextureParams::kNone_FilterMode;
- return new YUVtoRGBEffect(procDataManager, yTexture, uTexture, vTexture, yuvMatrix,
- uvFilterMode, colorSpace);
+ return new YUVtoRGBEffect(yTexture, uTexture, vTexture, yuvMatrix, uvFilterMode,
+ colorSpace);
}
const char* name() const override { return "YUV to RGB"; }
@@ -104,9 +104,9 @@
};
private:
- YUVtoRGBEffect(GrProcessorDataManager*, GrTexture* yTexture, GrTexture* uTexture,
- GrTexture* vTexture, const SkMatrix yuvMatrix[3],
- GrTextureParams::FilterMode uvFilterMode, SkYUVColorSpace colorSpace)
+ YUVtoRGBEffect(GrTexture* yTexture, GrTexture* uTexture, GrTexture* vTexture,
+ const SkMatrix yuvMatrix[3], GrTextureParams::FilterMode uvFilterMode,
+ SkYUVColorSpace colorSpace)
: fYTransform(kLocal_GrCoordSet, yuvMatrix[0], yTexture, GrTextureParams::kNone_FilterMode)
, fYAccess(yTexture)
, fUTransform(kLocal_GrCoordSet, yuvMatrix[1], uTexture, uvFilterMode)
@@ -172,9 +172,8 @@
//////////////////////////////////////////////////////////////////////////////
GrFragmentProcessor*
-GrYUVtoRGBEffect::Create(GrProcessorDataManager* procDataManager, GrTexture* yTexture,
- GrTexture* uTexture, GrTexture* vTexture, const SkISize sizes[3],
- SkYUVColorSpace colorSpace) {
- SkASSERT(procDataManager && yTexture && uTexture && vTexture && sizes);
- return YUVtoRGBEffect::Create(procDataManager, yTexture, uTexture, vTexture, sizes, colorSpace);
+GrYUVtoRGBEffect::Create(GrTexture* yTexture, GrTexture* uTexture, GrTexture* vTexture,
+ const SkISize sizes[3], SkYUVColorSpace colorSpace) {
+ SkASSERT(yTexture && uTexture && vTexture && sizes);
+ return YUVtoRGBEffect::Create(yTexture, uTexture, vTexture, sizes, colorSpace);
}
diff --git a/src/gpu/effects/GrYUVtoRGBEffect.h b/src/gpu/effects/GrYUVtoRGBEffect.h
index a7379a4..0367978 100644
--- a/src/gpu/effects/GrYUVtoRGBEffect.h
+++ b/src/gpu/effects/GrYUVtoRGBEffect.h
@@ -11,16 +11,14 @@
#include "SkImageInfo.h"
class GrFragmentProcessor;
-class GrProcessorDataManager;
class GrTexture;
namespace GrYUVtoRGBEffect {
/**
* Creates an effect that performs color conversion from YUV to RGB
*/
- GrFragmentProcessor* Create(GrProcessorDataManager*, GrTexture* yTexture, GrTexture* uTexture,
- GrTexture* vTexture, const SkISize sizes[3],
- SkYUVColorSpace colorSpace);
+ GrFragmentProcessor* Create(GrTexture* yTexture, GrTexture* uTexture, GrTexture* vTexture,
+ const SkISize sizes[3], SkYUVColorSpace colorSpace);
};
#endif