aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-10-06 08:40:50 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-10-06 08:40:51 -0700
commit4a339529612a43871d021877e58698e067d6c4cd (patch)
treea46e5271f68b194f4351271c1faa65568c9606fd
parente1f829699958b673dfe196c80d17a55d18d0fc4b (diff)
Bye bye processor data manager.
-rw-r--r--gm/dcshader.cpp17
-rw-r--r--gm/texturedomaineffect.cpp3
-rw-r--r--gm/yuvtorgbeffect.cpp3
-rw-r--r--gyp/gpu.gypi2
-rw-r--r--include/core/SkColorFilter.h4
-rw-r--r--include/core/SkComposeShader.h3
-rw-r--r--include/core/SkImageFilter.h5
-rw-r--r--include/core/SkShader.h4
-rw-r--r--include/core/SkXfermode.h3
-rw-r--r--include/effects/SkColorCubeFilter.h3
-rw-r--r--include/effects/SkColorMatrixFilter.h3
-rw-r--r--include/effects/SkLumaColorFilter.h3
-rw-r--r--include/effects/SkMagnifierImageFilter.h4
-rw-r--r--include/effects/SkMatrixConvolutionImageFilter.h4
-rw-r--r--include/effects/SkModeColorFilter.h3
-rw-r--r--include/effects/SkPerlinNoiseShader.h3
-rw-r--r--include/gpu/GrContext.h12
-rw-r--r--include/gpu/GrPaint.h6
-rw-r--r--include/gpu/GrProcessorDataManager.h16
-rw-r--r--include/gpu/GrProcessorUnitTest.h3
-rw-r--r--src/core/SkBitmapProcShader.cpp7
-rw-r--r--src/core/SkBitmapProcShader.h3
-rw-r--r--src/core/SkColorFilter.cpp7
-rw-r--r--src/core/SkColorShader.h3
-rw-r--r--src/core/SkComposeShader.cpp12
-rw-r--r--src/core/SkImageFilter.cpp6
-rw-r--r--src/core/SkLightingShader.cpp18
-rw-r--r--src/core/SkLocalMatrixShader.h6
-rw-r--r--src/core/SkPictureShader.cpp5
-rw-r--r--src/core/SkPictureShader.h3
-rw-r--r--src/core/SkShader.cpp7
-rw-r--r--src/core/SkXfermode.cpp4
-rw-r--r--src/core/SkXfermode_proccoeff.h2
-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
-rw-r--r--src/gpu/GrBlurUtils.cpp5
-rw-r--r--src/gpu/GrClipMaskManager.cpp6
-rw-r--r--src/gpu/GrContext.cpp25
-rw-r--r--src/gpu/GrPaint.cpp10
-rw-r--r--src/gpu/GrPipelineBuilder.h29
-rw-r--r--src/gpu/GrProcessorDataManager.cpp8
-rw-r--r--src/gpu/GrSWMaskHelper.cpp3
-rw-r--r--src/gpu/GrYUVProvider.cpp3
-rw-r--r--src/gpu/SkGpuDevice.cpp23
-rw-r--r--src/gpu/SkGr.cpp5
-rw-r--r--src/gpu/effects/Gr1DKernelEffect.h5
-rw-r--r--src/gpu/effects/GrBicubicEffect.cpp13
-rw-r--r--src/gpu/effects/GrBicubicEffect.h34
-rw-r--r--src/gpu/effects/GrConfigConversionEffect.cpp22
-rw-r--r--src/gpu/effects/GrConfigConversionEffect.h7
-rw-r--r--src/gpu/effects/GrConvolutionEffect.cpp13
-rw-r--r--src/gpu/effects/GrConvolutionEffect.h18
-rw-r--r--src/gpu/effects/GrMatrixConvolutionEffect.cpp15
-rw-r--r--src/gpu/effects/GrMatrixConvolutionEffect.h13
-rw-r--r--src/gpu/effects/GrSimpleTextureEffect.cpp3
-rw-r--r--src/gpu/effects/GrSimpleTextureEffect.h26
-rw-r--r--src/gpu/effects/GrSingleTextureEffect.cpp9
-rw-r--r--src/gpu/effects/GrSingleTextureEffect.h9
-rw-r--r--src/gpu/effects/GrTextureDomain.cpp16
-rw-r--r--src/gpu/effects/GrTextureDomain.h6
-rw-r--r--src/gpu/effects/GrYUVtoRGBEffect.cpp25
-rw-r--r--src/gpu/effects/GrYUVtoRGBEffect.h6
-rw-r--r--src/image/SkImageShader.cpp7
-rw-r--r--src/image/SkImageShader.h3
-rw-r--r--src/image/SkImage_Gpu.cpp3
-rw-r--r--tests/GLProgramsTest.cpp7
-rw-r--r--tests/GpuColorFilterTest.cpp3
95 files changed, 340 insertions, 584 deletions
diff --git a/gm/dcshader.cpp b/gm/dcshader.cpp
index 60fdddd58c..967ff6bf95 100644
--- a/gm/dcshader.cpp
+++ b/gm/dcshader.cpp
@@ -37,8 +37,7 @@ public:
const GrFragmentProcessor* asFragmentProcessor(GrContext*,
const SkMatrix& viewM,
const SkMatrix* localMatrix,
- SkFilterQuality,
- GrProcessorDataManager*) const override;
+ SkFilterQuality) const override;
#ifndef SK_IGNORE_TO_STRING
void toString(SkString* str) const override {
@@ -58,7 +57,7 @@ SkFlattenable* DCShader::CreateProc(SkReadBuffer& buf) {
class DCFP : public GrFragmentProcessor {
public:
- DCFP(GrProcessorDataManager*, const SkMatrix& m) : fDeviceTransform(kDevice_GrCoordSet, m) {
+ DCFP(const SkMatrix& m) : fDeviceTransform(kDevice_GrCoordSet, m) {
this->addCoordTransform(&fDeviceTransform);
this->initClassID<DCFP>();
}
@@ -97,13 +96,11 @@ private:
GrCoordTransform fDeviceTransform;
};
-const GrFragmentProcessor* DCShader::asFragmentProcessor(
- GrContext*,
- const SkMatrix& viewM,
- const SkMatrix* localMatrix,
- SkFilterQuality,
- GrProcessorDataManager* procDataManager) const {
- SkAutoTUnref<const GrFragmentProcessor> inner(new DCFP(procDataManager, fDeviceMatrix));
+const GrFragmentProcessor* DCShader::asFragmentProcessor(GrContext*,
+ const SkMatrix& viewM,
+ const SkMatrix* localMatrix,
+ SkFilterQuality) const {
+ SkAutoTUnref<const GrFragmentProcessor> inner(new DCFP(fDeviceMatrix));
return GrFragmentProcessor::MulOutputByInputAlpha(inner);
}
diff --git a/gm/texturedomaineffect.cpp b/gm/texturedomaineffect.cpp
index 24e09db878..77b51dab0d 100644
--- a/gm/texturedomaineffect.cpp
+++ b/gm/texturedomaineffect.cpp
@@ -117,8 +117,7 @@ protected:
GrTextureDomain::Mode mode = (GrTextureDomain::Mode) m;
GrPipelineBuilder pipelineBuilder;
SkAutoTUnref<GrFragmentProcessor> fp(
- GrTextureDomainEffect::Create(pipelineBuilder.getProcessorDataManager(),
- texture, textureMatrices[tm],
+ GrTextureDomainEffect::Create(texture, textureMatrices[tm],
GrTextureDomain::MakeTexelDomain(texture,
texelDomains[d]),
mode, GrTextureParams::kNone_FilterMode));
diff --git a/gm/yuvtorgbeffect.cpp b/gm/yuvtorgbeffect.cpp
index b639ba337e..2fb3eec756 100644
--- a/gm/yuvtorgbeffect.cpp
+++ b/gm/yuvtorgbeffect.cpp
@@ -113,8 +113,7 @@ protected:
for (int i = 0; i < 6; ++i) {
GrPipelineBuilder pipelineBuilder;
SkAutoTUnref<GrFragmentProcessor> fp(
- GrYUVtoRGBEffect::Create(pipelineBuilder.getProcessorDataManager(),
- texture[indices[i][0]],
+ GrYUVtoRGBEffect::Create(texture[indices[i][0]],
texture[indices[i][1]],
texture[indices[i][2]],
sizes,
diff --git a/gyp/gpu.gypi b/gyp/gpu.gypi
index 1025a1e458..ddb663c38d 100644
--- a/gyp/gpu.gypi
+++ b/gyp/gpu.gypi
@@ -27,7 +27,6 @@
'<(skia_include_path)/gpu/GrPaint.h',
'<(skia_include_path)/gpu/GrPathRendererChain.h',
'<(skia_include_path)/gpu/GrProcessor.h',
- '<(skia_include_path)/gpu/GrProcessorDataManager.h',
'<(skia_include_path)/gpu/GrProcessorUnitTest.h',
'<(skia_include_path)/gpu/GrProgramElement.h',
'<(skia_include_path)/gpu/GrGpuResourceRef.h',
@@ -135,7 +134,6 @@
'<(skia_src_path)/gpu/GrProgramDesc.h',
'<(skia_src_path)/gpu/GrProgramElement.cpp',
'<(skia_src_path)/gpu/GrProcessor.cpp',
- '<(skia_src_path)/gpu/GrProcessorDataManager.cpp',
'<(skia_src_path)/gpu/GrProcessorUnitTest.cpp',
'<(skia_src_path)/gpu/GrProcOptInfo.cpp',
'<(skia_src_path)/gpu/GrProcOptInfo.h',
diff --git a/include/core/SkColorFilter.h b/include/core/SkColorFilter.h
index a5a1a4c0cc..57650fbd98 100644
--- a/include/core/SkColorFilter.h
+++ b/include/core/SkColorFilter.h
@@ -15,7 +15,6 @@
class GrContext;
class GrFragmentProcessor;
-class GrProcessorDataManager;
class SkBitmap;
/**
@@ -132,8 +131,7 @@ public:
*
* A null return indicates that the color filter isn't implemented for the GPU backend.
*/
- virtual const GrFragmentProcessor* asFragmentProcessor(GrContext*,
- GrProcessorDataManager*) const {
+ virtual const GrFragmentProcessor* asFragmentProcessor(GrContext*) const {
return nullptr;
}
diff --git a/include/core/SkComposeShader.h b/include/core/SkComposeShader.h
index 41be197eb7..bc9d932ee5 100644
--- a/include/core/SkComposeShader.h
+++ b/include/core/SkComposeShader.h
@@ -40,8 +40,7 @@ public:
const GrFragmentProcessor* asFragmentProcessor(GrContext*,
const SkMatrix& viewM,
const SkMatrix* localMatrix,
- SkFilterQuality,
- GrProcessorDataManager*) const override;
+ SkFilterQuality) const override;
#endif
class ComposeShaderContext : public SkShader::Context {
diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h
index 1ca1c01c08..30265e4fdd 100644
--- a/include/core/SkImageFilter.h
+++ b/include/core/SkImageFilter.h
@@ -16,7 +16,6 @@
#include "SkSurfaceProps.h"
class GrFragmentProcessor;
-class GrProcessorDataManager;
class GrTexture;
class SkBaseDevice;
class SkBitmap;
@@ -363,8 +362,8 @@ protected:
* will be called with (NULL, NULL, SkMatrix::I()) to query for support,
* so returning "true" indicates support for all possible matrices.
*/
- virtual bool asFragmentProcessor(GrFragmentProcessor**, GrProcessorDataManager*, GrTexture*,
- const SkMatrix&, const SkIRect& bounds) const;
+ virtual bool asFragmentProcessor(GrFragmentProcessor**, GrTexture*, const SkMatrix&,
+ const SkIRect& bounds) const;
/**
* Returns true if this filter can cause transparent black pixels to become
diff --git a/include/core/SkShader.h b/include/core/SkShader.h
index 1b33ccf951..34cb648022 100644
--- a/include/core/SkShader.h
+++ b/include/core/SkShader.h
@@ -20,7 +20,6 @@ class SkPicture;
class SkXfermode;
class GrContext;
class GrFragmentProcessor;
-class GrProcessorDataManager;
/** \class SkShader
*
@@ -322,8 +321,7 @@ public:
virtual const GrFragmentProcessor* asFragmentProcessor(GrContext*,
const SkMatrix& viewMatrix,
const SkMatrix* localMatrix,
- SkFilterQuality,
- GrProcessorDataManager*) const;
+ SkFilterQuality) const;
/**
* If the shader can represent its "average" luminance in a single color, return true and
diff --git a/include/core/SkXfermode.h b/include/core/SkXfermode.h
index a438c5b4ca..0880f1403c 100644
--- a/include/core/SkXfermode.h
+++ b/include/core/SkXfermode.h
@@ -14,7 +14,6 @@
#include "SkColor.h"
class GrFragmentProcessor;
-class GrProcessorDataManager;
class GrTexture;
class GrXPFactory;
class SkString;
@@ -201,7 +200,7 @@ public:
It is legal for the function to succeed but return a null output. This indicates that
the output of the blend is simply the src color.
*/
- virtual bool asFragmentProcessor(const GrFragmentProcessor** output, GrProcessorDataManager*,
+ virtual bool asFragmentProcessor(const GrFragmentProcessor** output,
const GrFragmentProcessor* dst) const;
/** A subclass may implement this factory function to work with the GPU backend. It is legal
diff --git a/include/effects/SkColorCubeFilter.h b/include/effects/SkColorCubeFilter.h
index eab308e0cf..f4a0c9009d 100644
--- a/include/effects/SkColorCubeFilter.h
+++ b/include/effects/SkColorCubeFilter.h
@@ -25,8 +25,7 @@ public:
uint32_t getFlags() const override;
#if SK_SUPPORT_GPU
- const GrFragmentProcessor* asFragmentProcessor(GrContext*,
- GrProcessorDataManager*) const override;
+ const GrFragmentProcessor* asFragmentProcessor(GrContext*) const override;
#endif
SK_TO_STRING_OVERRIDE()
diff --git a/include/effects/SkColorMatrixFilter.h b/include/effects/SkColorMatrixFilter.h
index 8c6edba77f..bd2b939a43 100644
--- a/include/effects/SkColorMatrixFilter.h
+++ b/include/effects/SkColorMatrixFilter.h
@@ -26,8 +26,7 @@ public:
SkColorFilter* newComposed(const SkColorFilter*) const override;
#if SK_SUPPORT_GPU
- const GrFragmentProcessor* asFragmentProcessor(GrContext*,
- GrProcessorDataManager*) const override;
+ const GrFragmentProcessor* asFragmentProcessor(GrContext*) const override;
#endif
struct State {
diff --git a/include/effects/SkLumaColorFilter.h b/include/effects/SkLumaColorFilter.h
index f9c3f0858c..8dd519af4a 100644
--- a/include/effects/SkLumaColorFilter.h
+++ b/include/effects/SkLumaColorFilter.h
@@ -28,8 +28,7 @@ public:
void filterSpan(const SkPMColor src[], int count, SkPMColor[]) const override;
#if SK_SUPPORT_GPU
- const GrFragmentProcessor* asFragmentProcessor(GrContext*,
- GrProcessorDataManager*) const override;
+ const GrFragmentProcessor* asFragmentProcessor(GrContext*) const override;
#endif
SK_TO_STRING_OVERRIDE()
diff --git a/include/effects/SkMagnifierImageFilter.h b/include/effects/SkMagnifierImageFilter.h
index b89cd346d2..af142e9eff 100644
--- a/include/effects/SkMagnifierImageFilter.h
+++ b/include/effects/SkMagnifierImageFilter.h
@@ -26,8 +26,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:
diff --git a/include/effects/SkMatrixConvolutionImageFilter.h b/include/effects/SkMatrixConvolutionImageFilter.h
index 016dab6588..76349f430c 100644
--- a/include/effects/SkMatrixConvolutionImageFilter.h
+++ b/include/effects/SkMatrixConvolutionImageFilter.h
@@ -83,8 +83,8 @@ protected:
#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:
diff --git a/include/effects/SkModeColorFilter.h b/include/effects/SkModeColorFilter.h
index 51f79f05e8..0c876aef0b 100644
--- a/include/effects/SkModeColorFilter.h
+++ b/include/effects/SkModeColorFilter.h
@@ -39,8 +39,7 @@ public:
#endif
#if SK_SUPPORT_GPU
- const GrFragmentProcessor* asFragmentProcessor(GrContext*,
- GrProcessorDataManager*) const override;
+ const GrFragmentProcessor* asFragmentProcessor(GrContext*) const override;
#endif
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkModeColorFilter)
diff --git a/include/effects/SkPerlinNoiseShader.h b/include/effects/SkPerlinNoiseShader.h
index 1caece6f20..0cb1b47a9f 100644
--- a/include/effects/SkPerlinNoiseShader.h
+++ b/include/effects/SkPerlinNoiseShader.h
@@ -98,8 +98,7 @@ public:
#if SK_SUPPORT_GPU
const GrFragmentProcessor* asFragmentProcessor(GrContext* context, const SkMatrix& viewM,
- const SkMatrix*, SkFilterQuality,
- GrProcessorDataManager*) const override;
+ const SkMatrix*, SkFilterQuality) const override;
#endif
SK_TO_STRING_OVERRIDE()
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 51879e0626..b79ab640a4 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -470,13 +470,13 @@ private:
* of effects that make a readToUPM->writeToPM->readToUPM cycle invariant. Otherwise, they
* return NULL.
*/
- const GrFragmentProcessor* createPMToUPMEffect(GrProcessorDataManager*, GrTexture*,
- bool swapRAndB, const SkMatrix&) const;
- const GrFragmentProcessor* createUPMToPMEffect(GrProcessorDataManager*, GrTexture*,
- bool swapRAndB, const SkMatrix&) const;
+ const GrFragmentProcessor* createPMToUPMEffect(GrTexture*, bool swapRAndB,
+ const SkMatrix&) const;
+ const GrFragmentProcessor* createUPMToPMEffect(GrTexture*, bool swapRAndB,
+ const SkMatrix&) const;
/** Called before either of the above two functions to determine the appropriate fragment
- processors for conversions. This must be called by readSurfacePixels befor a mutex is taken,
- since testingvPM conversions itself will call readSurfacePixels */
+ processors for conversions. This must be called by readSurfacePixels before a mutex is
+ taken, since testingvPM conversions itself will call readSurfacePixels */
void testPMConversionsIfNecessary(uint32_t flags);
/** Returns true if we've already determined that createPMtoUPMEffect and createUPMToPMEffect
will fail. In such cases fall back to SW conversion. */
diff --git a/include/gpu/GrPaint.h b/include/gpu/GrPaint.h
index d52c6baec9..9d0fe5575e 100644
--- a/include/gpu/GrPaint.h
+++ b/include/gpu/GrPaint.h
@@ -11,7 +11,6 @@
#define GrPaint_DEFINED
#include "GrColor.h"
-#include "GrProcessorDataManager.h"
#include "GrXferProcessor.h"
#include "effects/GrPorterDuffXferProcessor.h"
#include "GrFragmentProcessor.h"
@@ -141,10 +140,6 @@ public:
*/
bool isConstantBlendedColor(GrColor* constantColor) const;
- GrProcessorDataManager* getProcessorDataManager() { return &fProcDataManager; }
-
- const GrProcessorDataManager* processorDataManager() const { return &fProcDataManager; }
-
private:
void resetFragmentProcessors() {
for (int i = 0; i < fColorFragmentProcessors.count(); ++i) {
@@ -164,7 +159,6 @@ private:
bool fAntiAlias;
GrColor fColor;
- GrProcessorDataManager fProcDataManager;
};
#endif
diff --git a/include/gpu/GrProcessorDataManager.h b/include/gpu/GrProcessorDataManager.h
deleted file mode 100644
index edec39f517..0000000000
--- a/include/gpu/GrProcessorDataManager.h
+++ /dev/null
@@ -1,16 +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.
- */
-
-#ifndef GrProcessorDataManager_DEFINED
-#define GrProcessorDataManager_DEFINED
-
-// TODO this class is just an empty stub for now
-
-class GrProcessorDataManager {
-};
-
-#endif
diff --git a/include/gpu/GrProcessorUnitTest.h b/include/gpu/GrProcessorUnitTest.h
index b18c7072fd..8f4e84e161 100644
--- a/include/gpu/GrProcessorUnitTest.h
+++ b/include/gpu/GrProcessorUnitTest.h
@@ -41,19 +41,16 @@ const GrFragmentProcessor* CreateChildFP(GrProcessorTestData*);
struct GrProcessorTestData {
GrProcessorTestData(SkRandom* random,
GrContext* context,
- GrProcessorDataManager* procDataManager,
const GrCaps* caps,
GrTexture* textures[2])
: fRandom(random)
, fContext(context)
- , fProcDataManager(procDataManager)
, fCaps(caps) {
fTextures[0] = textures[0];
fTextures[1] = textures[1];
}
SkRandom* fRandom;
GrContext* fContext;
- GrProcessorDataManager* fProcDataManager;
const GrCaps* fCaps;
GrTexture* fTextures[2];
};
diff --git a/src/core/SkBitmapProcShader.cpp b/src/core/SkBitmapProcShader.cpp
index 602e4e3e83..b3bbb72314 100644
--- a/src/core/SkBitmapProcShader.cpp
+++ b/src/core/SkBitmapProcShader.cpp
@@ -360,8 +360,7 @@ void SkBitmapProcShader::toString(SkString* str) const {
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 @@ const GrFragmentProcessor* SkBitmapProcShader::asFragmentProcessor(GrContext* co
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 85e1fd07fe..b69b028616 100644
--- a/src/core/SkBitmapProcShader.h
+++ b/src/core/SkBitmapProcShader.h
@@ -30,8 +30,7 @@ public:
#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 25e6b2ea73..031f376eee 100644
--- a/src/core/SkColorFilter.cpp
+++ b/src/core/SkColorFilter.cpp
@@ -69,10 +69,9 @@ public:
#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 b5902b41e1..e3fddb231a 100644
--- a/src/core/SkColorShader.h
+++ b/src/core/SkColorShader.h
@@ -51,8 +51,7 @@ public:
#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 024064b50a..0dc0da68ef 100644
--- a/src/core/SkComposeShader.cpp
+++ b/src/core/SkComposeShader.cpp
@@ -204,9 +204,7 @@ void SkComposeShader::ComposeShaderContext::shadeSpan(int x, int y, SkPMColor re
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 @@ const GrFragmentProcessor* SkComposeShader::asFragmentProcessor(GrContext* conte
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 ffb1f836d8..2920714f88 100644
--- a/src/core/SkImageFilter.cpp
+++ b/src/core/SkImageFilter.cpp
@@ -307,7 +307,7 @@ bool SkImageFilter::onFilterImage(Proxy*, const SkBitmap&, const Context&,
}
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 @@ bool SkImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const Cont
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 @@ bool SkImageFilter::onFilterBounds(const SkIRect& src, const SkMatrix& ctm,
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 15b46149c9..3a1ea873b8 100644
--- a/src/core/SkLightingShader.cpp
+++ b/src/core/SkLightingShader.cpp
@@ -76,8 +76,7 @@ public:
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 @@ private:
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 @@ const GrFragmentProcessor* SkLightingShaderImpl::asFragmentProcessor(
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 @@ const GrFragmentProcessor* SkLightingShaderImpl::asFragmentProcessor(
}
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 a108259461..62654275f4 100644
--- a/src/core/SkLocalMatrixShader.h
+++ b/src/core/SkLocalMatrixShader.h
@@ -29,13 +29,13 @@ public:
#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 906313d819..4539dda224 100644
--- a/src/core/SkPictureShader.cpp
+++ b/src/core/SkPictureShader.cpp
@@ -318,8 +318,7 @@ const GrFragmentProcessor* SkPictureShader::asFragmentProcessor(
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 @@ const GrFragmentProcessor* SkPictureShader::asFragmentProcessor(
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 f0bad61ef5..2657bab74c 100644
--- a/src/core/SkPictureShader.h
+++ b/src/core/SkPictureShader.h
@@ -34,8 +34,7 @@ public:
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 6aadb4301a..0ec1433a90 100644
--- a/src/core/SkShader.cpp
+++ b/src/core/SkShader.cpp
@@ -211,8 +211,7 @@ SkShader::GradientType SkShader::asAGradient(GradientInfo* info) const {
}
const GrFragmentProcessor* SkShader::asFragmentProcessor(GrContext*, const SkMatrix&,
- const SkMatrix*, SkFilterQuality,
- GrProcessorDataManager*) const {
+ const SkMatrix*, SkFilterQuality) const {
return nullptr;
}
@@ -333,8 +332,8 @@ SkShader::GradientType SkColorShader::asAGradient(GradientInfo* info) const {
#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 3fb44b4d3b..9083814d1a 100644
--- a/src/core/SkXfermode.cpp
+++ b/src/core/SkXfermode.cpp
@@ -651,7 +651,7 @@ bool SkXfermode::asMode(Mode* mode) const {
return false;
}
-bool SkXfermode::asFragmentProcessor(const GrFragmentProcessor**, GrProcessorDataManager*,
+bool SkXfermode::asFragmentProcessor(const GrFragmentProcessor**,
const GrFragmentProcessor*) const {
return false;
}
@@ -923,11 +923,9 @@ void SkProcCoeffXfermode::xferA8(SkAlpha* SK_RESTRICT dst,
#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 e34f22a493..f86af2df01 100644
--- a/src/core/SkXfermode_proccoeff.h
+++ b/src/core/SkXfermode_proccoeff.h
@@ -44,7 +44,7 @@ public:
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 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);
};
diff --git a/src/gpu/GrBlurUtils.cpp b/src/gpu/GrBlurUtils.cpp
index 463691d7c9..a396c3340d 100644
--- a/src/gpu/GrBlurUtils.cpp
+++ b/src/gpu/GrBlurUtils.cpp
@@ -36,9 +36,8 @@ static bool draw_mask(GrDrawContext* drawContext,
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 0f85517a1d..dadd2ea7b2 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -47,8 +47,7 @@ void setup_drawstate_aaclip(const GrPipelineBuilder& pipelineBuilder,
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 @@ void GrClipMaskManager::mergeMask(GrPipelineBuilder* pipelineBuilder,
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 b1959bb9fd..c379bd611a 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -387,8 +387,8 @@ bool GrContext::writeSurfacePixels(GrSurface* surface,
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 @@ bool GrContext::writeSurfacePixels(GrSurface* surface,
}
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 @@ bool GrContext::readSurfacePixels(GrSurface* src,
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 @@ bool GrContext::readSurfacePixels(GrSurface* src,
}
}
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 @@ void GrContext::testPMConversionsIfNecessary(uint32_t flags) {
}
}
-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 @@ const GrFragmentProcessor* GrContext::createPMToUPMEffect(GrProcessorDataManager
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 @@ const GrFragmentProcessor* GrContext::createUPMToPMEffect(GrProcessorDataManager
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 4a9f417ff4..6f218a4b0b 100644
--- a/src/gpu/GrPaint.cpp
+++ b/src/gpu/GrPaint.cpp
@@ -22,26 +22,24 @@ void GrPaint::setCoverageSetOpXPFactory(SkRegion::Op regionOp, bool invertCovera
}
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 e2a7bc7e5f..e329bc5736 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 @@ public:
* 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 @@ public:
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 @@ public:
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 @@ private:
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 addf4d88bd..0000000000
--- 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 e5ee52c615..6692e3d833 100644
--- a/src/gpu/GrSWMaskHelper.cpp
+++ b/src/gpu/GrSWMaskHelper.cpp
@@ -367,8 +367,7 @@ void GrSWMaskHelper::DrawToTargetWithPathMask(GrTexture* texture,
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 09949113d7..071cd4d46d 100644
--- a/src/gpu/GrYUVProvider.cpp
+++ b/src/gpu/GrYUVProvider.cpp
@@ -122,8 +122,7 @@ GrTexture* GrYUVProvider::refAsTexture(GrContext* ctx, const GrSurfaceDesc& desc
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 e2feefc31e..1af4929ae4 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -996,12 +996,9 @@ static void draw_aa_bitmap(GrDrawContext* drawContext, GrContext* context,
// 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 @@ void SkGpuDevice::internalDrawBitmap(const SkBitmap& bitmap,
}
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 @@ void SkGpuDevice::internalDrawBitmap(const SkBitmap& bitmap,
} 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 @@ void SkGpuDevice::drawSprite(const SkDraw& draw, const SkBitmap& bitmap,
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 @@ void SkGpuDevice::drawDevice(const SkDraw& draw, SkBaseDevice* device,
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 ce1ce32eb3..cff61727d8 100644
--- a/src/gpu/SkGr.cpp
+++ b/src/gpu/SkGr.cpp
@@ -703,8 +703,7 @@ static inline bool skpaint_to_grpaint_impl(GrContext* context,
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 @@ static inline bool skpaint_to_grpaint_impl(GrContext* context,
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 0aec4b1336..3ceb75d4b6 100644
--- a/src/gpu/effects/Gr1DKernelEffect.h
+++ b/src/gpu/effects/Gr1DKernelEffect.h
@@ -28,11 +28,10 @@ public:
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 d8a9726030..afcb55e8e8 100644
--- a/src/gpu/effects/GrBicubicEffect.cpp
+++ b/src/gpu/effects/GrBicubicEffect.cpp
@@ -126,24 +126,21 @@ static inline void convert_row_major_scalar_coeffs_to_column_major_floats(float
}
}
-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 @@ const GrFragmentProcessor* GrBicubicEffect::TestCreate(GrProcessorTestData* d) {
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 18382a3a7d..9167b9cc6f 100644
--- a/src/gpu/effects/GrBicubicEffect.h
+++ b/src/gpu/effects/GrBicubicEffect.h
@@ -32,16 +32,15 @@ public:
/**
* 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 @@ public:
/**
* 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 @@ public:
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 042e5f8047..909e4614ef 100644
--- a/src/gpu/effects/GrConfigConversionEffect.cpp
+++ b/src/gpu/effects/GrConfigConversionEffect.cpp
@@ -96,12 +96,11 @@ private:
///////////////////////////////////////////////////////////////////////////////
-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 @@ const GrFragmentProcessor* GrConfigConversionEffect::TestCreate(GrProcessorTestD
} 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 @@ void GrConfigConversionEffect::TestForPreservingPMConversions(GrContext* context
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 @@ void GrConfigConversionEffect::TestForPreservingPMConversions(GrContext* context
}
}
-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 @@ const GrFragmentProcessor* GrConfigConversionEffect::Create(GrProcessorDataManag
// 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 @@ const GrFragmentProcessor* GrConfigConversionEffect::Create(GrProcessorDataManag
// 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 fc92a04257..cf2fea3640 100644
--- a/src/gpu/effects/GrConfigConversionEffect.h
+++ b/src/gpu/effects/GrConfigConversionEffect.h
@@ -33,8 +33,8 @@ public:
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 @@ public:
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 5fd62b8cdf..071106e0c8 100644
--- a/src/gpu/effects/GrConvolutionEffect.cpp
+++ b/src/gpu/effects/GrConvolutionEffect.cpp
@@ -145,14 +145,13 @@ void GrGLConvolutionEffect::GenKey(const GrProcessor& processor, const GrGLSLCap
///////////////////////////////////////////////////////////////////////////////
-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 @@ GrConvolutionEffect::GrConvolutionEffect(GrProcessorDataManager* procDataManager
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 @@ const GrFragmentProcessor* GrConvolutionEffect::TestCreate(GrProcessorTestData*
}
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 2cf36af537..9db173a8ca 100644
--- a/src/gpu/effects/GrConvolutionEffect.h
+++ b/src/gpu/effects/GrConvolutionEffect.h
@@ -21,27 +21,23 @@ class GrConvolutionEffect : public Gr1DKernelEffect {
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 @@ protected:
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 76fa6420ab..8de8580489 100644
--- a/src/gpu/effects/GrMatrixConvolutionEffect.cpp
+++ b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
@@ -129,8 +129,7 @@ void GrGLMatrixConvolutionEffect::onSetData(const GrGLProgramDataManager& pdman,
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 @@ GrMatrixConvolutionEffect::GrMatrixConvolutionEffect(GrProcessorDataManager* pro
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 @@ bool GrMatrixConvolutionEffect::onIsEqual(const GrFragmentProcessor& sBase) cons
// 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 @@ GrMatrixConvolutionEffect::CreateGaussian(GrProcessorDataManager* procDataManage
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 @@ const GrFragmentProcessor* GrMatrixConvolutionEffect::TestCreate(GrProcessorTest
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 0d6192db5d..3f16edb0ec 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 @@ public:
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 @@ public:
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 68e501c5aa..89b354632a 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.cpp
+++ b/src/gpu/effects/GrSimpleTextureEffect.cpp
@@ -72,6 +72,5 @@ const GrFragmentProcessor* GrSimpleTextureEffect::TestCreate(GrProcessorTestData
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 d99c30e9d0..4e5b421f3e 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.h
+++ b/src/gpu/effects/GrSimpleTextureEffect.h
@@ -21,29 +21,25 @@ class GrInvariantOutput;
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 @@ public:
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 e4e20a9d2f..c291735c0d 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 @@ GrSingleTextureEffect::GrSingleTextureEffect(GrProcessorDataManager* procDataMan
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 @@ GrSingleTextureEffect::GrSingleTextureEffect(GrProcessorDataManager* procDataMan
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 cd952c4fcd..9df0cffa5a 100644
--- a/src/gpu/effects/GrSingleTextureEffect.h
+++ b/src/gpu/effects/GrSingleTextureEffect.h
@@ -25,14 +25,11 @@ public:
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 93a548a047..bf8bb59205 100644
--- a/src/gpu/effects/GrTextureDomain.cpp
+++ b/src/gpu/effects/GrTextureDomain.cpp
@@ -215,8 +215,7 @@ void GrGLTextureDomainEffect::GenKey(const GrProcessor& processor, const GrGLSLC
///////////////////////////////////////////////////////////////////////////////
-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 @@ GrFragmentProcessor* GrTextureDomainEffect::Create(GrProcessorDataManager* procD
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 GrFragmentProcessor* GrTextureDomainEffect::TestCreate(GrProcessorTestData
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 f4c5e9cb06..f0d180da20 100644
--- a/src/gpu/effects/GrTextureDomain.h
+++ b/src/gpu/effects/GrTextureDomain.h
@@ -160,8 +160,7 @@ protected:
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 @@ protected:
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 ba975f7c02..a0ee114c34 100644
--- a/src/gpu/effects/GrYUVtoRGBEffect.cpp
+++ b/src/gpu/effects/GrYUVtoRGBEffect.cpp
@@ -17,9 +17,9 @@ namespace {
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 @@ public:
(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 @@ public:
};
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 @@ const GrGLfloat YUVtoRGBEffect::GLProcessor::kRec709ConversionMatrix[16] = {
//////////////////////////////////////////////////////////////////////////////
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 a7379a48d9..03679788dd 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 fde0f0c9d5..6c82fa91f8 100644
--- a/src/image/SkImageShader.cpp
+++ b/src/image/SkImageShader.cpp
@@ -85,8 +85,7 @@ void SkImageShader::toString(SkString* str) const {
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 @@ const GrFragmentProcessor* SkImageShader::asFragmentProcessor(GrContext* context
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 fdd7976aad..e209b35938 100644
--- a/src/image/SkImageShader.h
+++ b/src/image/SkImageShader.h
@@ -23,8 +23,7 @@ public:
#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 e6af3265b6..00b5c350a3 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -297,8 +297,7 @@ SkImage* SkImage::NewFromYUVTexturesCopy(GrContext* ctx , SkYUVColorSpace colorS
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),
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp
index a22927ee43..d4c35535bd 100644
--- a/tests/GLProgramsTest.cpp
+++ b/tests/GLProgramsTest.cpp
@@ -347,8 +347,7 @@ bool GrDrawTarget::programUnitTest(GrContext* context, int maxStages) {
SkAutoTUnref<GrDrawBatch> batch(GrRandomDrawBatch(&random, context));
SkASSERT(batch);
- GrProcessorDataManager procDataManager;
- GrProcessorTestData ptd(&random, context, &procDataManager, fGpu->caps(), dummyTextures);
+ GrProcessorTestData ptd(&random, context, fGpu->caps(), dummyTextures);
set_random_color_coverage_stages(&pipelineBuilder, &ptd, maxStages);
set_random_xpf(&pipelineBuilder, &ptd);
set_random_state(&pipelineBuilder, &random);
@@ -373,9 +372,7 @@ bool GrDrawTarget::programUnitTest(GrContext* context, int maxStages) {
for (int j = 0; j < 10; ++j) {
SkAutoTUnref<GrDrawBatch> batch(GrRandomDrawBatch(&random, context));
SkASSERT(batch);
- GrProcessorDataManager procDataManager;
- GrProcessorTestData ptd(&random, context, &procDataManager, this->caps(),
- dummyTextures);
+ GrProcessorTestData ptd(&random, context, this->caps(), dummyTextures);
GrPipelineBuilder builder;
builder.setXPFactory(GrPorterDuffXPFactory::Create(SkXfermode::kSrc_Mode))->unref();
builder.setRenderTarget(rt);
diff --git a/tests/GpuColorFilterTest.cpp b/tests/GpuColorFilterTest.cpp
index 543aefe517..c707380d55 100644
--- a/tests/GpuColorFilterTest.cpp
+++ b/tests/GpuColorFilterTest.cpp
@@ -102,8 +102,7 @@ static void test_getConstantColorComponents(skiatest::Reporter* reporter, GrCont
const GetConstantComponentTestCase& test = filterTests[i];
SkAutoTUnref<SkColorFilter> cf(
SkColorFilter::CreateModeFilter(test.filterColor, test.filterMode));
- SkAutoTUnref<const GrFragmentProcessor> fp(
- cf->asFragmentProcessor(grContext, paint.getProcessorDataManager()));
+ SkAutoTUnref<const GrFragmentProcessor> fp( cf->asFragmentProcessor(grContext));
REPORTER_ASSERT(reporter, fp);
GrInvariantOutput inout(test.inputColor,
static_cast<GrColorComponentFlags>(test.inputComponents),