aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects
diff options
context:
space:
mode:
Diffstat (limited to 'src/effects')
-rw-r--r--src/effects/SkAlphaThresholdFilter.cpp20
-rw-r--r--src/effects/SkArithmeticMode.cpp6
-rw-r--r--src/effects/SkArithmeticMode_gpu.cpp6
-rw-r--r--src/effects/SkArithmeticMode_gpu.h9
-rw-r--r--src/effects/SkBlurMaskFilter.cpp3
-rw-r--r--src/effects/SkColorCubeFilter.cpp3
-rw-r--r--src/effects/SkColorFilters.cpp3
-rw-r--r--src/effects/SkColorMatrixFilter.cpp3
-rw-r--r--src/effects/SkDisplacementMapEffect.cpp16
-rw-r--r--src/effects/SkGpuBlurUtils.cpp6
-rw-r--r--src/effects/SkLightingImageFilter.cpp68
-rw-r--r--src/effects/SkLumaColorFilter.cpp3
-rw-r--r--src/effects/SkMagnifierImageFilter.cpp17
-rw-r--r--src/effects/SkMatrixConvolutionImageFilter.cpp4
-rw-r--r--src/effects/SkMorphologyImageFilter.cpp35
-rw-r--r--src/effects/SkPerlinNoiseShader.cpp16
-rw-r--r--src/effects/SkTableColorFilter.cpp8
-rw-r--r--src/effects/SkXfermodeImageFilter.cpp7
-rw-r--r--src/effects/gradients/SkGradientShader.cpp1
-rw-r--r--src/effects/gradients/SkGradientShaderPriv.h1
-rw-r--r--src/effects/gradients/SkLinearGradient.cpp13
-rw-r--r--src/effects/gradients/SkLinearGradient.h3
-rw-r--r--src/effects/gradients/SkRadialGradient.cpp13
-rw-r--r--src/effects/gradients/SkRadialGradient.h3
-rw-r--r--src/effects/gradients/SkSweepGradient.cpp17
-rw-r--r--src/effects/gradients/SkSweepGradient.h3
-rw-r--r--src/effects/gradients/SkTwoPointConicalGradient.cpp6
-rw-r--r--src/effects/gradients/SkTwoPointConicalGradient.h3
-rw-r--r--src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp58
-rw-r--r--src/effects/gradients/SkTwoPointConicalGradient_gpu.h3
30 files changed, 134 insertions, 223 deletions
diff --git a/src/effects/SkAlphaThresholdFilter.cpp b/src/effects/SkAlphaThresholdFilter.cpp
index 066a91f9c5..95860acec9 100644
--- a/src/effects/SkAlphaThresholdFilter.cpp
+++ b/src/effects/SkAlphaThresholdFilter.cpp
@@ -28,8 +28,8 @@ protected:
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 @@ SkImageFilter* SkAlphaThresholdFilter::Create(const SkRegion& region,
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 @@ public:
float outerThreshold() const { return fOuterThreshold; }
private:
- AlphaThresholdEffect(GrProcessorDataManager*,
- GrTexture* texture,
+ AlphaThresholdEffect(GrTexture* texture,
GrTexture* maskTexture,
float innerThreshold,
float outerThreshold)
@@ -200,8 +197,7 @@ const GrFragmentProcessor* AlphaThresholdEffect::TestCreate(GrProcessorTestData*
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 @@ SkAlphaThresholdFilterImpl::SkAlphaThresholdFilterImpl(const SkRegion& region,
#if SK_SUPPORT_GPU
bool SkAlphaThresholdFilterImpl::asFragmentProcessor(GrFragmentProcessor** fp,
- GrProcessorDataManager* procDataManager,
GrTexture* texture,
const SkMatrix& in_matrix,
const SkIRect&) const {
@@ -292,8 +287,7 @@ bool SkAlphaThresholdFilterImpl::asFragmentProcessor(GrFragmentProcessor** fp,
}
}
- *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 35ac8a84ba..87af82efdb 100644
--- a/src/effects/SkArithmeticMode.cpp
+++ b/src/effects/SkArithmeticMode.cpp
@@ -31,7 +31,7 @@ public:
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 @@ SkXfermode* SkArithmeticMode::Create(SkScalar k1, SkScalar k2,
#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 ab447e7548..96e8c0db96 100644
--- a/src/effects/SkArithmeticMode_gpu.cpp
+++ b/src/effects/SkArithmeticMode_gpu.cpp
@@ -94,8 +94,8 @@ private:
///////////////////////////////////////////////////////////////////////////////
-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 @@ const GrFragmentProcessor* GrArithmeticFP::TestCreate(GrProcessorTestData* d) {
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 d415cc4a49..4810baed4a 100644
--- a/src/effects/SkArithmeticMode_gpu.h
+++ b/src/effects/SkArithmeticMode_gpu.h
@@ -31,10 +31,9 @@ class GrGLArtithmeticFP;
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 @@ private:
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 58242b7017..0a9520657d 100644
--- a/src/effects/SkBlurMaskFilter.cpp
+++ b/src/effects/SkBlurMaskFilter.cpp
@@ -1208,8 +1208,7 @@ bool SkBlurMaskFilterImpl::filterMaskGPU(GrTexture* src,
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 54c0e37a84..7cb41f312a 100644
--- a/src/effects/SkColorCubeFilter.cpp
+++ b/src/effects/SkColorCubeFilter.cpp
@@ -303,8 +303,7 @@ void GrColorCubeEffect::GLProcessor::GenKey(const GrProcessor& proc,
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 da01893b74..1e34b1e5c3 100644
--- a/src/effects/SkColorFilters.cpp
+++ b/src/effects/SkColorFilters.cpp
@@ -70,8 +70,7 @@ SkFlattenable* SkModeColorFilter::CreateProc(SkReadBuffer& buffer) {
#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 7c121b1b42..68150963c6 100644
--- a/src/effects/SkColorMatrixFilter.cpp
+++ b/src/effects/SkColorMatrixFilter.cpp
@@ -536,8 +536,7 @@ const GrFragmentProcessor* ColorMatrixEffect::TestCreate(GrProcessorTestData* d)
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 e87a871faf..17f96df750 100644
--- a/src/effects/SkDisplacementMapEffect.cpp
+++ b/src/effects/SkDisplacementMapEffect.cpp
@@ -328,14 +328,12 @@ private:
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 @@ private:
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 @@ bool SkDisplacementMapEffect::filterImageGPU(Proxy* proxy, const SkBitmap& src,
SkIntToScalar(colorOffset.fY - displacementOffset.fY));
paint.addColorFragmentProcessor(
- GrDisplacementMapEffect::Create(paint.getProcessorDataManager(),
- fXChannelSelector,
+ GrDisplacementMapEffect::Create(fXChannelSelector,
fYChannelSelector,
scale,
displacement,
@@ -469,7 +465,6 @@ bool SkDisplacementMapEffect::filterImageGPU(Proxy* proxy, const SkBitmap& src,
///////////////////////////////////////////////////////////////////////////////
GrDisplacementMapEffect::GrDisplacementMapEffect(
- GrProcessorDataManager*,
SkDisplacementMapEffect::ChannelSelectorType xChannelSelector,
SkDisplacementMapEffect::ChannelSelectorType yChannelSelector,
const SkVector& scale,
@@ -534,8 +529,7 @@ const GrFragmentProcessor* GrDisplacementMapEffect::TestCreate(GrProcessorTestDa
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 5690c2893f..0ebbfe45be 100644
--- a/src/effects/SkGpuBlurUtils.cpp
+++ b/src/effects/SkGpuBlurUtils.cpp
@@ -58,7 +58,7 @@ static void convolve_gaussian_1d(GrDrawContext* drawContext,
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 @@ static void convolve_gaussian_2d(GrDrawContext* drawContext,
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 @@ GrTexture* GaussianBlur(GrContext* context,
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 c46cc67e8c..32589e1826 100644
--- a/src/effects/SkLightingImageFilter.cpp
+++ b/src/effects/SkLightingImageFilter.cpp
@@ -321,8 +321,7 @@ protected:
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 @@ void SkLightingImageFilterInternal::drawRect(GrDrawContext* drawContext,
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 @@ protected:
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 @@ protected:
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 @@ private:
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 @@ private:
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 @@ private:
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 @@ private:
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 @@ private:
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 @@ void SkDiffuseLightingImageFilter::toString(SkString* str) const {
#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 @@ void SkSpecularLightingImageFilter::toString(SkString* str) const {
#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 @@ private:
///////////////////////////////////////////////////////////////////////////////
-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 @@ bool GrLightingEffect::onIsEqual(const GrFragmentProcessor& sBase) const {
///////////////////////////////////////////////////////////////////////////////
-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 @@ const GrFragmentProcessor* GrDiffuseLightingEffect::TestCreate(GrProcessorTestDa
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 @@ void GrGLDiffuseLightingEffect::onSetData(const GrGLProgramDataManager& pdman,
///////////////////////////////////////////////////////////////////////////////
-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 @@ const GrFragmentProcessor* GrSpecularLightingEffect::TestCreate(GrProcessorTestD
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 8c89ab0544..39d2bbf2ca 100644
--- a/src/effects/SkLumaColorFilter.cpp
+++ b/src/effects/SkLumaColorFilter.cpp
@@ -108,8 +108,7 @@ private:
}
};
-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 622144bfad..9138c867b5 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 @@ public:
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 @@ public:
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 @@ private:
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 @@ const GrFragmentProcessor* GrMagnifierEffect::TestCreate(GrProcessorTestData* d)
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 @@ SkMagnifierImageFilter::SkMagnifierImageFilter(const SkRect& srcRect, SkScalar i
#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 @@ bool SkMagnifierImageFilter::asFragmentProcessor(GrFragmentProcessor** fp,
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 499ba51224..b2780578e6 100644
--- a/src/effects/SkMatrixConvolutionImageFilter.cpp
+++ b/src/effects/SkMatrixConvolutionImageFilter.cpp
@@ -347,7 +347,6 @@ static GrTextureDomain::Mode convert_tilemodes(
}
bool SkMatrixConvolutionImageFilter::asFragmentProcessor(GrFragmentProcessor** fp,
- GrProcessorDataManager* procDataManager,
GrTexture* texture,
const SkMatrix&,
const SkIRect& bounds) const {
@@ -355,8 +354,7 @@ bool SkMatrixConvolutionImageFilter::asFragmentProcessor(GrFragmentProcessor** f
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 440d88d5bf..584cf1bf8c 100644
--- a/src/effects/SkMorphologyImageFilter.cpp
+++ b/src/effects/SkMorphologyImageFilter.cpp
@@ -205,15 +205,14 @@ public:
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 @@ private:
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 @@ void GrGLMorphologyEffect::onSetData(const GrGLProgramDataManager& pdman,
///////////////////////////////////////////////////////////////////////////////
-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 @@ const GrFragmentProcessor* GrMorphologyEffect::TestCreate(GrProcessorTestData* d
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 @@ void apply_morphology_rect(GrDrawContext* drawContext,
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 @@ void apply_morphology_rect_no_bounds(GrDrawContext* drawContext,
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 9a6c671de4..86463f62c3 100644
--- a/src/effects/SkPerlinNoiseShader.cpp
+++ b/src/effects/SkPerlinNoiseShader.cpp
@@ -510,13 +510,12 @@ private:
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 @@ private:
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 @@ const GrFragmentProcessor* GrPerlinNoiseEffect::TestCreate(GrProcessorTestData*
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 @@ const GrFragmentProcessor* SkPerlinNoiseShader::asFragmentProcessor(
GrContext* context,
const SkMatrix& viewM,
const SkMatrix* externalLocalMatrix,
- SkFilterQuality,
- GrProcessorDataManager* procDataManager) const {
+ SkFilterQuality) const {
SkASSERT(context);
SkMatrix localMatrix = this->getLocalMatrix();
@@ -955,8 +952,7 @@ const GrFragmentProcessor* SkPerlinNoiseShader::asFragmentProcessor(
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 57b2b1daa6..ceb666325b 100644
--- a/src/effects/SkTableColorFilter.cpp
+++ b/src/effects/SkTableColorFilter.cpp
@@ -48,8 +48,7 @@ public:
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 @@ const GrFragmentProcessor* ColorTableEffect::TestCreate(GrProcessorTestData* d)
(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 e357b0f23d..af74c220a3 100644
--- a/src/effects/SkXfermodeImageFilter.cpp
+++ b/src/effects/SkXfermodeImageFilter.cpp
@@ -124,7 +124,7 @@ void SkXfermodeImageFilter::toString(SkString* str) const {
#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 @@ bool SkXfermodeImageFilter::filterImageGPU(Proxy* proxy,
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 @@ bool SkXfermodeImageFilter::filterImageGPU(Proxy* proxy,
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 2f89352435..e25ec9e37f 100644
--- a/src/effects/gradients/SkGradientShader.cpp
+++ b/src/effects/gradients/SkGradientShader.cpp
@@ -1058,7 +1058,6 @@ void GrGLGradientEffect::emitColor(GrGLFPBuilder* builder,
/////////////////////////////////////////////////////////////////////
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 38b506be7e..f6e80d9238 100644
--- a/src/effects/gradients/SkGradientShaderPriv.h
+++ b/src/effects/gradients/SkGradientShaderPriv.h
@@ -327,7 +327,6 @@ class GrGradientEffect : public GrFragmentProcessor {
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 31fcd3fb7f..11c79f0956 100644
--- a/src/effects/gradients/SkLinearGradient.cpp
+++ b/src/effects/gradients/SkLinearGradient.cpp
@@ -468,11 +468,10 @@ class GrLinearGradient : public GrGradientEffect {
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 @@ public:
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 @@ const GrFragmentProcessor* GrLinearGradient::TestCreate(GrProcessorTestData* d)
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 @@ const GrFragmentProcessor* SkLinearGradient::asFragmentProcessor(
GrContext* context,
const SkMatrix& viewm,
const SkMatrix* localMatrix,
- SkFilterQuality,
- GrProcessorDataManager* procDataManager) const {
+ SkFilterQuality) const {
SkASSERT(context);
SkMatrix matrix;
@@ -560,7 +557,7 @@ const GrFragmentProcessor* SkLinearGradient::asFragmentProcessor(
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 af1088b369..488775ea93 100644
--- a/src/effects/gradients/SkLinearGradient.h
+++ b/src/effects/gradients/SkLinearGradient.h
@@ -33,8 +33,7 @@ public:
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 d402ad98da..de0f764a56 100644
--- a/src/effects/gradients/SkRadialGradient.cpp
+++ b/src/effects/gradients/SkRadialGradient.cpp
@@ -440,11 +440,10 @@ private:
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 @@ public:
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 @@ const GrFragmentProcessor* GrRadialGradient::TestCreate(GrProcessorTestData* d)
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 @@ const GrFragmentProcessor* SkRadialGradient::asFragmentProcessor(
GrContext* context,
const SkMatrix& viewM,
const SkMatrix* localMatrix,
- SkFilterQuality,
- GrProcessorDataManager* procDataManager) const {
+ SkFilterQuality) const {
SkASSERT(context);
SkMatrix matrix;
@@ -532,7 +529,7 @@ const GrFragmentProcessor* SkRadialGradient::asFragmentProcessor(
}
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 2d4052be14..afffddd22d 100644
--- a/src/effects/gradients/SkRadialGradient.h
+++ b/src/effects/gradients/SkRadialGradient.h
@@ -33,8 +33,7 @@ public:
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 7e57ebe2b4..5fcb083c40 100644
--- a/src/effects/gradients/SkSweepGradient.cpp
+++ b/src/effects/gradients/SkSweepGradient.cpp
@@ -191,9 +191,9 @@ private:
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 @@ public:
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 @@ const GrFragmentProcessor* GrSweepGradient::TestCreate(GrProcessorTestData* d) {
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 @@ const GrFragmentProcessor* SkSweepGradient::asFragmentProcessor(
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 @@ const GrFragmentProcessor* SkSweepGradient::asFragmentProcessor(
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 5b9d24f960..728a01474b 100644
--- a/src/effects/gradients/SkSweepGradient.h
+++ b/src/effects/gradients/SkSweepGradient.h
@@ -34,8 +34,7 @@ public:
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 05957d64a3..790e1153d8 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient.cpp
+++ b/src/effects/gradients/SkTwoPointConicalGradient.cpp
@@ -364,13 +364,11 @@ const GrFragmentProcessor* SkTwoPointConicalGradient::asFragmentProcessor(
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 7801945d0c..117e6e967d 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient.h
+++ b/src/effects/gradients/SkTwoPointConicalGradient.h
@@ -63,8 +63,7 @@ public:
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 c88e75692c..17f3267e8a 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp
+++ b/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp
@@ -59,11 +59,10 @@ class Edge2PtConicalEffect : public GrGradientEffect {
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 @@ private:
}
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 @@ const GrFragmentProcessor* Edge2PtConicalEffect::TestCreate(GrProcessorTestData*
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 @@ class FocalOutside2PtConicalEffect : public GrGradientEffect {
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 @@ private:
}
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 @@ const GrFragmentProcessor* FocalOutside2PtConicalEffect::TestCreate(GrProcessorT
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 @@ class FocalInside2PtConicalEffect : public GrGradientEffect {
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 @@ private:
}
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 @@ const GrFragmentProcessor* FocalInside2PtConicalEffect::TestCreate(GrProcessorTe
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 @@ class CircleInside2PtConicalEffect : public GrGradientEffect {
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 @@ private:
}
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 @@ const GrFragmentProcessor* CircleInside2PtConicalEffect::TestCreate(GrProcessorT
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 @@ class CircleOutside2PtConicalEffect : public GrGradientEffect {
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 @@ private:
}
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 @@ const GrFragmentProcessor* CircleOutside2PtConicalEffect::TestCreate(GrProcessor
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 @@ void GLCircleOutside2PtConicalEffect::GenKey(const GrProcessor& processor,
//////////////////////////////////////////////////////////////////////////////
GrFragmentProcessor* Gr2PtConicalGradientEffect::Create(GrContext* ctx,
- GrProcessorDataManager* procDataManager,
const SkTwoPointConicalGradient& shader,
SkShader::TileMode tm,
const SkMatrix* localMatrix) {
@@ -1298,14 +1286,12 @@ GrFragmentProcessor* Gr2PtConicalGradientEffect::Create(GrContext* ctx,
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 @@ GrFragmentProcessor* Gr2PtConicalGradientEffect::Create(GrContext* ctx,
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 3ab5b29745..601a1667c4 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient_gpu.h
+++ b/src/effects/gradients/SkTwoPointConicalGradient_gpu.h
@@ -18,8 +18,7 @@ namespace Gr2PtConicalGradientEffect {
* 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);
};