Bye bye processor data manager.
Review URL: https://codereview.chromium.org/1388113002
diff --git a/src/core/SkBitmapProcShader.cpp b/src/core/SkBitmapProcShader.cpp
index 602e4e3..b3bbb72 100644
--- a/src/core/SkBitmapProcShader.cpp
+++ b/src/core/SkBitmapProcShader.cpp
@@ -360,8 +360,7 @@
const GrFragmentProcessor* SkBitmapProcShader::asFragmentProcessor(GrContext* context,
const SkMatrix& viewM, const SkMatrix* localMatrix,
- SkFilterQuality filterQuality,
- GrProcessorDataManager* procDataManager) const {
+ SkFilterQuality filterQuality) const {
SkMatrix matrix;
matrix.setIDiv(fRawBitmap.width(), fRawBitmap.height());
@@ -402,9 +401,9 @@
SkAutoTUnref<GrFragmentProcessor> inner;
if (doBicubic) {
- inner.reset(GrBicubicEffect::Create(procDataManager, texture, matrix, tm));
+ inner.reset(GrBicubicEffect::Create(texture, matrix, tm));
} else {
- inner.reset(GrSimpleTextureEffect::Create(procDataManager, texture, matrix, params));
+ inner.reset(GrSimpleTextureEffect::Create(texture, matrix, params));
}
if (kAlpha_8_SkColorType == fRawBitmap.colorType()) {
diff --git a/src/core/SkBitmapProcShader.h b/src/core/SkBitmapProcShader.h
index 85e1fd0..b69b028 100644
--- a/src/core/SkBitmapProcShader.h
+++ b/src/core/SkBitmapProcShader.h
@@ -30,8 +30,7 @@
#if SK_SUPPORT_GPU
const GrFragmentProcessor* asFragmentProcessor(GrContext*, const SkMatrix& viewM,
- const SkMatrix*, SkFilterQuality,
- GrProcessorDataManager*) const override;
+ const SkMatrix*, SkFilterQuality) const override;
#endif
protected:
diff --git a/src/core/SkColorFilter.cpp b/src/core/SkColorFilter.cpp
index 25e6b2e..031f376 100644
--- a/src/core/SkColorFilter.cpp
+++ b/src/core/SkColorFilter.cpp
@@ -69,10 +69,9 @@
#endif
#if SK_SUPPORT_GPU
- const GrFragmentProcessor* asFragmentProcessor(GrContext* context,
- GrProcessorDataManager* pdm) const override {
- SkAutoTUnref<const GrFragmentProcessor> innerFP(fInner->asFragmentProcessor(context, pdm));
- SkAutoTUnref<const GrFragmentProcessor> outerFP(fOuter->asFragmentProcessor(context, pdm));
+ const GrFragmentProcessor* asFragmentProcessor(GrContext* context) const override {
+ SkAutoTUnref<const GrFragmentProcessor> innerFP(fInner->asFragmentProcessor(context));
+ SkAutoTUnref<const GrFragmentProcessor> outerFP(fOuter->asFragmentProcessor(context));
if (!innerFP || !outerFP) {
return nullptr;
}
diff --git a/src/core/SkColorShader.h b/src/core/SkColorShader.h
index b5902b4..e3fddb2 100644
--- a/src/core/SkColorShader.h
+++ b/src/core/SkColorShader.h
@@ -51,8 +51,7 @@
#if SK_SUPPORT_GPU
const GrFragmentProcessor* asFragmentProcessor(GrContext*, const SkMatrix& viewM,
- const SkMatrix*, SkFilterQuality,
- GrProcessorDataManager*) const override;
+ const SkMatrix*, SkFilterQuality) const override;
#endif
SK_TO_STRING_OVERRIDE()
diff --git a/src/core/SkComposeShader.cpp b/src/core/SkComposeShader.cpp
index 024064b..0dc0da6 100644
--- a/src/core/SkComposeShader.cpp
+++ b/src/core/SkComposeShader.cpp
@@ -204,9 +204,7 @@
const GrFragmentProcessor* SkComposeShader::asFragmentProcessor(GrContext* context,
const SkMatrix& viewM,
const SkMatrix* localMatrix,
- SkFilterQuality fq,
- GrProcessorDataManager* procDataManager
- ) const {
+ SkFilterQuality fq) const {
// Fragment processor will only support SkXfermode::Mode modes currently.
SkXfermode::Mode mode;
if (!(SkXfermode::AsMode(fMode, &mode))) {
@@ -219,19 +217,19 @@
GrConstColorProcessor::kIgnore_InputMode);
break;
case SkXfermode::kSrc_Mode:
- return fShaderB->asFragmentProcessor(context, viewM, localMatrix, fq, procDataManager);
+ return fShaderB->asFragmentProcessor(context, viewM, localMatrix, fq);
break;
case SkXfermode::kDst_Mode:
- return fShaderA->asFragmentProcessor(context, viewM, localMatrix, fq, procDataManager);
+ return fShaderA->asFragmentProcessor(context, viewM, localMatrix, fq);
break;
default:
SkAutoTUnref<const GrFragmentProcessor> fpA(fShaderA->asFragmentProcessor(context,
- viewM, localMatrix, fq, procDataManager));
+ viewM, localMatrix, fq));
if (!fpA.get()) {
return nullptr;
}
SkAutoTUnref<const GrFragmentProcessor> fpB(fShaderB->asFragmentProcessor(context,
- viewM, localMatrix, fq, procDataManager));
+ viewM, localMatrix, fq));
if (!fpB.get()) {
return nullptr;
}
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp
index ffb1f83..2920714 100644
--- a/src/core/SkImageFilter.cpp
+++ b/src/core/SkImageFilter.cpp
@@ -307,7 +307,7 @@
}
bool SkImageFilter::canFilterImageGPU() const {
- return this->asFragmentProcessor(nullptr, nullptr, nullptr, SkMatrix::I(), SkIRect());
+ return this->asFragmentProcessor(nullptr, nullptr, SkMatrix::I(), SkIRect());
}
bool SkImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context& ctx,
@@ -350,7 +350,7 @@
SkMatrix matrix(ctx.ctm());
matrix.postTranslate(SkIntToScalar(-bounds.left()), SkIntToScalar(-bounds.top()));
GrPaint paint;
- if (this->asFragmentProcessor(&fp, paint.getProcessorDataManager(), srcTexture, matrix, bounds)) {
+ if (this->asFragmentProcessor(&fp, srcTexture, matrix, bounds)) {
SkASSERT(fp);
paint.addColorFragmentProcessor(fp)->unref();
@@ -428,7 +428,7 @@
return true;
}
-bool SkImageFilter::asFragmentProcessor(GrFragmentProcessor**, GrProcessorDataManager*, GrTexture*,
+bool SkImageFilter::asFragmentProcessor(GrFragmentProcessor**, GrTexture*,
const SkMatrix&, const SkIRect&) const {
return false;
}
diff --git a/src/core/SkLightingShader.cpp b/src/core/SkLightingShader.cpp
index 15b4614..3a1ea87 100644
--- a/src/core/SkLightingShader.cpp
+++ b/src/core/SkLightingShader.cpp
@@ -76,8 +76,7 @@
const GrFragmentProcessor* asFragmentProcessor(GrContext*,
const SkMatrix& viewM,
const SkMatrix* localMatrix,
- SkFilterQuality,
- GrProcessorDataManager*) const override;
+ SkFilterQuality) const override;
#endif
size_t contextSize() const override;
@@ -137,10 +136,10 @@
class LightingFP : public GrFragmentProcessor {
public:
- LightingFP(GrProcessorDataManager* pdm, GrTexture* diffuse, GrTexture* normal,
- const SkMatrix& diffMatrix, const SkMatrix& normMatrix,
- const GrTextureParams& diffParams, const GrTextureParams& normParams,
- const SkLightingShader::Lights* lights, const SkVector& invNormRotation)
+ LightingFP(GrTexture* diffuse, GrTexture* normal, const SkMatrix& diffMatrix,
+ const SkMatrix& normMatrix, const GrTextureParams& diffParams,
+ const GrTextureParams& normParams, const SkLightingShader::Lights* lights,
+ const SkVector& invNormRotation)
: fDiffDeviceTransform(kLocal_GrCoordSet, diffMatrix, diffuse, diffParams.filterMode())
, fNormDeviceTransform(kLocal_GrCoordSet, normMatrix, normal, normParams.filterMode())
, fDiffuseTextureAccess(diffuse, diffParams)
@@ -349,8 +348,7 @@
GrContext* context,
const SkMatrix& viewM,
const SkMatrix* localMatrix,
- SkFilterQuality filterQuality,
- GrProcessorDataManager* pdm) const {
+ SkFilterQuality filterQuality) const {
// we assume diffuse and normal maps have same width and height
// TODO: support different sizes
SkASSERT(fDiffuseMap.width() == fNormalMap.width() &&
@@ -398,8 +396,8 @@
}
SkAutoTUnref<const GrFragmentProcessor> inner (
- new LightingFP(pdm, diffuseTexture, normalTexture, diffM, normM, diffParams, normParams,
- fLights, fInvNormRotation));
+ new LightingFP(diffuseTexture, normalTexture, diffM, normM, diffParams, normParams, fLights,
+ fInvNormRotation));
return GrFragmentProcessor::MulOutputByInputAlpha(inner);
}
diff --git a/src/core/SkLocalMatrixShader.h b/src/core/SkLocalMatrixShader.h
index a108259..6265427 100644
--- a/src/core/SkLocalMatrixShader.h
+++ b/src/core/SkLocalMatrixShader.h
@@ -29,13 +29,13 @@
#if SK_SUPPORT_GPU
const GrFragmentProcessor* asFragmentProcessor(GrContext* context, const SkMatrix& viewM,
- const SkMatrix* localMatrix, SkFilterQuality fq,
- GrProcessorDataManager* procDataManager) const override {
+ const SkMatrix* localMatrix,
+ SkFilterQuality fq) const override {
SkMatrix tmp = this->getLocalMatrix();
if (localMatrix) {
tmp.preConcat(*localMatrix);
}
- return fProxyShader->asFragmentProcessor(context, viewM, &tmp, fq, procDataManager);
+ return fProxyShader->asFragmentProcessor(context, viewM, &tmp, fq);
}
#endif
diff --git a/src/core/SkPictureShader.cpp b/src/core/SkPictureShader.cpp
index 906313d..4539dda 100644
--- a/src/core/SkPictureShader.cpp
+++ b/src/core/SkPictureShader.cpp
@@ -318,8 +318,7 @@
GrContext* context,
const SkMatrix& viewM,
const SkMatrix* localMatrix,
- SkFilterQuality fq,
- GrProcessorDataManager* procDataManager) const {
+ SkFilterQuality fq) const {
int maxTextureSize = 0;
if (context) {
maxTextureSize = context->caps()->maxTextureSize();
@@ -328,6 +327,6 @@
if (!bitmapShader) {
return nullptr;
}
- return bitmapShader->asFragmentProcessor(context, viewM, nullptr, fq, procDataManager);
+ return bitmapShader->asFragmentProcessor(context, viewM, nullptr, fq);
}
#endif
diff --git a/src/core/SkPictureShader.h b/src/core/SkPictureShader.h
index f0bad61..2657bab 100644
--- a/src/core/SkPictureShader.h
+++ b/src/core/SkPictureShader.h
@@ -34,8 +34,7 @@
const GrFragmentProcessor* asFragmentProcessor(GrContext*,
const SkMatrix& viewM,
const SkMatrix*,
- SkFilterQuality,
- GrProcessorDataManager*) const override;
+ SkFilterQuality) const override;
#endif
protected:
diff --git a/src/core/SkShader.cpp b/src/core/SkShader.cpp
index 6aadb43..0ec1433 100644
--- a/src/core/SkShader.cpp
+++ b/src/core/SkShader.cpp
@@ -211,8 +211,7 @@
}
const GrFragmentProcessor* SkShader::asFragmentProcessor(GrContext*, const SkMatrix&,
- const SkMatrix*, SkFilterQuality,
- GrProcessorDataManager*) const {
+ const SkMatrix*, SkFilterQuality) const {
return nullptr;
}
@@ -333,8 +332,8 @@
#include "SkGr.h"
#include "effects/GrConstColorProcessor.h"
const GrFragmentProcessor* SkColorShader::asFragmentProcessor(GrContext*, const SkMatrix&,
- const SkMatrix*, SkFilterQuality,
- GrProcessorDataManager*) const {
+ const SkMatrix*,
+ SkFilterQuality) const {
GrColor color = SkColorToPremulGrColor(fColor);
return GrConstColorProcessor::Create(color, GrConstColorProcessor::kModulateA_InputMode);
}
diff --git a/src/core/SkXfermode.cpp b/src/core/SkXfermode.cpp
index 3fb44b4..9083814 100644
--- a/src/core/SkXfermode.cpp
+++ b/src/core/SkXfermode.cpp
@@ -651,7 +651,7 @@
return false;
}
-bool SkXfermode::asFragmentProcessor(const GrFragmentProcessor**, GrProcessorDataManager*,
+bool SkXfermode::asFragmentProcessor(const GrFragmentProcessor**,
const GrFragmentProcessor*) const {
return false;
}
@@ -923,11 +923,9 @@
#include "effects/GrXfermodeFragmentProcessor.h"
bool SkProcCoeffXfermode::asFragmentProcessor(const GrFragmentProcessor** fp,
- GrProcessorDataManager* procDataManager,
const GrFragmentProcessor* dst) const {
if (fp) {
SkASSERT(dst);
- SkASSERT(procDataManager);
*fp = GrXfermodeFragmentProcessor::CreateFromDstProcessor(dst, fMode);
SkASSERT(*fp || kSrc_Mode == fMode);
}
diff --git a/src/core/SkXfermode_proccoeff.h b/src/core/SkXfermode_proccoeff.h
index e34f22a..f86af2d 100644
--- a/src/core/SkXfermode_proccoeff.h
+++ b/src/core/SkXfermode_proccoeff.h
@@ -44,7 +44,7 @@
bool isOpaque(SkXfermode::SrcColorOpacity opacityType) const override;
#if SK_SUPPORT_GPU
- bool asFragmentProcessor(const GrFragmentProcessor**, GrProcessorDataManager*,
+ bool asFragmentProcessor(const GrFragmentProcessor**,
const GrFragmentProcessor*) const override;
bool asXPFactory(GrXPFactory**) const override;
diff --git a/src/effects/SkAlphaThresholdFilter.cpp b/src/effects/SkAlphaThresholdFilter.cpp
index 066a91f..95860ac 100644
--- a/src/effects/SkAlphaThresholdFilter.cpp
+++ b/src/effects/SkAlphaThresholdFilter.cpp
@@ -28,8 +28,8 @@
bool onFilterImage(Proxy*, const SkBitmap& src, const Context&,
SkBitmap* result, SkIPoint* offset) const override;
#if SK_SUPPORT_GPU
- bool asFragmentProcessor(GrFragmentProcessor**, GrProcessorDataManager*, GrTexture*,
- const SkMatrix&, const SkIRect& bounds) const override;
+ bool asFragmentProcessor(GrFragmentProcessor**, GrTexture*, const SkMatrix&,
+ const SkIRect& bounds) const override;
#endif
private:
@@ -62,13 +62,11 @@
class AlphaThresholdEffect : public GrFragmentProcessor {
public:
- static GrFragmentProcessor* Create(GrProcessorDataManager* procDataManager,
- GrTexture* texture,
+ static GrFragmentProcessor* Create(GrTexture* texture,
GrTexture* maskTexture,
float innerThreshold,
float outerThreshold) {
- return new AlphaThresholdEffect(procDataManager, texture, maskTexture, innerThreshold,
- outerThreshold);
+ return new AlphaThresholdEffect(texture, maskTexture, innerThreshold, outerThreshold);
}
virtual ~AlphaThresholdEffect() {};
@@ -79,8 +77,7 @@
float outerThreshold() const { return fOuterThreshold; }
private:
- AlphaThresholdEffect(GrProcessorDataManager*,
- GrTexture* texture,
+ AlphaThresholdEffect(GrTexture* texture,
GrTexture* maskTexture,
float innerThreshold,
float outerThreshold)
@@ -200,8 +197,7 @@
GrTexture* maskTex = d->fTextures[GrProcessorUnitTest::kAlphaTextureIdx];
float innerThresh = d->fRandom->nextUScalar1();
float outerThresh = d->fRandom->nextUScalar1();
- return AlphaThresholdEffect::Create(d->fProcDataManager, bmpTex, maskTex, innerThresh,
- outerThresh);
+ return AlphaThresholdEffect::Create(bmpTex, maskTex, innerThresh, outerThresh);
}
///////////////////////////////////////////////////////////////////////////////
@@ -254,7 +250,6 @@
#if SK_SUPPORT_GPU
bool SkAlphaThresholdFilterImpl::asFragmentProcessor(GrFragmentProcessor** fp,
- GrProcessorDataManager* procDataManager,
GrTexture* texture,
const SkMatrix& in_matrix,
const SkIRect&) const {
@@ -292,8 +287,7 @@
}
}
- *fp = AlphaThresholdEffect::Create(procDataManager,
- texture,
+ *fp = AlphaThresholdEffect::Create(texture,
maskTexture,
fInnerThreshold,
fOuterThreshold);
diff --git a/src/effects/SkArithmeticMode.cpp b/src/effects/SkArithmeticMode.cpp
index 35ac8a8..87af82e 100644
--- a/src/effects/SkArithmeticMode.cpp
+++ b/src/effects/SkArithmeticMode.cpp
@@ -31,7 +31,7 @@
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkArithmeticMode_scalar)
#if SK_SUPPORT_GPU
- bool asFragmentProcessor(const GrFragmentProcessor**, GrProcessorDataManager*,
+ bool asFragmentProcessor(const GrFragmentProcessor**,
const GrFragmentProcessor* dst) const override;
bool asXPFactory(GrXPFactory**) const override;
@@ -236,11 +236,9 @@
#if SK_SUPPORT_GPU
bool SkArithmeticMode_scalar::asFragmentProcessor(const GrFragmentProcessor** fp,
- GrProcessorDataManager* procDataManager,
const GrFragmentProcessor* dst) const {
if (fp) {
- *fp = GrArithmeticFP::Create(procDataManager,
- SkScalarToFloat(fK[0]),
+ *fp = GrArithmeticFP::Create(SkScalarToFloat(fK[0]),
SkScalarToFloat(fK[1]),
SkScalarToFloat(fK[2]),
SkScalarToFloat(fK[3]),
diff --git a/src/effects/SkArithmeticMode_gpu.cpp b/src/effects/SkArithmeticMode_gpu.cpp
index ab447e7..96e8c0d 100644
--- a/src/effects/SkArithmeticMode_gpu.cpp
+++ b/src/effects/SkArithmeticMode_gpu.cpp
@@ -94,8 +94,8 @@
///////////////////////////////////////////////////////////////////////////////
-GrArithmeticFP::GrArithmeticFP(GrProcessorDataManager*, float k1, float k2, float k3, float k4,
- bool enforcePMColor, const GrFragmentProcessor* dst)
+GrArithmeticFP::GrArithmeticFP(float k1, float k2, float k3, float k4, bool enforcePMColor,
+ const GrFragmentProcessor* dst)
: fK1(k1), fK2(k2), fK3(k3), fK4(k4), fEnforcePMColor(enforcePMColor) {
this->initClassID<GrArithmeticFP>();
@@ -136,7 +136,7 @@
bool enforcePMColor = d->fRandom->nextBool();
SkAutoTUnref<const GrFragmentProcessor> dst(GrProcessorUnitTest::CreateChildFP(d));
- return new GrArithmeticFP(d->fProcDataManager, k1, k2, k3, k4, enforcePMColor, dst);
+ return new GrArithmeticFP(k1, k2, k3, k4, enforcePMColor, dst);
}
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrArithmeticFP);
diff --git a/src/effects/SkArithmeticMode_gpu.h b/src/effects/SkArithmeticMode_gpu.h
index d415cc4..4810bae 100644
--- a/src/effects/SkArithmeticMode_gpu.h
+++ b/src/effects/SkArithmeticMode_gpu.h
@@ -31,10 +31,9 @@
class GrArithmeticFP : public GrFragmentProcessor {
public:
- static const GrFragmentProcessor* Create(GrProcessorDataManager* procDataManager,
- float k1, float k2, float k3, float k4,
+ static const GrFragmentProcessor* Create(float k1, float k2, float k3, float k4,
bool enforcePMColor, const GrFragmentProcessor* dst) {
- return new GrArithmeticFP(procDataManager, k1, k2, k3, k4, enforcePMColor, dst);
+ return new GrArithmeticFP(k1, k2, k3, k4, enforcePMColor, dst);
}
~GrArithmeticFP() override {};
@@ -56,8 +55,8 @@
void onComputeInvariantOutput(GrInvariantOutput* inout) const override;
- GrArithmeticFP(GrProcessorDataManager*, float k1, float k2, float k3, float k4,
- bool enforcePMColor, const GrFragmentProcessor* dst);
+ GrArithmeticFP(float k1, float k2, float k3, float k4, bool enforcePMColor,
+ const GrFragmentProcessor* dst);
float fK1, fK2, fK3, fK4;
bool fEnforcePMColor;
diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp
index 58242b7..0a95206 100644
--- a/src/effects/SkBlurMaskFilter.cpp
+++ b/src/effects/SkBlurMaskFilter.cpp
@@ -1208,8 +1208,7 @@
SkMatrix matrix;
matrix.setIDiv(src->width(), src->height());
// Blend pathTexture over blurTexture.
- paint.addCoverageFragmentProcessor(
- GrSimpleTextureEffect::Create(paint.getProcessorDataManager(), src, matrix))->unref();
+ paint.addCoverageFragmentProcessor(GrSimpleTextureEffect::Create(src, matrix))->unref();
if (kInner_SkBlurStyle == fBlurStyle) {
// inner: dst = dst * src
paint.setCoverageSetOpXPFactory(SkRegion::kIntersect_Op);
diff --git a/src/effects/SkColorCubeFilter.cpp b/src/effects/SkColorCubeFilter.cpp
index 54c0e37..7cb41f3 100644
--- a/src/effects/SkColorCubeFilter.cpp
+++ b/src/effects/SkColorCubeFilter.cpp
@@ -303,8 +303,7 @@
const GrGLSLCaps&, GrProcessorKeyBuilder* b) {
}
-const GrFragmentProcessor* SkColorCubeFilter::asFragmentProcessor(GrContext* context,
- GrProcessorDataManager*) const {
+const GrFragmentProcessor* SkColorCubeFilter::asFragmentProcessor(GrContext* context) const {
static const GrUniqueKey::Domain kDomain = GrUniqueKey::GenerateDomain();
GrUniqueKey key;
GrUniqueKey::Builder builder(&key, kDomain, 2);
diff --git a/src/effects/SkColorFilters.cpp b/src/effects/SkColorFilters.cpp
index da01893..1e34b1e 100644
--- a/src/effects/SkColorFilters.cpp
+++ b/src/effects/SkColorFilters.cpp
@@ -70,8 +70,7 @@
#include "effects/GrConstColorProcessor.h"
#include "SkGr.h"
-const GrFragmentProcessor* SkModeColorFilter::asFragmentProcessor(GrContext*,
- GrProcessorDataManager*) const {
+const GrFragmentProcessor* SkModeColorFilter::asFragmentProcessor(GrContext*) const {
if (SkXfermode::kDst_Mode == fMode) {
return nullptr;
}
diff --git a/src/effects/SkColorMatrixFilter.cpp b/src/effects/SkColorMatrixFilter.cpp
index 7c121b1..6815096 100644
--- a/src/effects/SkColorMatrixFilter.cpp
+++ b/src/effects/SkColorMatrixFilter.cpp
@@ -536,8 +536,7 @@
return ColorMatrixEffect::Create(colorMatrix);
}
-const GrFragmentProcessor* SkColorMatrixFilter::asFragmentProcessor(GrContext*,
- GrProcessorDataManager*) const {
+const GrFragmentProcessor* SkColorMatrixFilter::asFragmentProcessor(GrContext*) const {
return ColorMatrixEffect::Create(fMatrix);
}
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp
index e87a871..17f96df 100644
--- a/src/effects/SkDisplacementMapEffect.cpp
+++ b/src/effects/SkDisplacementMapEffect.cpp
@@ -328,14 +328,12 @@
class GrDisplacementMapEffect : public GrFragmentProcessor {
public:
static GrFragmentProcessor* Create(
- GrProcessorDataManager* procDataManager,
SkDisplacementMapEffect::ChannelSelectorType xChannelSelector,
SkDisplacementMapEffect::ChannelSelectorType yChannelSelector, SkVector scale,
GrTexture* displacement, const SkMatrix& offsetMatrix, GrTexture* color,
const SkISize& colorDimensions) {
- return new GrDisplacementMapEffect(procDataManager, xChannelSelector, yChannelSelector,
- scale, displacement, offsetMatrix, color,
- colorDimensions);
+ return new GrDisplacementMapEffect(xChannelSelector, yChannelSelector, scale, displacement,
+ offsetMatrix, color, colorDimensions);
}
virtual ~GrDisplacementMapEffect();
@@ -363,8 +361,7 @@
void onComputeInvariantOutput(GrInvariantOutput* inout) const override;
- GrDisplacementMapEffect(GrProcessorDataManager*,
- SkDisplacementMapEffect::ChannelSelectorType xChannelSelector,
+ GrDisplacementMapEffect(SkDisplacementMapEffect::ChannelSelectorType xChannelSelector,
SkDisplacementMapEffect::ChannelSelectorType yChannelSelector,
const SkVector& scale,
GrTexture* displacement, const SkMatrix& offsetMatrix,
@@ -439,8 +436,7 @@
SkIntToScalar(colorOffset.fY - displacementOffset.fY));
paint.addColorFragmentProcessor(
- GrDisplacementMapEffect::Create(paint.getProcessorDataManager(),
- fXChannelSelector,
+ GrDisplacementMapEffect::Create(fXChannelSelector,
fYChannelSelector,
scale,
displacement,
@@ -469,7 +465,6 @@
///////////////////////////////////////////////////////////////////////////////
GrDisplacementMapEffect::GrDisplacementMapEffect(
- GrProcessorDataManager*,
SkDisplacementMapEffect::ChannelSelectorType xChannelSelector,
SkDisplacementMapEffect::ChannelSelectorType yChannelSelector,
const SkVector& scale,
@@ -534,8 +529,7 @@
SkISize colorDimensions;
colorDimensions.fWidth = d->fRandom->nextRangeU(0, d->fTextures[texIdxColor]->width());
colorDimensions.fHeight = d->fRandom->nextRangeU(0, d->fTextures[texIdxColor]->height());
- return GrDisplacementMapEffect::Create(d->fProcDataManager,
- xChannelSelector, yChannelSelector, scale,
+ return GrDisplacementMapEffect::Create(xChannelSelector, yChannelSelector, scale,
d->fTextures[texIdxDispl], SkMatrix::I(),
d->fTextures[texIdxColor], colorDimensions);
}
diff --git a/src/effects/SkGpuBlurUtils.cpp b/src/effects/SkGpuBlurUtils.cpp
index 5690c28..0ebbfe4 100644
--- a/src/effects/SkGpuBlurUtils.cpp
+++ b/src/effects/SkGpuBlurUtils.cpp
@@ -58,7 +58,7 @@
float bounds[2]) {
GrPaint paint;
SkAutoTUnref<GrFragmentProcessor> conv(GrConvolutionEffect::CreateGaussian(
- paint.getProcessorDataManager(), texture, direction, radius, sigma, useBounds, bounds));
+ texture, direction, radius, sigma, useBounds, bounds));
paint.addColorFragmentProcessor(conv);
drawContext->drawNonAARectToRect(rt, clip, paint, SkMatrix::I(), dstRect, srcRect);
}
@@ -79,7 +79,6 @@
SkIPoint kernelOffset = SkIPoint::Make(radiusX, radiusY);
GrPaint paint;
SkAutoTUnref<GrFragmentProcessor> conv(GrMatrixConvolutionEffect::CreateGaussian(
- paint.getProcessorDataManager(),
texture, bounds, size, 1.0, 0.0, kernelOffset,
useBounds ? GrTextureDomain::kClamp_Mode : GrTextureDomain::kIgnore_Mode,
true, sigmaX, sigmaY));
@@ -209,8 +208,7 @@
matrix.mapRect(&domain, rect);
domain.inset(i < scaleFactorX ? SK_ScalarHalf / srcTexture->width() : 0.0f,
i < scaleFactorY ? SK_ScalarHalf / srcTexture->height() : 0.0f);
- SkAutoTUnref<GrFragmentProcessor> fp( GrTextureDomainEffect::Create(
- paint.getProcessorDataManager(),
+ SkAutoTUnref<GrFragmentProcessor> fp(GrTextureDomainEffect::Create(
srcTexture,
matrix,
domain,
diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp
index c46cc67..32589e1 100644
--- a/src/effects/SkLightingImageFilter.cpp
+++ b/src/effects/SkLightingImageFilter.cpp
@@ -321,8 +321,7 @@
bool canFilterImageGPU() const override { return true; }
bool filterImageGPU(Proxy*, const SkBitmap& src, const Context&,
SkBitmap* result, SkIPoint* offset) const override;
- virtual GrFragmentProcessor* getFragmentProcessor(GrProcessorDataManager*,
- GrTexture*,
+ virtual GrFragmentProcessor* getFragmentProcessor(GrTexture*,
const SkMatrix&,
const SkIRect& bounds,
BoundaryMode boundaryMode) const = 0;
@@ -352,8 +351,7 @@
const SkIRect& bounds) const {
SkRect srcRect = dstRect.makeOffset(SkIntToScalar(bounds.x()), SkIntToScalar(bounds.y()));
GrPaint paint;
- GrFragmentProcessor* fp = this->getFragmentProcessor(paint.getProcessorDataManager(), src,
- matrix, bounds, boundaryMode);
+ GrFragmentProcessor* fp = this->getFragmentProcessor(src, matrix, bounds, boundaryMode);
paint.addColorFragmentProcessor(fp)->unref();
drawContext->drawNonAARectToRect(dst->asRenderTarget(), clip, paint, SkMatrix::I(),
dstRect, srcRect);
@@ -449,8 +447,8 @@
bool onFilterImage(Proxy*, const SkBitmap& src, const Context&,
SkBitmap* result, SkIPoint* offset) const override;
#if SK_SUPPORT_GPU
- GrFragmentProcessor* getFragmentProcessor(GrProcessorDataManager*, GrTexture*, const SkMatrix&,
- const SkIRect& bounds, BoundaryMode) const override;
+ GrFragmentProcessor* getFragmentProcessor(GrTexture*, const SkMatrix&, const SkIRect& bounds,
+ BoundaryMode) const override;
#endif
private:
@@ -477,8 +475,8 @@
bool onFilterImage(Proxy*, const SkBitmap& src, const Context&,
SkBitmap* result, SkIPoint* offset) const override;
#if SK_SUPPORT_GPU
- GrFragmentProcessor* getFragmentProcessor(GrProcessorDataManager*, GrTexture*, const SkMatrix&,
- const SkIRect& bounds, BoundaryMode) const override;
+ GrFragmentProcessor* getFragmentProcessor(GrTexture*, const SkMatrix&, const SkIRect& bounds,
+ BoundaryMode) const override;
#endif
private:
@@ -492,8 +490,8 @@
class GrLightingEffect : public GrSingleTextureEffect {
public:
- GrLightingEffect(GrProcessorDataManager*, GrTexture* texture, const SkImageFilterLight* light,
- SkScalar surfaceScale, const SkMatrix& matrix, BoundaryMode boundaryMode);
+ GrLightingEffect(GrTexture* texture, const SkImageFilterLight* light, SkScalar surfaceScale,
+ const SkMatrix& matrix, BoundaryMode boundaryMode);
virtual ~GrLightingEffect();
const SkImageFilterLight* light() const { return fLight; }
@@ -520,15 +518,13 @@
class GrDiffuseLightingEffect : public GrLightingEffect {
public:
- static GrFragmentProcessor* Create(GrProcessorDataManager* procDataManager,
- GrTexture* texture,
+ static GrFragmentProcessor* Create(GrTexture* texture,
const SkImageFilterLight* light,
SkScalar surfaceScale,
const SkMatrix& matrix,
SkScalar kd,
BoundaryMode boundaryMode) {
- return new GrDiffuseLightingEffect(procDataManager, texture, light, surfaceScale, matrix,
- kd, boundaryMode);
+ return new GrDiffuseLightingEffect(texture, light, surfaceScale, matrix, kd, boundaryMode);
}
const char* name() const override { return "DiffuseLighting"; }
@@ -542,8 +538,7 @@
bool onIsEqual(const GrFragmentProcessor&) const override;
- GrDiffuseLightingEffect(GrProcessorDataManager*,
- GrTexture* texture,
+ GrDiffuseLightingEffect(GrTexture* texture,
const SkImageFilterLight* light,
SkScalar surfaceScale,
const SkMatrix& matrix,
@@ -557,16 +552,15 @@
class GrSpecularLightingEffect : public GrLightingEffect {
public:
- static GrFragmentProcessor* Create(GrProcessorDataManager* procDataManager,
- GrTexture* texture,
+ static GrFragmentProcessor* Create(GrTexture* texture,
const SkImageFilterLight* light,
SkScalar surfaceScale,
const SkMatrix& matrix,
SkScalar ks,
SkScalar shininess,
BoundaryMode boundaryMode) {
- return new GrSpecularLightingEffect(procDataManager, texture, light, surfaceScale, matrix,
- ks, shininess, boundaryMode);
+ return new GrSpecularLightingEffect(texture, light, surfaceScale, matrix, ks, shininess,
+ boundaryMode);
}
const char* name() const override { return "SpecularLighting"; }
@@ -581,8 +575,7 @@
bool onIsEqual(const GrFragmentProcessor&) const override;
- GrSpecularLightingEffect(GrProcessorDataManager*,
- GrTexture* texture,
+ GrSpecularLightingEffect(GrTexture* texture,
const SkImageFilterLight* light,
SkScalar surfaceScale,
const SkMatrix& matrix,
@@ -1255,15 +1248,14 @@
#if SK_SUPPORT_GPU
GrFragmentProcessor* SkDiffuseLightingImageFilter::getFragmentProcessor(
- GrProcessorDataManager* procDataManager,
GrTexture* texture,
const SkMatrix& matrix,
const SkIRect&,
BoundaryMode boundaryMode
) const {
SkScalar scale = SkScalarMul(this->surfaceScale(), SkIntToScalar(255));
- return GrDiffuseLightingEffect::Create(procDataManager, texture, this->light(), scale, matrix,
- this->kd(), boundaryMode);
+ return GrDiffuseLightingEffect::Create(texture, this->light(), scale, matrix, this->kd(),
+ boundaryMode);
}
#endif
@@ -1396,14 +1388,13 @@
#if SK_SUPPORT_GPU
GrFragmentProcessor* SkSpecularLightingImageFilter::getFragmentProcessor(
- GrProcessorDataManager* procDataManager,
GrTexture* texture,
const SkMatrix& matrix,
const SkIRect&,
BoundaryMode boundaryMode) const {
SkScalar scale = SkScalarMul(this->surfaceScale(), SkIntToScalar(255));
- return GrSpecularLightingEffect::Create(procDataManager, texture, this->light(), scale, matrix,
- this->ks(), this->shininess(), boundaryMode);
+ return GrSpecularLightingEffect::Create(texture, this->light(), scale, matrix, this->ks(),
+ this->shininess(), boundaryMode);
}
#endif
@@ -1575,13 +1566,12 @@
///////////////////////////////////////////////////////////////////////////////
-GrLightingEffect::GrLightingEffect(GrProcessorDataManager* procDataManager,
- GrTexture* texture,
+GrLightingEffect::GrLightingEffect(GrTexture* texture,
const SkImageFilterLight* light,
SkScalar surfaceScale,
const SkMatrix& matrix,
BoundaryMode boundaryMode)
- : INHERITED(procDataManager, texture, GrCoordTransform::MakeDivByTextureWHMatrix(texture))
+ : INHERITED(texture, GrCoordTransform::MakeDivByTextureWHMatrix(texture))
, fLight(light)
, fSurfaceScale(surfaceScale)
, fFilterMatrix(matrix)
@@ -1605,14 +1595,13 @@
///////////////////////////////////////////////////////////////////////////////
-GrDiffuseLightingEffect::GrDiffuseLightingEffect(GrProcessorDataManager* procDataManager,
- GrTexture* texture,
+GrDiffuseLightingEffect::GrDiffuseLightingEffect(GrTexture* texture,
const SkImageFilterLight* light,
SkScalar surfaceScale,
const SkMatrix& matrix,
SkScalar kd,
BoundaryMode boundaryMode)
- : INHERITED(procDataManager, texture, light, surfaceScale, matrix, boundaryMode), fKD(kd) {
+ : INHERITED(texture, light, surfaceScale, matrix, boundaryMode), fKD(kd) {
this->initClassID<GrDiffuseLightingEffect>();
}
@@ -1642,8 +1631,7 @@
matrix[i] = d->fRandom->nextUScalar1();
}
BoundaryMode mode = static_cast<BoundaryMode>(d->fRandom->nextU() % kBoundaryModeCount);
- return GrDiffuseLightingEffect::Create(d->fProcDataManager,
- d->fTextures[GrProcessorUnitTest::kAlphaTextureIdx],
+ return GrDiffuseLightingEffect::Create(d->fTextures[GrProcessorUnitTest::kAlphaTextureIdx],
light, surfaceScale, matrix, kd, mode);
}
@@ -1804,15 +1792,14 @@
///////////////////////////////////////////////////////////////////////////////
-GrSpecularLightingEffect::GrSpecularLightingEffect(GrProcessorDataManager* procDataManager,
- GrTexture* texture,
+GrSpecularLightingEffect::GrSpecularLightingEffect(GrTexture* texture,
const SkImageFilterLight* light,
SkScalar surfaceScale,
const SkMatrix& matrix,
SkScalar ks,
SkScalar shininess,
BoundaryMode boundaryMode)
- : INHERITED(procDataManager, texture, light, surfaceScale, matrix, boundaryMode)
+ : INHERITED(texture, light, surfaceScale, matrix, boundaryMode)
, fKS(ks)
, fShininess(shininess) {
this->initClassID<GrSpecularLightingEffect>();
@@ -1846,8 +1833,7 @@
matrix[i] = d->fRandom->nextUScalar1();
}
BoundaryMode mode = static_cast<BoundaryMode>(d->fRandom->nextU() % kBoundaryModeCount);
- return GrSpecularLightingEffect::Create(d->fProcDataManager,
- d->fTextures[GrProcessorUnitTest::kAlphaTextureIdx],
+ return GrSpecularLightingEffect::Create(d->fTextures[GrProcessorUnitTest::kAlphaTextureIdx],
light, surfaceScale, matrix, ks, shininess, mode);
}
diff --git a/src/effects/SkLumaColorFilter.cpp b/src/effects/SkLumaColorFilter.cpp
index 8c89ab0..39d2bbf 100644
--- a/src/effects/SkLumaColorFilter.cpp
+++ b/src/effects/SkLumaColorFilter.cpp
@@ -108,8 +108,7 @@
}
};
-const GrFragmentProcessor* SkLumaColorFilter::asFragmentProcessor(GrContext*,
- GrProcessorDataManager*) const {
+const GrFragmentProcessor* SkLumaColorFilter::asFragmentProcessor(GrContext*) const {
return LumaColorFilterEffect::Create();
}
diff --git a/src/effects/SkMagnifierImageFilter.cpp b/src/effects/SkMagnifierImageFilter.cpp
index 622144b..9138c86 100644
--- a/src/effects/SkMagnifierImageFilter.cpp
+++ b/src/effects/SkMagnifierImageFilter.cpp
@@ -23,8 +23,7 @@
class GrMagnifierEffect : public GrSingleTextureEffect {
public:
- static GrFragmentProcessor* Create(GrProcessorDataManager* procDataManager,
- GrTexture* texture,
+ static GrFragmentProcessor* Create(GrTexture* texture,
const SkRect& bounds,
float xOffset,
float yOffset,
@@ -32,8 +31,8 @@
float yInvZoom,
float xInvInset,
float yInvInset) {
- return new GrMagnifierEffect(procDataManager, texture, bounds, xOffset, yOffset, xInvZoom,
- yInvZoom, xInvInset, yInvInset);
+ return new GrMagnifierEffect(texture, bounds, xOffset, yOffset, xInvZoom, yInvZoom, xInvInset,
+ yInvInset);
}
virtual ~GrMagnifierEffect() {};
@@ -54,8 +53,7 @@
float y_inv_inset() const { return fYInvInset; }
private:
- GrMagnifierEffect(GrProcessorDataManager* procDataManager,
- GrTexture* texture,
+ GrMagnifierEffect(GrTexture* texture,
const SkRect& bounds,
float xOffset,
float yOffset,
@@ -63,7 +61,7 @@
float yInvZoom,
float xInvInset,
float yInvInset)
- : INHERITED(procDataManager, texture, GrCoordTransform::MakeDivByTextureWHMatrix(texture))
+ : INHERITED(texture, GrCoordTransform::MakeDivByTextureWHMatrix(texture))
, fBounds(bounds)
, fXOffset(xOffset)
, fYOffset(yOffset)
@@ -207,7 +205,6 @@
uint32_t inset = d->fRandom->nextULessThan(kMaxInset);
GrFragmentProcessor* effect = GrMagnifierEffect::Create(
- d->fProcDataManager,
texture,
SkRect::MakeWH(SkIntToScalar(kMaxWidth), SkIntToScalar(kMaxHeight)),
(float) width / texture->width(),
@@ -263,7 +260,6 @@
#if SK_SUPPORT_GPU
bool SkMagnifierImageFilter::asFragmentProcessor(GrFragmentProcessor** fp,
- GrProcessorDataManager* procDataManager,
GrTexture* texture, const SkMatrix&,
const SkIRect&bounds) const {
if (fp) {
@@ -278,8 +274,7 @@
SkIntToScalar(texture->width()) / bounds.width(),
SkIntToScalar(texture->height()) / bounds.height());
SkScalar invInset = fInset > 0 ? SkScalarInvert(fInset) : SK_Scalar1;
- *fp = GrMagnifierEffect::Create(procDataManager,
- texture,
+ *fp = GrMagnifierEffect::Create(texture,
effectBounds,
fSrcRect.x() / texture->width(),
yOffset / texture->height(),
diff --git a/src/effects/SkMatrixConvolutionImageFilter.cpp b/src/effects/SkMatrixConvolutionImageFilter.cpp
index 499ba51..b278057 100644
--- a/src/effects/SkMatrixConvolutionImageFilter.cpp
+++ b/src/effects/SkMatrixConvolutionImageFilter.cpp
@@ -347,7 +347,6 @@
}
bool SkMatrixConvolutionImageFilter::asFragmentProcessor(GrFragmentProcessor** fp,
- GrProcessorDataManager* procDataManager,
GrTexture* texture,
const SkMatrix&,
const SkIRect& bounds) const {
@@ -355,8 +354,7 @@
return fKernelSize.width() * fKernelSize.height() <= MAX_KERNEL_SIZE;
}
SkASSERT(fKernelSize.width() * fKernelSize.height() <= MAX_KERNEL_SIZE);
- *fp = GrMatrixConvolutionEffect::Create(procDataManager,
- texture,
+ *fp = GrMatrixConvolutionEffect::Create(texture,
bounds,
fKernelSize,
fKernel,
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp
index 440d88d..584cf1b 100644
--- a/src/effects/SkMorphologyImageFilter.cpp
+++ b/src/effects/SkMorphologyImageFilter.cpp
@@ -205,15 +205,14 @@
kDilate_MorphologyType,
};
- static GrFragmentProcessor* Create(GrProcessorDataManager* procDataManager, GrTexture* tex,
- Direction dir, int radius, MorphologyType type) {
- return new GrMorphologyEffect(procDataManager, tex, dir, radius, type);
+ static GrFragmentProcessor* Create(GrTexture* tex, Direction dir, int radius,
+ MorphologyType type) {
+ return new GrMorphologyEffect(tex, dir, radius, type);
}
- static GrFragmentProcessor* Create(GrProcessorDataManager* procDataManager, GrTexture* tex,
- Direction dir, int radius, MorphologyType type,
- float bounds[2]) {
- return new GrMorphologyEffect(procDataManager, tex, dir, radius, type, bounds);
+ static GrFragmentProcessor* Create(GrTexture* tex, Direction dir, int radius,
+ MorphologyType type, float bounds[2]) {
+ return new GrMorphologyEffect(tex, dir, radius, type, bounds);
}
virtual ~GrMorphologyEffect();
@@ -239,8 +238,8 @@
void onComputeInvariantOutput(GrInvariantOutput* inout) const override;
- GrMorphologyEffect(GrProcessorDataManager*, GrTexture*, Direction, int radius, MorphologyType);
- GrMorphologyEffect(GrProcessorDataManager*, GrTexture*, Direction, int radius, MorphologyType,
+ GrMorphologyEffect(GrTexture*, Direction, int radius, MorphologyType);
+ GrMorphologyEffect(GrTexture*, Direction, int radius, MorphologyType,
float bounds[2]);
GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
@@ -394,23 +393,21 @@
///////////////////////////////////////////////////////////////////////////////
-GrMorphologyEffect::GrMorphologyEffect(GrProcessorDataManager* procDataManager,
- GrTexture* texture,
+GrMorphologyEffect::GrMorphologyEffect(GrTexture* texture,
Direction direction,
int radius,
MorphologyType type)
- : INHERITED(procDataManager, texture, direction, radius)
+ : INHERITED(texture, direction, radius)
, fType(type), fUseRange(false) {
this->initClassID<GrMorphologyEffect>();
}
-GrMorphologyEffect::GrMorphologyEffect(GrProcessorDataManager* procDataManager,
- GrTexture* texture,
+GrMorphologyEffect::GrMorphologyEffect(GrTexture* texture,
Direction direction,
int radius,
MorphologyType type,
float range[2])
- : INHERITED(procDataManager, texture, direction, radius)
+ : INHERITED(texture, direction, radius)
, fType(type), fUseRange(true) {
this->initClassID<GrMorphologyEffect>();
fRange[0] = range[0];
@@ -454,7 +451,7 @@
MorphologyType type = d->fRandom->nextBool() ? GrMorphologyEffect::kErode_MorphologyType :
GrMorphologyEffect::kDilate_MorphologyType;
- return GrMorphologyEffect::Create(d->fProcDataManager, d->fTextures[texIdx], dir, radius, type);
+ return GrMorphologyEffect::Create(d->fTextures[texIdx], dir, radius, type);
}
namespace {
@@ -471,8 +468,7 @@
float bounds[2],
Gr1DKernelEffect::Direction direction) {
GrPaint paint;
- paint.addColorFragmentProcessor(GrMorphologyEffect::Create(paint.getProcessorDataManager(),
- texture,
+ paint.addColorFragmentProcessor(GrMorphologyEffect::Create(texture,
direction,
radius,
morphType,
@@ -491,8 +487,7 @@
GrMorphologyEffect::MorphologyType morphType,
Gr1DKernelEffect::Direction direction) {
GrPaint paint;
- paint.addColorFragmentProcessor(GrMorphologyEffect::Create(paint.getProcessorDataManager(),
- texture,
+ paint.addColorFragmentProcessor(GrMorphologyEffect::Create(texture,
direction,
radius,
morphType))->unref();
diff --git a/src/effects/SkPerlinNoiseShader.cpp b/src/effects/SkPerlinNoiseShader.cpp
index 9a6c671..86463f6 100644
--- a/src/effects/SkPerlinNoiseShader.cpp
+++ b/src/effects/SkPerlinNoiseShader.cpp
@@ -510,13 +510,12 @@
class GrPerlinNoiseEffect : public GrFragmentProcessor {
public:
- static GrFragmentProcessor* Create(GrProcessorDataManager* procDataManager,
- SkPerlinNoiseShader::Type type,
+ static GrFragmentProcessor* Create(SkPerlinNoiseShader::Type type,
int numOctaves, bool stitchTiles,
SkPerlinNoiseShader::PaintingData* paintingData,
GrTexture* permutationsTexture, GrTexture* noiseTexture,
const SkMatrix& matrix) {
- return new GrPerlinNoiseEffect(procDataManager, type, numOctaves, stitchTiles, paintingData,
+ return new GrPerlinNoiseEffect(type, numOctaves, stitchTiles, paintingData,
permutationsTexture, noiseTexture, matrix);
}
@@ -555,7 +554,7 @@
inout->setToUnknown(GrInvariantOutput::kWillNot_ReadInput);
}
- GrPerlinNoiseEffect(GrProcessorDataManager*, SkPerlinNoiseShader::Type type,
+ GrPerlinNoiseEffect(SkPerlinNoiseShader::Type type,
int numOctaves, bool stitchTiles,
SkPerlinNoiseShader::PaintingData* paintingData,
GrTexture* permutationsTexture, GrTexture* noiseTexture,
@@ -610,8 +609,7 @@
GrPaint grPaint;
return shader->asFragmentProcessor(d->fContext,
GrTest::TestMatrix(d->fRandom), nullptr,
- kNone_SkFilterQuality,
- grPaint.getProcessorDataManager());
+ kNone_SkFilterQuality);
}
GrGLPerlinNoise::GrGLPerlinNoise(const GrProcessor& processor)
@@ -916,8 +914,7 @@
GrContext* context,
const SkMatrix& viewM,
const SkMatrix* externalLocalMatrix,
- SkFilterQuality,
- GrProcessorDataManager* procDataManager) const {
+ SkFilterQuality) const {
SkASSERT(context);
SkMatrix localMatrix = this->getLocalMatrix();
@@ -955,8 +952,7 @@
m.setTranslateY(-localMatrix.getTranslateY() + SK_Scalar1);
if ((permutationsTexture) && (noiseTexture)) {
SkAutoTUnref<GrFragmentProcessor> inner(
- GrPerlinNoiseEffect::Create(procDataManager,
- fType,
+ GrPerlinNoiseEffect::Create(fType,
fNumOctaves,
fStitchTiles,
paintingData,
diff --git a/src/effects/SkTableColorFilter.cpp b/src/effects/SkTableColorFilter.cpp
index 57b2b1d..ceb6663 100644
--- a/src/effects/SkTableColorFilter.cpp
+++ b/src/effects/SkTableColorFilter.cpp
@@ -48,8 +48,7 @@
SkColorFilter* newComposed(const SkColorFilter* inner) const override;
#if SK_SUPPORT_GPU
- const GrFragmentProcessor* asFragmentProcessor(GrContext*,
- GrProcessorDataManager*) const override;
+ const GrFragmentProcessor* asFragmentProcessor(GrContext*) const override;
#endif
void filterSpan(const SkPMColor src[], int count, SkPMColor dst[]) const override;
@@ -564,13 +563,12 @@
(flags & (1 << 3)) ? luts[3] : nullptr
));
- const GrFragmentProcessor* fp = filter->asFragmentProcessor(d->fContext, d->fProcDataManager);
+ const GrFragmentProcessor* fp = filter->asFragmentProcessor(d->fContext);
SkASSERT(fp);
return fp;
}
-const GrFragmentProcessor* SkTable_ColorFilter::asFragmentProcessor(GrContext* context,
- GrProcessorDataManager*) const {
+const GrFragmentProcessor* SkTable_ColorFilter::asFragmentProcessor(GrContext* context) const {
SkBitmap bitmap;
this->asComponentTable(&bitmap);
diff --git a/src/effects/SkXfermodeImageFilter.cpp b/src/effects/SkXfermodeImageFilter.cpp
index e357b0f..af74c22 100644
--- a/src/effects/SkXfermodeImageFilter.cpp
+++ b/src/effects/SkXfermodeImageFilter.cpp
@@ -124,7 +124,7 @@
#if SK_SUPPORT_GPU
bool SkXfermodeImageFilter::canFilterImageGPU() const {
- return fMode && fMode->asFragmentProcessor(nullptr, nullptr, nullptr) && !cropRectIsSet();
+ return fMode && fMode->asFragmentProcessor(nullptr, nullptr) && !cropRectIsSet();
}
bool SkXfermodeImageFilter::filterImageGPU(Proxy* proxy,
@@ -170,8 +170,8 @@
SkMatrix bgMatrix;
bgMatrix.setIDiv(backgroundTex->width(), backgroundTex->height());
SkAutoTUnref<const GrFragmentProcessor> bgFP(
- GrSimpleTextureEffect::Create(paint.getProcessorDataManager(), backgroundTex, bgMatrix));
- if (!fMode || !fMode->asFragmentProcessor(&xferFP, paint.getProcessorDataManager(), bgFP)) {
+ GrSimpleTextureEffect::Create(backgroundTex, bgMatrix));
+ if (!fMode || !fMode->asFragmentProcessor(&xferFP, bgFP)) {
// canFilterImageGPU() should've taken care of this
SkASSERT(false);
return false;
@@ -186,7 +186,6 @@
src.getBounds(&srcRect);
SkAutoTUnref<GrFragmentProcessor> foregroundDomain(GrTextureDomainEffect::Create(
- paint.getProcessorDataManager(),
foregroundTex, foregroundMatrix,
GrTextureDomain::MakeTexelDomain(foregroundTex, foreground.bounds()),
GrTextureDomain::kDecal_Mode,
diff --git a/src/effects/gradients/SkGradientShader.cpp b/src/effects/gradients/SkGradientShader.cpp
index 2f89352..e25ec9e 100644
--- a/src/effects/gradients/SkGradientShader.cpp
+++ b/src/effects/gradients/SkGradientShader.cpp
@@ -1058,7 +1058,6 @@
/////////////////////////////////////////////////////////////////////
GrGradientEffect::GrGradientEffect(GrContext* ctx,
- GrProcessorDataManager*,
const SkGradientShaderBase& shader,
const SkMatrix& matrix,
SkShader::TileMode tileMode) {
diff --git a/src/effects/gradients/SkGradientShaderPriv.h b/src/effects/gradients/SkGradientShaderPriv.h
index 38b506b..f6e80d9 100644
--- a/src/effects/gradients/SkGradientShaderPriv.h
+++ b/src/effects/gradients/SkGradientShaderPriv.h
@@ -327,7 +327,6 @@
public:
GrGradientEffect(GrContext* ctx,
- GrProcessorDataManager*,
const SkGradientShaderBase& shader,
const SkMatrix& matrix,
SkShader::TileMode tileMode);
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp
index 31fcd3f..11c79f0 100644
--- a/src/effects/gradients/SkLinearGradient.cpp
+++ b/src/effects/gradients/SkLinearGradient.cpp
@@ -468,11 +468,10 @@
public:
static GrFragmentProcessor* Create(GrContext* ctx,
- GrProcessorDataManager* procDataManager,
const SkLinearGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm) {
- return new GrLinearGradient(ctx, procDataManager, shader, matrix, tm);
+ return new GrLinearGradient(ctx, shader, matrix, tm);
}
virtual ~GrLinearGradient() { }
@@ -481,11 +480,10 @@
private:
GrLinearGradient(GrContext* ctx,
- GrProcessorDataManager* procDataManager,
const SkLinearGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm)
- : INHERITED(ctx, procDataManager, shader, matrix, tm) {
+ : INHERITED(ctx, shader, matrix, tm) {
this->initClassID<GrLinearGradient>();
}
@@ -520,7 +518,7 @@
colors, stops, colorCount,
tm));
const GrFragmentProcessor* fp = shader->asFragmentProcessor(d->fContext,
- GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality, d->fProcDataManager);
+ GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality);
GrAlwaysAssert(fp);
return fp;
}
@@ -542,8 +540,7 @@
GrContext* context,
const SkMatrix& viewm,
const SkMatrix* localMatrix,
- SkFilterQuality,
- GrProcessorDataManager* procDataManager) const {
+ SkFilterQuality) const {
SkASSERT(context);
SkMatrix matrix;
@@ -560,7 +557,7 @@
matrix.postConcat(fPtsToUnit);
SkAutoTUnref<const GrFragmentProcessor> inner(
- GrLinearGradient::Create(context, procDataManager, *this, matrix, fTileMode));
+ GrLinearGradient::Create(context, *this, matrix, fTileMode));
return GrFragmentProcessor::MulOutputByInputAlpha(inner);
}
diff --git a/src/effects/gradients/SkLinearGradient.h b/src/effects/gradients/SkLinearGradient.h
index af1088b..488775e 100644
--- a/src/effects/gradients/SkLinearGradient.h
+++ b/src/effects/gradients/SkLinearGradient.h
@@ -33,8 +33,7 @@
const GrFragmentProcessor* asFragmentProcessor(GrContext*,
const SkMatrix& viewM,
const SkMatrix*,
- SkFilterQuality,
- GrProcessorDataManager*) const override;
+ SkFilterQuality) const override;
#endif
SK_TO_STRING_OVERRIDE()
diff --git a/src/effects/gradients/SkRadialGradient.cpp b/src/effects/gradients/SkRadialGradient.cpp
index d402ad9..de0f764 100644
--- a/src/effects/gradients/SkRadialGradient.cpp
+++ b/src/effects/gradients/SkRadialGradient.cpp
@@ -440,11 +440,10 @@
class GrRadialGradient : public GrGradientEffect {
public:
static GrFragmentProcessor* Create(GrContext* ctx,
- GrProcessorDataManager* procDataManager,
const SkRadialGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm) {
- return new GrRadialGradient(ctx, procDataManager, shader, matrix, tm);
+ return new GrRadialGradient(ctx, shader, matrix, tm);
}
virtual ~GrRadialGradient() { }
@@ -453,11 +452,10 @@
private:
GrRadialGradient(GrContext* ctx,
- GrProcessorDataManager* procDataManager,
const SkRadialGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm)
- : INHERITED(ctx, procDataManager, shader, matrix, tm) {
+ : INHERITED(ctx, shader, matrix, tm) {
this->initClassID<GrRadialGradient>();
}
@@ -492,7 +490,7 @@
colors, stops, colorCount,
tm));
const GrFragmentProcessor* fp = shader->asFragmentProcessor(d->fContext,
- GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality, d->fProcDataManager);
+ GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality);
GrAlwaysAssert(fp);
return fp;
}
@@ -515,8 +513,7 @@
GrContext* context,
const SkMatrix& viewM,
const SkMatrix* localMatrix,
- SkFilterQuality,
- GrProcessorDataManager* procDataManager) const {
+ SkFilterQuality) const {
SkASSERT(context);
SkMatrix matrix;
@@ -532,7 +529,7 @@
}
matrix.postConcat(fPtsToUnit);
SkAutoTUnref<const GrFragmentProcessor> inner(
- GrRadialGradient::Create(context, procDataManager, *this, matrix, fTileMode));
+ GrRadialGradient::Create(context, *this, matrix, fTileMode));
return GrFragmentProcessor::MulOutputByInputAlpha(inner);
}
diff --git a/src/effects/gradients/SkRadialGradient.h b/src/effects/gradients/SkRadialGradient.h
index 2d4052b..afffddd 100644
--- a/src/effects/gradients/SkRadialGradient.h
+++ b/src/effects/gradients/SkRadialGradient.h
@@ -33,8 +33,7 @@
const GrFragmentProcessor* asFragmentProcessor(GrContext*,
const SkMatrix& viewM,
const SkMatrix*,
- SkFilterQuality,
- GrProcessorDataManager*) const override;
+ SkFilterQuality) const override;
#endif
SK_TO_STRING_OVERRIDE()
diff --git a/src/effects/gradients/SkSweepGradient.cpp b/src/effects/gradients/SkSweepGradient.cpp
index 7e57ebe..5fcb083 100644
--- a/src/effects/gradients/SkSweepGradient.cpp
+++ b/src/effects/gradients/SkSweepGradient.cpp
@@ -191,9 +191,9 @@
class GrSweepGradient : public GrGradientEffect {
public:
- static GrFragmentProcessor* Create(GrContext* ctx, GrProcessorDataManager* procDataManager,
- const SkSweepGradient& shader, const SkMatrix& m) {
- return new GrSweepGradient(ctx, procDataManager, shader, m);
+ static GrFragmentProcessor* Create(GrContext* ctx, const SkSweepGradient& shader,
+ const SkMatrix& m) {
+ return new GrSweepGradient(ctx, shader, m);
}
virtual ~GrSweepGradient() { }
@@ -201,10 +201,9 @@
private:
GrSweepGradient(GrContext* ctx,
- GrProcessorDataManager* procDataManager,
const SkSweepGradient& shader,
const SkMatrix& matrix)
- : INHERITED(ctx, procDataManager, shader, matrix, SkShader::kClamp_TileMode) {
+ : INHERITED(ctx, shader, matrix, SkShader::kClamp_TileMode) {
this->initClassID<GrSweepGradient>();
}
@@ -238,8 +237,7 @@
colors, stops, colorCount));
const GrFragmentProcessor* fp = shader->asFragmentProcessor(d->fContext,
GrTest::TestMatrix(d->fRandom),
- NULL, kNone_SkFilterQuality,
- d->fProcDataManager);
+ NULL, kNone_SkFilterQuality);
GrAlwaysAssert(fp);
return fp;
}
@@ -273,8 +271,7 @@
GrContext* context,
const SkMatrix& viewM,
const SkMatrix* localMatrix,
- SkFilterQuality,
- GrProcessorDataManager* procDataManager) const {
+ SkFilterQuality) const {
SkMatrix matrix;
if (!this->getLocalMatrix().invert(&matrix)) {
@@ -290,7 +287,7 @@
matrix.postConcat(fPtsToUnit);
SkAutoTUnref<const GrFragmentProcessor> inner(
- GrSweepGradient::Create(context, procDataManager, *this, matrix));
+ GrSweepGradient::Create(context, *this, matrix));
return GrFragmentProcessor::MulOutputByInputAlpha(inner);
}
diff --git a/src/effects/gradients/SkSweepGradient.h b/src/effects/gradients/SkSweepGradient.h
index 5b9d24f..728a014 100644
--- a/src/effects/gradients/SkSweepGradient.h
+++ b/src/effects/gradients/SkSweepGradient.h
@@ -34,8 +34,7 @@
const GrFragmentProcessor* asFragmentProcessor(GrContext*,
const SkMatrix& viewM,
const SkMatrix*,
- SkFilterQuality,
- GrProcessorDataManager*) const override;
+ SkFilterQuality) const override;
#endif
SK_TO_STRING_OVERRIDE()
diff --git a/src/effects/gradients/SkTwoPointConicalGradient.cpp b/src/effects/gradients/SkTwoPointConicalGradient.cpp
index 05957d6..790e115 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient.cpp
+++ b/src/effects/gradients/SkTwoPointConicalGradient.cpp
@@ -364,13 +364,11 @@
GrContext* context,
const SkMatrix& viewM,
const SkMatrix* localMatrix,
- SkFilterQuality,
- GrProcessorDataManager* procDataManager) const {
+ SkFilterQuality) const {
SkASSERT(context);
SkASSERT(fPtsToUnit.isIdentity());
SkAutoTUnref<const GrFragmentProcessor> inner(
- Gr2PtConicalGradientEffect::Create(context, procDataManager, *this, fTileMode,
- localMatrix));
+ Gr2PtConicalGradientEffect::Create(context, *this, fTileMode, localMatrix));
return GrFragmentProcessor::MulOutputByInputAlpha(inner);
}
diff --git a/src/effects/gradients/SkTwoPointConicalGradient.h b/src/effects/gradients/SkTwoPointConicalGradient.h
index 7801945..117e6e9 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient.h
+++ b/src/effects/gradients/SkTwoPointConicalGradient.h
@@ -63,8 +63,7 @@
const GrFragmentProcessor* asFragmentProcessor(GrContext*,
const SkMatrix&,
const SkMatrix*,
- SkFilterQuality,
- GrProcessorDataManager*) const override;
+ SkFilterQuality) const override;
#endif
bool isOpaque() const override;
diff --git a/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp b/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp
index c88e756..17f3267 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp
+++ b/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp
@@ -59,11 +59,10 @@
public:
static GrFragmentProcessor* Create(GrContext* ctx,
- GrProcessorDataManager* procDataManager,
const SkTwoPointConicalGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm) {
- return new Edge2PtConicalEffect(ctx, procDataManager, shader, matrix, tm);
+ return new Edge2PtConicalEffect(ctx, shader, matrix, tm);
}
virtual ~Edge2PtConicalEffect() {}
@@ -91,11 +90,10 @@
}
Edge2PtConicalEffect(GrContext* ctx,
- GrProcessorDataManager* procDataManager,
const SkTwoPointConicalGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm)
- : INHERITED(ctx, procDataManager, shader, matrix, tm),
+ : INHERITED(ctx, shader, matrix, tm),
fCenterX1(shader.getCenterX1()),
fRadius0(shader.getStartRadius()),
fDiffRadius(shader.getDiffRadius()){
@@ -210,7 +208,7 @@
colors, stops, colorCount,
tm));
const GrFragmentProcessor* fp = shader->asFragmentProcessor(d->fContext,
- GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality, d->fProcDataManager);
+ GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality);
GrAlwaysAssert(fp);
return fp;
}
@@ -368,12 +366,11 @@
public:
static GrFragmentProcessor* Create(GrContext* ctx,
- GrProcessorDataManager* procDataManager,
const SkTwoPointConicalGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm,
SkScalar focalX) {
- return new FocalOutside2PtConicalEffect(ctx, procDataManager, shader, matrix, tm, focalX);
+ return new FocalOutside2PtConicalEffect(ctx, shader, matrix, tm, focalX);
}
virtual ~FocalOutside2PtConicalEffect() { }
@@ -398,12 +395,11 @@
}
FocalOutside2PtConicalEffect(GrContext* ctx,
- GrProcessorDataManager* procDataManager,
const SkTwoPointConicalGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm,
SkScalar focalX)
- : INHERITED(ctx, procDataManager, shader, matrix, tm)
+ : INHERITED(ctx, shader, matrix, tm)
, fFocalX(focalX)
, fIsFlipped(shader.isFlippedGrad()) {
this->initClassID<FocalOutside2PtConicalEffect>();
@@ -486,7 +482,7 @@
colors, stops, colorCount,
tm));
const GrFragmentProcessor* fp = shader->asFragmentProcessor(d->fContext,
- GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality, d->fProcDataManager);
+ GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality);
GrAlwaysAssert(fp);
return fp;
}
@@ -579,12 +575,11 @@
public:
static GrFragmentProcessor* Create(GrContext* ctx,
- GrProcessorDataManager* procDataManager,
const SkTwoPointConicalGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm,
SkScalar focalX) {
- return new FocalInside2PtConicalEffect(ctx, procDataManager, shader, matrix, tm, focalX);
+ return new FocalInside2PtConicalEffect(ctx, shader, matrix, tm, focalX);
}
virtual ~FocalInside2PtConicalEffect() {}
@@ -609,12 +604,11 @@
}
FocalInside2PtConicalEffect(GrContext* ctx,
- GrProcessorDataManager* procDataManager,
const SkTwoPointConicalGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm,
SkScalar focalX)
- : INHERITED(ctx, procDataManager, shader, matrix, tm), fFocalX(focalX) {
+ : INHERITED(ctx, shader, matrix, tm), fFocalX(focalX) {
this->initClassID<FocalInside2PtConicalEffect>();
}
@@ -694,7 +688,7 @@
colors, stops, colorCount,
tm));
const GrFragmentProcessor* fp = shader->asFragmentProcessor(d->fContext,
- GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality, d->fProcDataManager);
+ GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality);
GrAlwaysAssert(fp);
return fp;
}
@@ -814,12 +808,11 @@
public:
static GrFragmentProcessor* Create(GrContext* ctx,
- GrProcessorDataManager* procDataManager,
const SkTwoPointConicalGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm,
const CircleConicalInfo& info) {
- return new CircleInside2PtConicalEffect(ctx, procDataManager, shader, matrix, tm, info);
+ return new CircleInside2PtConicalEffect(ctx, shader, matrix, tm, info);
}
virtual ~CircleInside2PtConicalEffect() {}
@@ -848,12 +841,11 @@
}
CircleInside2PtConicalEffect(GrContext* ctx,
- GrProcessorDataManager* procDataManager,
const SkTwoPointConicalGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm,
const CircleConicalInfo& info)
- : INHERITED(ctx, procDataManager, shader, matrix, tm), fInfo(info) {
+ : INHERITED(ctx, shader, matrix, tm), fInfo(info) {
this->initClassID<CircleInside2PtConicalEffect>();
}
@@ -937,7 +929,7 @@
colors, stops, colorCount,
tm));
const GrFragmentProcessor* fp = shader->asFragmentProcessor(d->fContext,
- GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality, d->fProcDataManager);
+ GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality);
GrAlwaysAssert(fp);
return fp;
}
@@ -1026,12 +1018,11 @@
public:
static GrFragmentProcessor* Create(GrContext* ctx,
- GrProcessorDataManager* procDataManager,
const SkTwoPointConicalGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm,
const CircleConicalInfo& info) {
- return new CircleOutside2PtConicalEffect(ctx, procDataManager, shader, matrix, tm, info);
+ return new CircleOutside2PtConicalEffect(ctx, shader, matrix, tm, info);
}
virtual ~CircleOutside2PtConicalEffect() {}
@@ -1063,12 +1054,11 @@
}
CircleOutside2PtConicalEffect(GrContext* ctx,
- GrProcessorDataManager* procDataManager,
const SkTwoPointConicalGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm,
const CircleConicalInfo& info)
- : INHERITED(ctx, procDataManager, shader, matrix, tm), fInfo(info) {
+ : INHERITED(ctx, shader, matrix, tm), fInfo(info) {
this->initClassID<CircleOutside2PtConicalEffect>();
if (shader.getStartRadius() != shader.getEndRadius()) {
fTLimit = shader.getStartRadius() / (shader.getStartRadius() - shader.getEndRadius());
@@ -1165,8 +1155,7 @@
colors, stops, colorCount,
tm));
const GrFragmentProcessor* fp = shader->asFragmentProcessor(
- d->fContext,GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality,
- d->fProcDataManager);
+ d->fContext,GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality);
GrAlwaysAssert(fp);
return fp;
}
@@ -1278,7 +1267,6 @@
//////////////////////////////////////////////////////////////////////////////
GrFragmentProcessor* Gr2PtConicalGradientEffect::Create(GrContext* ctx,
- GrProcessorDataManager* procDataManager,
const SkTwoPointConicalGradient& shader,
SkShader::TileMode tm,
const SkMatrix* localMatrix) {
@@ -1298,14 +1286,12 @@
SkScalar focalX;
ConicalType type = set_matrix_focal_conical(shader, &matrix, &focalX);
if (type == kInside_ConicalType) {
- return FocalInside2PtConicalEffect::Create(ctx, procDataManager, shader, matrix, tm,
- focalX);
+ return FocalInside2PtConicalEffect::Create(ctx, shader, matrix, tm, focalX);
} else if(type == kEdge_ConicalType) {
set_matrix_edge_conical(shader, &matrix);
- return Edge2PtConicalEffect::Create(ctx, procDataManager, shader, matrix, tm);
+ return Edge2PtConicalEffect::Create(ctx, shader, matrix, tm);
} else {
- return FocalOutside2PtConicalEffect::Create(ctx, procDataManager, shader, matrix, tm,
- focalX);
+ return FocalOutside2PtConicalEffect::Create(ctx, shader, matrix, tm, focalX);
}
}
@@ -1313,14 +1299,12 @@
ConicalType type = set_matrix_circle_conical(shader, &matrix, &info);
if (type == kInside_ConicalType) {
- return CircleInside2PtConicalEffect::Create(ctx, procDataManager, shader, matrix, tm,
- info);
+ return CircleInside2PtConicalEffect::Create(ctx, shader, matrix, tm, info);
} else if (type == kEdge_ConicalType) {
set_matrix_edge_conical(shader, &matrix);
- return Edge2PtConicalEffect::Create(ctx, procDataManager, shader, matrix, tm);
+ return Edge2PtConicalEffect::Create(ctx, shader, matrix, tm);
} else {
- return CircleOutside2PtConicalEffect::Create(ctx, procDataManager, shader, matrix, tm,
- info);
+ return CircleOutside2PtConicalEffect::Create(ctx, shader, matrix, tm, info);
}
}
diff --git a/src/effects/gradients/SkTwoPointConicalGradient_gpu.h b/src/effects/gradients/SkTwoPointConicalGradient_gpu.h
index 3ab5b29..601a166 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient_gpu.h
+++ b/src/effects/gradients/SkTwoPointConicalGradient_gpu.h
@@ -18,8 +18,7 @@
* Creates an effect that produces a two point conical gradient based on the
* shader passed in.
*/
- GrFragmentProcessor* Create(GrContext* ctx,GrProcessorDataManager* procDataManager,
- const SkTwoPointConicalGradient& shader,
+ GrFragmentProcessor* Create(GrContext* ctx, const SkTwoPointConicalGradient& shader,
SkShader::TileMode tm, const SkMatrix* localMatrix);
};
diff --git a/src/gpu/GrBlurUtils.cpp b/src/gpu/GrBlurUtils.cpp
index 463691d..a396c33 100644
--- a/src/gpu/GrBlurUtils.cpp
+++ b/src/gpu/GrBlurUtils.cpp
@@ -36,9 +36,8 @@
matrix.setTranslate(-maskRect.fLeft, -maskRect.fTop);
matrix.postIDiv(mask->width(), mask->height());
- grp->addCoverageFragmentProcessor(GrSimpleTextureEffect::Create(grp->getProcessorDataManager(),
- mask, matrix,
- kDevice_GrCoordSet))->unref();
+ grp->addCoverageFragmentProcessor(GrSimpleTextureEffect::Create(mask, matrix,
+ kDevice_GrCoordSet))->unref();
SkMatrix inverse;
if (!viewMatrix.invert(&inverse)) {
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
index 0f85517..dadd2ea 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -47,8 +47,7 @@
SkIRect domainTexels = SkIRect::MakeWH(devBound.width(), devBound.height());
// This could be a long-lived effect that is cached with the alpha-mask.
arfps->addCoverageFragmentProcessor(
- GrTextureDomainEffect::Create(arfps->getProcessorDataManager(),
- result,
+ GrTextureDomainEffect::Create(result,
mat,
GrTextureDomain::MakeTexelDomain(result, domainTexels),
GrTextureDomain::kDecal_Mode,
@@ -481,8 +480,7 @@
sampleM.setIDiv(srcMask->width(), srcMask->height());
pipelineBuilder->addCoverageFragmentProcessor(
- GrTextureDomainEffect::Create(pipelineBuilder->getProcessorDataManager(),
- srcMask,
+ GrTextureDomainEffect::Create(srcMask,
sampleM,
GrTextureDomain::MakeTexelDomain(srcMask, srcBound),
GrTextureDomain::kDecal_Mode,
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index b1959bb..c379bd6 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -387,8 +387,8 @@
textureMatrix.setIDiv(tempTexture->width(), tempTexture->height());
GrPaint paint;
if (applyPremulToSrc) {
- fp.reset(this->createUPMToPMEffect(paint.getProcessorDataManager(), tempTexture,
- tempDrawInfo.fSwapRAndB, textureMatrix));
+ fp.reset(this->createUPMToPMEffect(tempTexture, tempDrawInfo.fSwapRAndB,
+ textureMatrix));
// If premultiplying was the only reason for the draw, fall back to a straight write.
if (!fp) {
if (GrGpu::kCallerPrefersDraw_DrawPreference == drawPreference) {
@@ -400,8 +400,7 @@
}
if (tempTexture) {
if (!fp) {
- fp.reset(GrConfigConversionEffect::Create(
- paint.getProcessorDataManager(), tempTexture, tempDrawInfo.fSwapRAndB,
+ fp.reset(GrConfigConversionEffect::Create(tempTexture, tempDrawInfo.fSwapRAndB,
GrConfigConversionEffect::kNone_PMConversion, textureMatrix));
if (!fp) {
return false;
@@ -525,8 +524,7 @@
GrPaint paint;
SkAutoTUnref<const GrFragmentProcessor> fp;
if (unpremul) {
- fp.reset(this->createPMToUPMEffect(
- paint.getProcessorDataManager(), src->asTexture(), tempDrawInfo.fSwapRAndB,
+ fp.reset(this->createPMToUPMEffect(src->asTexture(), tempDrawInfo.fSwapRAndB,
textureMatrix));
if (fp) {
unpremul = false; // we no longer need to do this on CPU after the read back.
@@ -537,8 +535,7 @@
}
}
if (!fp && temp) {
- fp.reset(GrConfigConversionEffect::Create(
- paint.getProcessorDataManager(), src->asTexture(), tempDrawInfo.fSwapRAndB,
+ fp.reset(GrConfigConversionEffect::Create(src->asTexture(), tempDrawInfo.fSwapRAndB,
GrConfigConversionEffect::kNone_PMConversion, textureMatrix));
}
if (fp) {
@@ -714,8 +711,7 @@
}
}
-const GrFragmentProcessor* GrContext::createPMToUPMEffect(GrProcessorDataManager* procDataManager,
- GrTexture* texture,
+const GrFragmentProcessor* GrContext::createPMToUPMEffect(GrTexture* texture,
bool swapRAndB,
const SkMatrix& matrix) const {
// We should have already called this->testPMConversionsIfNecessary().
@@ -723,15 +719,13 @@
GrConfigConversionEffect::PMConversion pmToUPM =
static_cast<GrConfigConversionEffect::PMConversion>(fPMToUPMConversion);
if (GrConfigConversionEffect::kNone_PMConversion != pmToUPM) {
- return GrConfigConversionEffect::Create(procDataManager, texture, swapRAndB, pmToUPM,
- matrix);
+ return GrConfigConversionEffect::Create(texture, swapRAndB, pmToUPM, matrix);
} else {
return nullptr;
}
}
-const GrFragmentProcessor* GrContext::createUPMToPMEffect(GrProcessorDataManager* procDataManager,
- GrTexture* texture,
+const GrFragmentProcessor* GrContext::createUPMToPMEffect(GrTexture* texture,
bool swapRAndB,
const SkMatrix& matrix) const {
// We should have already called this->testPMConversionsIfNecessary().
@@ -739,8 +733,7 @@
GrConfigConversionEffect::PMConversion upmToPM =
static_cast<GrConfigConversionEffect::PMConversion>(fUPMToPMConversion);
if (GrConfigConversionEffect::kNone_PMConversion != upmToPM) {
- return GrConfigConversionEffect::Create(procDataManager, texture, swapRAndB, upmToPM,
- matrix);
+ return GrConfigConversionEffect::Create(texture, swapRAndB, upmToPM, matrix);
} else {
return nullptr;
}
diff --git a/src/gpu/GrPaint.cpp b/src/gpu/GrPaint.cpp
index 4a9f417..6f218a4 100644
--- a/src/gpu/GrPaint.cpp
+++ b/src/gpu/GrPaint.cpp
@@ -22,26 +22,24 @@
}
void GrPaint::addColorTextureProcessor(GrTexture* texture, const SkMatrix& matrix) {
- this->addColorFragmentProcessor(GrSimpleTextureEffect::Create(&fProcDataManager, texture,
- matrix))->unref();
+ this->addColorFragmentProcessor(GrSimpleTextureEffect::Create(texture, matrix))->unref();
}
void GrPaint::addCoverageTextureProcessor(GrTexture* texture, const SkMatrix& matrix) {
- this->addCoverageFragmentProcessor(GrSimpleTextureEffect::Create(&fProcDataManager, texture,
- matrix))->unref();
+ this->addCoverageFragmentProcessor(GrSimpleTextureEffect::Create(texture, matrix))->unref();
}
void GrPaint::addColorTextureProcessor(GrTexture* texture,
const SkMatrix& matrix,
const GrTextureParams& params) {
- this->addColorFragmentProcessor(GrSimpleTextureEffect::Create(&fProcDataManager, texture,
+ this->addColorFragmentProcessor(GrSimpleTextureEffect::Create(texture,
matrix, params))->unref();
}
void GrPaint::addCoverageTextureProcessor(GrTexture* texture,
const SkMatrix& matrix,
const GrTextureParams& params) {
- this->addCoverageFragmentProcessor(GrSimpleTextureEffect::Create(&fProcDataManager, texture,
+ this->addCoverageFragmentProcessor(GrSimpleTextureEffect::Create(texture,
matrix, params))->unref();
}
diff --git a/src/gpu/GrPipelineBuilder.h b/src/gpu/GrPipelineBuilder.h
index e2a7bc7..e329bc5 100644
--- a/src/gpu/GrPipelineBuilder.h
+++ b/src/gpu/GrPipelineBuilder.h
@@ -13,7 +13,6 @@
#include "GrClip.h"
#include "GrGpuResourceRef.h"
#include "GrProcOptInfo.h"
-#include "GrProcessorDataManager.h"
#include "GrRenderTarget.h"
#include "GrStencil.h"
#include "GrXferProcessor.h"
@@ -80,34 +79,30 @@
* Creates a GrSimpleTextureEffect that uses local coords as texture coordinates.
*/
void addColorTextureProcessor(GrTexture* texture, const SkMatrix& matrix) {
- this->addColorFragmentProcessor(GrSimpleTextureEffect::Create(&fProcDataManager, texture,
- matrix))->unref();
+ this->addColorFragmentProcessor(GrSimpleTextureEffect::Create(texture, matrix))->unref();
}
void addCoverageTextureProcessor(GrTexture* texture, const SkMatrix& matrix) {
- this->addCoverageFragmentProcessor(GrSimpleTextureEffect::Create(&fProcDataManager, texture,
- matrix))->unref();
+ this->addCoverageFragmentProcessor(GrSimpleTextureEffect::Create(texture, matrix))->unref();
}
void addColorTextureProcessor(GrTexture* texture,
const SkMatrix& matrix,
const GrTextureParams& params) {
- this->addColorFragmentProcessor(GrSimpleTextureEffect::Create(&fProcDataManager, texture,
- matrix,
+ this->addColorFragmentProcessor(GrSimpleTextureEffect::Create(texture, matrix,
params))->unref();
}
void addCoverageTextureProcessor(GrTexture* texture,
const SkMatrix& matrix,
const GrTextureParams& params) {
- this->addCoverageFragmentProcessor(GrSimpleTextureEffect::Create(&fProcDataManager, texture,
- matrix, params))->unref();
+ this->addCoverageFragmentProcessor(GrSimpleTextureEffect::Create(texture, matrix,
+ params))->unref();
}
/**
* When this object is destroyed it will remove any color/coverage FPs from the pipeline builder
- * and also remove any additions to the GrProcessorDataManager that were added after its
- * constructor.
+ * that were added after its constructor.
* This class can transiently modify its "const" GrPipelineBuilder object but will restore it
* when done - so it is notionally "const" correct.
*/
@@ -131,12 +126,8 @@
bool isSet() const { return SkToBool(fPipelineBuilder); }
- GrProcessorDataManager* getProcessorDataManager() {
- SkASSERT(this->isSet());
- return fPipelineBuilder->getProcessorDataManager();
- }
-
- const GrFragmentProcessor* addCoverageFragmentProcessor(const GrFragmentProcessor* processor) {
+ const GrFragmentProcessor* addCoverageFragmentProcessor(
+ const GrFragmentProcessor* processor) {
SkASSERT(this->isSet());
return fPipelineBuilder->addCoverageFragmentProcessor(processor);
}
@@ -389,9 +380,6 @@
void setClip(const GrClip& clip) { fClip = clip; }
const GrClip& clip() const { return fClip; }
- GrProcessorDataManager* getProcessorDataManager() { return &fProcDataManager; }
- const GrProcessorDataManager* processorDataManager() const { return &fProcDataManager; }
-
private:
// Calculating invariant color / coverage information is expensive, so we partially cache the
// results.
@@ -412,7 +400,6 @@
typedef SkSTArray<4, const GrFragmentProcessor*, true> FragmentProcessorArray;
- GrProcessorDataManager fProcDataManager;
SkAutoTUnref<GrRenderTarget> fRenderTarget;
uint32_t fFlags;
GrStencilSettings fStencilSettings;
diff --git a/src/gpu/GrProcessorDataManager.cpp b/src/gpu/GrProcessorDataManager.cpp
deleted file mode 100644
index addf4d8..0000000
--- a/src/gpu/GrProcessorDataManager.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
- * Copyright 2015 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "GrProcessorDataManager.h"
diff --git a/src/gpu/GrSWMaskHelper.cpp b/src/gpu/GrSWMaskHelper.cpp
index e5ee52c..6692e3d 100644
--- a/src/gpu/GrSWMaskHelper.cpp
+++ b/src/gpu/GrSWMaskHelper.cpp
@@ -367,8 +367,7 @@
maskMatrix.preTranslate(SkIntToScalar(-rect.fLeft), SkIntToScalar(-rect.fTop));
pipelineBuilder->addCoverageFragmentProcessor(
- GrSimpleTextureEffect::Create(pipelineBuilder->getProcessorDataManager(),
- texture,
+ GrSimpleTextureEffect::Create(texture,
maskMatrix,
GrTextureParams::kNone_FilterMode,
kDevice_GrCoordSet))->unref();
diff --git a/src/gpu/GrYUVProvider.cpp b/src/gpu/GrYUVProvider.cpp
index 0994911..071cd4d 100644
--- a/src/gpu/GrYUVProvider.cpp
+++ b/src/gpu/GrYUVProvider.cpp
@@ -122,8 +122,7 @@
GrPaint paint;
SkAutoTUnref<GrFragmentProcessor> yuvToRgbProcessor(
- GrYUVtoRGBEffect::Create(paint.getProcessorDataManager(),
- yuvTextures[0],
+ GrYUVtoRGBEffect::Create(yuvTextures[0],
yuvTextures[1],
yuvTextures[2],
yuvInfo.fSize,
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index e2feefc..1af4929 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -996,12 +996,9 @@
// Create and insert texture effect
SkAutoTUnref<const GrFragmentProcessor> fp;
if (doBicubic) {
- fp.reset(GrBicubicEffect::Create(grPaint.getProcessorDataManager(), texture,
- SkMatrix::I(),
- tm));
+ fp.reset(GrBicubicEffect::Create(texture, SkMatrix::I(), tm));
} else {
- fp.reset(GrSimpleTextureEffect::Create(grPaint.getProcessorDataManager(), texture,
- SkMatrix::I(), params));
+ fp.reset(GrSimpleTextureEffect::Create(texture, SkMatrix::I(), params));
}
if (kAlpha_8_SkColorType == bitmapPtr->colorType()) {
@@ -1330,11 +1327,9 @@
}
textureDomain.setLTRB(left, top, right, bottom);
if (bicubic) {
- fp.reset(GrBicubicEffect::Create(grPaint.getProcessorDataManager(), texture,
- SkMatrix::I(), textureDomain));
+ fp.reset(GrBicubicEffect::Create(texture, SkMatrix::I(), textureDomain));
} else {
- fp.reset(GrTextureDomainEffect::Create(grPaint.getProcessorDataManager(),
- texture,
+ fp.reset(GrTextureDomainEffect::Create(texture,
SkMatrix::I(),
textureDomain,
GrTextureDomain::kClamp_Mode,
@@ -1343,11 +1338,9 @@
} else if (bicubic) {
SkASSERT(GrTextureParams::kNone_FilterMode == params.filterMode());
SkShader::TileMode tileModes[2] = { params.getTileModeX(), params.getTileModeY() };
- fp.reset(GrBicubicEffect::Create(grPaint.getProcessorDataManager(), texture, SkMatrix::I(),
- tileModes));
+ fp.reset(GrBicubicEffect::Create(texture, SkMatrix::I(), tileModes));
} else {
- fp.reset(GrSimpleTextureEffect::Create(grPaint.getProcessorDataManager(), texture,
- SkMatrix::I(), params));
+ fp.reset(GrSimpleTextureEffect::Create(texture, SkMatrix::I(), params));
}
if (kAlpha_8_SkColorType == bitmap.colorType()) {
@@ -1432,7 +1425,7 @@
GrPaint grPaint;
SkAutoTUnref<const GrFragmentProcessor> fp(
- GrSimpleTextureEffect::Create(grPaint.getProcessorDataManager(), texture, SkMatrix::I()));
+ GrSimpleTextureEffect::Create(texture, SkMatrix::I()));
if (alphaOnly) {
fp.reset(GrFragmentProcessor::MulOutputByInputUnpremulColor(fp));
} else {
@@ -1551,7 +1544,7 @@
GrPaint grPaint;
SkAutoTUnref<const GrFragmentProcessor> fp(
- GrSimpleTextureEffect::Create(grPaint.getProcessorDataManager(), devTex, SkMatrix::I()));
+ GrSimpleTextureEffect::Create(devTex, SkMatrix::I()));
if (GrPixelConfigIsAlphaOnly(devTex->config())) {
// Can this happen?
fp.reset(GrFragmentProcessor::MulOutputByInputUnpremulColor(fp));
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
index ce1ce32..cff6172 100644
--- a/src/gpu/SkGr.cpp
+++ b/src/gpu/SkGr.cpp
@@ -703,8 +703,7 @@
shaderFP = *shaderProcessor;
} else if (const SkShader* shader = skPaint.getShader()) {
aufp.reset(shader->asFragmentProcessor(context, viewM, nullptr,
- skPaint.getFilterQuality(),
- grPaint->getProcessorDataManager()));
+ skPaint.getFilterQuality()));
shaderFP = aufp;
if (!shaderFP) {
return false;
@@ -792,7 +791,7 @@
grPaint->setColor(SkColorToPremulGrColor(colorFilter->filterColor(skPaint.getColor())));
} else {
SkAutoTUnref<const GrFragmentProcessor> cfFP(
- colorFilter->asFragmentProcessor(context, grPaint->getProcessorDataManager()));
+ colorFilter->asFragmentProcessor(context));
if (cfFP) {
grPaint->addColorFragmentProcessor(cfFP);
} else {
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
diff --git a/src/image/SkImageShader.cpp b/src/image/SkImageShader.cpp
index fde0f0c..6c82fa9 100644
--- a/src/image/SkImageShader.cpp
+++ b/src/image/SkImageShader.cpp
@@ -85,8 +85,7 @@
const GrFragmentProcessor* SkImageShader::asFragmentProcessor(GrContext* context,
const SkMatrix& viewM,
const SkMatrix* localMatrix,
- SkFilterQuality filterQuality,
- GrProcessorDataManager* mgr) const {
+ SkFilterQuality filterQuality) const {
SkMatrix matrix;
matrix.setIDiv(fImage->width(), fImage->height());
@@ -130,9 +129,9 @@
SkAutoTUnref<GrFragmentProcessor> inner;
if (doBicubic) {
- inner.reset(GrBicubicEffect::Create(mgr, texture, matrix, tm));
+ inner.reset(GrBicubicEffect::Create(texture, matrix, tm));
} else {
- inner.reset(GrSimpleTextureEffect::Create(mgr, texture, matrix, params));
+ inner.reset(GrSimpleTextureEffect::Create(texture, matrix, params));
}
if (GrPixelConfigIsAlphaOnly(texture->config())) {
diff --git a/src/image/SkImageShader.h b/src/image/SkImageShader.h
index fdd7976..e209b35 100644
--- a/src/image/SkImageShader.h
+++ b/src/image/SkImageShader.h
@@ -23,8 +23,7 @@
#if SK_SUPPORT_GPU
const GrFragmentProcessor* asFragmentProcessor(GrContext*, const SkMatrix& viewM,
- const SkMatrix*, SkFilterQuality,
- GrProcessorDataManager*) const override;
+ const SkMatrix*, SkFilterQuality) const override;
#endif
protected:
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp
index e6af326..00b5c35 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -297,8 +297,7 @@
GrPaint paint;
paint.setPorterDuffXPFactory(SkXfermode::kSrc_Mode);
- paint.addColorFragmentProcessor(GrYUVtoRGBEffect::Create(paint.getProcessorDataManager(),
- yTex, uTex, vTex, yuvSizes,
+ paint.addColorFragmentProcessor(GrYUVtoRGBEffect::Create(yTex, uTex, vTex, yuvSizes,
colorSpace))->unref();
const SkRect rect = SkRect::MakeWH(SkIntToScalar(dstDesc.fWidth),