diff options
author | Ethan Nicholas <ethannicholas@google.com> | 2017-10-09 10:54:08 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-10-09 15:20:33 +0000 |
commit | abff956455637b12eab374fd44b99e1338799113 (patch) | |
tree | 77f932f38b3f00f904faeae1c847f1218f61d0c4 /src/effects | |
parent | 4e7cdd5a0052aa76bed6f80ec325be19e09e6ab1 (diff) |
initClassID no longer auto-allocates ids
Auto-allocated IDs mean that the IDs depend upon the order in which
classes happen to get initialized and are therefore not consistent
from run to run. This change paves the way for a persistent shader
cache by fixing the IDs in an enum.
Bug: skia:
Change-Id: I3e923c6c54f41b3b3eb616458abee83e0909c09f
Reviewed-on: https://skia-review.googlesource.com/56401
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/effects')
-rw-r--r-- | src/effects/GrAlphaThresholdFragmentProcessor.cpp | 3 | ||||
-rw-r--r-- | src/effects/GrAlphaThresholdFragmentProcessor.h | 3 | ||||
-rw-r--r-- | src/effects/GrCircleBlurFragmentProcessor.cpp | 3 | ||||
-rw-r--r-- | src/effects/GrCircleBlurFragmentProcessor.h | 4 | ||||
-rw-r--r-- | src/effects/SkArithmeticImageFilter.cpp | 3 | ||||
-rw-r--r-- | src/effects/SkBlurMaskFilter.cpp | 6 | ||||
-rw-r--r-- | src/effects/SkDisplacementMapEffect.cpp | 7 | ||||
-rw-r--r-- | src/effects/SkHighContrastFilter.cpp | 3 | ||||
-rw-r--r-- | src/effects/SkLightingImageFilter.cpp | 35 | ||||
-rw-r--r-- | src/effects/SkLumaColorFilter.cpp | 4 | ||||
-rw-r--r-- | src/effects/SkMagnifierImageFilter.cpp | 7 | ||||
-rw-r--r-- | src/effects/SkMorphologyImageFilter.cpp | 6 | ||||
-rw-r--r-- | src/effects/SkOverdrawColorFilter.cpp | 3 | ||||
-rw-r--r-- | src/effects/SkRRectsGaussianEdgeMaskFilter.cpp | 8 | ||||
-rw-r--r-- | src/effects/SkTableColorFilter.cpp | 4 |
15 files changed, 39 insertions, 60 deletions
diff --git a/src/effects/GrAlphaThresholdFragmentProcessor.cpp b/src/effects/GrAlphaThresholdFragmentProcessor.cpp index 34e9cdbb40..e1badf7f21 100644 --- a/src/effects/GrAlphaThresholdFragmentProcessor.cpp +++ b/src/effects/GrAlphaThresholdFragmentProcessor.cpp @@ -107,7 +107,7 @@ bool GrAlphaThresholdFragmentProcessor::onIsEqual(const GrFragmentProcessor& oth } GrAlphaThresholdFragmentProcessor::GrAlphaThresholdFragmentProcessor( const GrAlphaThresholdFragmentProcessor& src) - : INHERITED(src.optimizationFlags()) + : INHERITED(kGrAlphaThresholdFragmentProcessor_ClassID, src.optimizationFlags()) , fImage(src.fImage) , fColorXform(src.fColorXform) , fMask(src.fMask) @@ -115,7 +115,6 @@ GrAlphaThresholdFragmentProcessor::GrAlphaThresholdFragmentProcessor( , fOuterThreshold(src.fOuterThreshold) , fImageCoordTransform(src.fImageCoordTransform) , fMaskCoordTransform(src.fMaskCoordTransform) { - this->initClassID<GrAlphaThresholdFragmentProcessor>(); this->addTextureSampler(&fImage); this->addTextureSampler(&fMask); this->addCoordTransform(&fImageCoordTransform); diff --git a/src/effects/GrAlphaThresholdFragmentProcessor.h b/src/effects/GrAlphaThresholdFragmentProcessor.h index 3b649516c1..2d2b58aaee 100644 --- a/src/effects/GrAlphaThresholdFragmentProcessor.h +++ b/src/effects/GrAlphaThresholdFragmentProcessor.h @@ -44,7 +44,7 @@ private: sk_sp<GrColorSpaceXform> colorXform, sk_sp<GrTextureProxy> mask, float innerThreshold, float outerThreshold, const SkIRect& bounds) - : INHERITED(kNone_OptimizationFlags) + : INHERITED(kGrAlphaThresholdFragmentProcessor_ClassID, kNone_OptimizationFlags) , fImage(std::move(image)) , fColorXform(colorXform) , fMask(std::move(mask)) @@ -58,7 +58,6 @@ private: this->addTextureSampler(&fMask); this->addCoordTransform(&fImageCoordTransform); this->addCoordTransform(&fMaskCoordTransform); - this->initClassID<GrAlphaThresholdFragmentProcessor>(); } GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override; diff --git a/src/effects/GrCircleBlurFragmentProcessor.cpp b/src/effects/GrCircleBlurFragmentProcessor.cpp index 68955f22aa..5a825f49f5 100644 --- a/src/effects/GrCircleBlurFragmentProcessor.cpp +++ b/src/effects/GrCircleBlurFragmentProcessor.cpp @@ -318,12 +318,11 @@ bool GrCircleBlurFragmentProcessor::onIsEqual(const GrFragmentProcessor& other) } GrCircleBlurFragmentProcessor::GrCircleBlurFragmentProcessor( const GrCircleBlurFragmentProcessor& src) - : INHERITED(src.optimizationFlags()) + : INHERITED(kGrCircleBlurFragmentProcessor_ClassID, src.optimizationFlags()) , fCircleRect(src.fCircleRect) , fTextureRadius(src.fTextureRadius) , fSolidRadius(src.fSolidRadius) , fBlurProfileSampler(src.fBlurProfileSampler) { - this->initClassID<GrCircleBlurFragmentProcessor>(); this->addTextureSampler(&fBlurProfileSampler); } std::unique_ptr<GrFragmentProcessor> GrCircleBlurFragmentProcessor::clone() const { diff --git a/src/effects/GrCircleBlurFragmentProcessor.h b/src/effects/GrCircleBlurFragmentProcessor.h index e98714b4b0..6f209c99cc 100644 --- a/src/effects/GrCircleBlurFragmentProcessor.h +++ b/src/effects/GrCircleBlurFragmentProcessor.h @@ -31,13 +31,13 @@ private: GrCircleBlurFragmentProcessor(SkRect circleRect, float textureRadius, float solidRadius, sk_sp<GrTextureProxy> blurProfileSampler, GrResourceProvider* resourceProvider) - : INHERITED((OptimizationFlags)kCompatibleWithCoverageAsAlpha_OptimizationFlag) + : INHERITED(kGrCircleBlurFragmentProcessor_ClassID, + (OptimizationFlags)kCompatibleWithCoverageAsAlpha_OptimizationFlag) , fCircleRect(circleRect) , fTextureRadius(textureRadius) , fSolidRadius(solidRadius) , fBlurProfileSampler(std::move(blurProfileSampler)) { this->addTextureSampler(&fBlurProfileSampler); - this->initClassID<GrCircleBlurFragmentProcessor>(); } GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override; diff --git a/src/effects/SkArithmeticImageFilter.cpp b/src/effects/SkArithmeticImageFilter.cpp index 1bc3d06f22..27bf28e54b 100644 --- a/src/effects/SkArithmeticImageFilter.cpp +++ b/src/effects/SkArithmeticImageFilter.cpp @@ -350,13 +350,12 @@ private: // This could implement the const input -> const output optimization but it's unlikely to help. ArithmeticFP(float k1, float k2, float k3, float k4, bool enforcePMColor, std::unique_ptr<GrFragmentProcessor> dst) - : INHERITED(kNone_OptimizationFlags) + : INHERITED(kArithmeticFP_ClassID, kNone_OptimizationFlags) , fK1(k1) , fK2(k2) , fK3(k3) , fK4(k4) , fEnforcePMColor(enforcePMColor) { - this->initClassID<ArithmeticFP>(); SkASSERT(dst); SkDEBUGCODE(int dstIndex =) this->registerChildProcessor(std::move(dst)); SkASSERT(0 == dstIndex); diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp index 242b398db2..ca7de71914 100644 --- a/src/effects/SkBlurMaskFilter.cpp +++ b/src/effects/SkBlurMaskFilter.cpp @@ -974,12 +974,11 @@ sk_sp<GrTextureProxy> GrRectBlurEffect::CreateBlurProfileTexture( GrRectBlurEffect::GrRectBlurEffect(const SkRect& rect, float sigma, sk_sp<GrTextureProxy> blurProfile, GrSLPrecision precision) - : INHERITED(kCompatibleWithCoverageAsAlpha_OptimizationFlag) + : INHERITED(kGrRectBlurEffect_ClassID, kCompatibleWithCoverageAsAlpha_OptimizationFlag) , fRect(rect) , fSigma(sigma) , fBlurProfileSampler(std::move(blurProfile)) , fPrecision(precision) { - this->initClassID<GrRectBlurEffect>(); this->addTextureSampler(&fBlurProfileSampler); } @@ -1206,11 +1205,10 @@ std::unique_ptr<GrFragmentProcessor> GrRRectBlurEffect::Make(GrContext* context, GrRRectBlurEffect::GrRRectBlurEffect(float sigma, const SkRRect& rrect, sk_sp<GrTextureProxy> ninePatchProxy) - : INHERITED(kCompatibleWithCoverageAsAlpha_OptimizationFlag) + : INHERITED(kGrRRectBlurEffect_ClassID, kCompatibleWithCoverageAsAlpha_OptimizationFlag) , fRRect(rrect) , fSigma(sigma) , fNinePatchSampler(std::move(ninePatchProxy)) { - this->initClassID<GrRRectBlurEffect>(); this->addTextureSampler(&fNinePatchSampler); } diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp index 97d18315ca..67db24eedd 100644 --- a/src/effects/SkDisplacementMapEffect.cpp +++ b/src/effects/SkDisplacementMapEffect.cpp @@ -464,7 +464,7 @@ GrDisplacementMapEffect::GrDisplacementMapEffect( sk_sp<GrTextureProxy> color, sk_sp<GrColorSpaceXform> colorSpaceXform, const SkISize& colorDimensions) - : INHERITED(OptimizationFlags(color->config())) + : INHERITED(kGrDisplacementMapEffect_ClassID, OptimizationFlags(color->config())) , fDisplacementTransform(offsetMatrix, displacement.get()) , fDisplacementSampler(displacement) , fColorTransform(color.get()) @@ -475,7 +475,6 @@ GrDisplacementMapEffect::GrDisplacementMapEffect( , fXChannelSelector(xChannelSelector) , fYChannelSelector(yChannelSelector) , fScale(scale) { - this->initClassID<GrDisplacementMapEffect>(); this->addCoordTransform(&fDisplacementTransform); this->addTextureSampler(&fDisplacementSampler); this->addCoordTransform(&fColorTransform); @@ -483,7 +482,8 @@ GrDisplacementMapEffect::GrDisplacementMapEffect( } GrDisplacementMapEffect::GrDisplacementMapEffect(const GrDisplacementMapEffect& that) - : INHERITED(OptimizationFlags(that.fColorSampler.proxy()->config())) + : INHERITED(kGrDisplacementMapEffect_ClassID, + OptimizationFlags(that.fColorSampler.proxy()->config())) , fDisplacementTransform(that.fDisplacementTransform) , fDisplacementSampler(that.fDisplacementSampler) , fColorTransform(that.fColorTransform) @@ -493,7 +493,6 @@ GrDisplacementMapEffect::GrDisplacementMapEffect(const GrDisplacementMapEffect& , fXChannelSelector(that.fXChannelSelector) , fYChannelSelector(that.fYChannelSelector) , fScale(that.fScale) { - this->initClassID<GrDisplacementMapEffect>(); this->addCoordTransform(&fDisplacementTransform); this->addTextureSampler(&fDisplacementSampler); this->addCoordTransform(&fColorTransform); diff --git a/src/effects/SkHighContrastFilter.cpp b/src/effects/SkHighContrastFilter.cpp index 7618861c5f..1d67b3f182 100644 --- a/src/effects/SkHighContrastFilter.cpp +++ b/src/effects/SkHighContrastFilter.cpp @@ -179,9 +179,8 @@ public: private: HighContrastFilterEffect(const SkHighContrastConfig& config) - : INHERITED(kNone_OptimizationFlags) + : INHERITED(kHighContrastFilterEffect_ClassID, kNone_OptimizationFlags) , fConfig(config) { - this->initClassID<HighContrastFilterEffect>(); } GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp index 37f1c7bb05..8a8174a099 100644 --- a/src/effects/SkLightingImageFilter.cpp +++ b/src/effects/SkLightingImageFilter.cpp @@ -602,7 +602,7 @@ public: const GrTextureDomain& domain() const { return fDomain; } protected: - GrLightingEffect(sk_sp<GrTextureProxy>, sk_sp<const SkImageFilterLight> light, + GrLightingEffect(ClassID classID, sk_sp<GrTextureProxy>, sk_sp<const SkImageFilterLight> light, SkScalar surfaceScale, const SkMatrix& matrix, BoundaryMode boundaryMode, const SkIRect* srcBounds); @@ -1691,14 +1691,15 @@ static GrTextureDomain create_domain(GrTextureProxy* proxy, const SkIRect* srcBo } } -GrLightingEffect::GrLightingEffect(sk_sp<GrTextureProxy> proxy, +GrLightingEffect::GrLightingEffect(ClassID classID, + sk_sp<GrTextureProxy> proxy, sk_sp<const SkImageFilterLight> light, SkScalar surfaceScale, const SkMatrix& matrix, BoundaryMode boundaryMode, const SkIRect* srcBounds) // Perhaps this could advertise the opaque or coverage-as-alpha optimizations? - : INHERITED(kNone_OptimizationFlags) + : INHERITED(classID, kNone_OptimizationFlags) , fCoordTransform(proxy.get()) , fDomain(create_domain(proxy.get(), srcBounds, GrTextureDomain::kDecal_Mode)) , fTextureSampler(std::move(proxy)) @@ -1706,13 +1707,12 @@ GrLightingEffect::GrLightingEffect(sk_sp<GrTextureProxy> proxy, , fSurfaceScale(surfaceScale) , fFilterMatrix(matrix) , fBoundaryMode(boundaryMode) { - this->initClassID<GrLightingEffect>(); this->addCoordTransform(&fCoordTransform); this->addTextureSampler(&fTextureSampler); } GrLightingEffect::GrLightingEffect(const GrLightingEffect& that) - : INHERITED(that.optimizationFlags()) + : INHERITED(that.classID(), that.optimizationFlags()) , fCoordTransform(that.fCoordTransform) , fDomain(that.fDomain) , fTextureSampler(that.fTextureSampler) @@ -1720,7 +1720,6 @@ GrLightingEffect::GrLightingEffect(const GrLightingEffect& that) , fSurfaceScale(that.fSurfaceScale) , fFilterMatrix(that.fFilterMatrix) , fBoundaryMode(that.fBoundaryMode) { - this->initClassID<GrLightingEffect>(); this->addCoordTransform(&fCoordTransform); this->addTextureSampler(&fTextureSampler); } @@ -1741,16 +1740,12 @@ GrDiffuseLightingEffect::GrDiffuseLightingEffect(sk_sp<GrTextureProxy> proxy, SkScalar kd, BoundaryMode boundaryMode, const SkIRect* srcBounds) - : INHERITED(std::move(proxy), std::move(light), surfaceScale, matrix, boundaryMode, - srcBounds) - , fKD(kd) { - this->initClassID<GrDiffuseLightingEffect>(); -} + : INHERITED(kGrDiffuseLightingEffect_ClassID, std::move(proxy), std::move(light), + surfaceScale, matrix, boundaryMode, srcBounds) + , fKD(kd) {} GrDiffuseLightingEffect::GrDiffuseLightingEffect(const GrDiffuseLightingEffect& that) - : INHERITED(that), fKD(that.fKD) { - this->initClassID<GrDiffuseLightingEffect>(); -} + : INHERITED(that), fKD(that.fKD) {} bool GrDiffuseLightingEffect::onIsEqual(const GrFragmentProcessor& sBase) const { const GrDiffuseLightingEffect& s = sBase.cast<GrDiffuseLightingEffect>(); @@ -1986,17 +1981,13 @@ GrSpecularLightingEffect::GrSpecularLightingEffect(sk_sp<GrTextureProxy> proxy, SkScalar shininess, BoundaryMode boundaryMode, const SkIRect* srcBounds) - : INHERITED(std::move(proxy), std::move(light), surfaceScale, matrix, boundaryMode, - srcBounds) + : INHERITED(kGrSpecularLightingEffect_ClassID, std::move(proxy), std::move(light), + surfaceScale, matrix, boundaryMode, srcBounds) , fKS(ks) - , fShininess(shininess) { - this->initClassID<GrSpecularLightingEffect>(); -} + , fShininess(shininess) {} GrSpecularLightingEffect::GrSpecularLightingEffect(const GrSpecularLightingEffect& that) - : INHERITED(that), fKS(that.fKS), fShininess(that.fShininess) { - this->initClassID<GrSpecularLightingEffect>(); -} + : INHERITED(that), fKS(that.fKS), fShininess(that.fShininess) {} bool GrSpecularLightingEffect::onIsEqual(const GrFragmentProcessor& sBase) const { const GrSpecularLightingEffect& s = sBase.cast<GrSpecularLightingEffect>(); diff --git a/src/effects/SkLumaColorFilter.cpp b/src/effects/SkLumaColorFilter.cpp index ecd1a3a302..3b3845e46e 100644 --- a/src/effects/SkLumaColorFilter.cpp +++ b/src/effects/SkLumaColorFilter.cpp @@ -78,8 +78,8 @@ private: typedef GrGLSLFragmentProcessor INHERITED; }; - LumaColorFilterEffect() : INHERITED(kConstantOutputForConstantInput_OptimizationFlag) { - this->initClassID<LumaColorFilterEffect>(); + LumaColorFilterEffect() + : INHERITED(kLumaColorFilterEffect_ClassID, kConstantOutputForConstantInput_OptimizationFlag) { } GrGLSLFragmentProcessor* onCreateGLSLInstance() const override { diff --git a/src/effects/SkMagnifierImageFilter.cpp b/src/effects/SkMagnifierImageFilter.cpp index 1c529a93ca..d08bbae5ac 100644 --- a/src/effects/SkMagnifierImageFilter.cpp +++ b/src/effects/SkMagnifierImageFilter.cpp @@ -98,7 +98,8 @@ private: float yInvZoom, float xInvInset, float yInvInset) - : INHERITED{ModulateByConfigOptimizationFlags(proxy->config())} + : INHERITED{kGrMagnifierEffect_ClassID, + ModulateByConfigOptimizationFlags(proxy->config())} // TODO: no GrSamplerState::Filter::kBilerp? , fCoordTransform(proxy.get()) , fTextureSampler(std::move(proxy)) @@ -109,13 +110,12 @@ private: , fYInvZoom(yInvZoom) , fXInvInset(xInvInset) , fYInvInset(yInvInset) { - this->initClassID<GrMagnifierEffect>(); this->addCoordTransform(&fCoordTransform); this->addTextureSampler(&fTextureSampler); } explicit GrMagnifierEffect(const GrMagnifierEffect& that) - : INHERITED(that.optimizationFlags()) + : INHERITED(kGrMagnifierEffect_ClassID, that.optimizationFlags()) , fCoordTransform(that.fCoordTransform) , fTextureSampler(that.fTextureSampler) , fColorSpaceXform(that.fColorSpaceXform) @@ -125,7 +125,6 @@ private: , fYInvZoom(that.fYInvZoom) , fXInvInset(that.fXInvInset) , fYInvInset(that.fYInvInset) { - this->initClassID<GrMagnifierEffect>(); this->addCoordTransform(&fCoordTransform); this->addTextureSampler(&fTextureSampler); } diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp index c9b4dc91da..3315558e22 100644 --- a/src/effects/SkMorphologyImageFilter.cpp +++ b/src/effects/SkMorphologyImageFilter.cpp @@ -324,14 +324,13 @@ GrMorphologyEffect::GrMorphologyEffect(sk_sp<GrTextureProxy> proxy, int radius, Type type, const float range[2]) - : INHERITED(ModulateByConfigOptimizationFlags(proxy->config())) + : INHERITED(kGrMorphologyEffect_ClassID, ModulateByConfigOptimizationFlags(proxy->config())) , fCoordTransform(proxy.get()) , fTextureSampler(std::move(proxy)) , fDirection(direction) , fRadius(radius) , fType(type) , fUseRange(SkToBool(range)) { - this->initClassID<GrMorphologyEffect>(); this->addCoordTransform(&fCoordTransform); this->addTextureSampler(&fTextureSampler); if (fUseRange) { @@ -341,14 +340,13 @@ GrMorphologyEffect::GrMorphologyEffect(sk_sp<GrTextureProxy> proxy, } GrMorphologyEffect::GrMorphologyEffect(const GrMorphologyEffect& that) - : INHERITED(that.optimizationFlags()) + : INHERITED(kGrMorphologyEffect_ClassID, that.optimizationFlags()) , fCoordTransform(that.fCoordTransform) , fTextureSampler(that.fTextureSampler) , fDirection(that.fDirection) , fRadius(that.fRadius) , fType(that.fType) , fUseRange(that.fUseRange) { - this->initClassID<GrMorphologyEffect>(); this->addCoordTransform(&fCoordTransform); this->addTextureSampler(&fTextureSampler); if (that.fUseRange) { diff --git a/src/effects/SkOverdrawColorFilter.cpp b/src/effects/SkOverdrawColorFilter.cpp index be5a623396..a4fa0704d9 100644 --- a/src/effects/SkOverdrawColorFilter.cpp +++ b/src/effects/SkOverdrawColorFilter.cpp @@ -128,8 +128,7 @@ std::unique_ptr<GrFragmentProcessor> OverdrawFragmentProcessor::Make(const SkPMC // This could implement the constant input -> constant output optimization, but we don't really // care given how this is used. OverdrawFragmentProcessor::OverdrawFragmentProcessor(const GrColor4f* colors) - : INHERITED(kNone_OptimizationFlags) { - this->initClassID<OverdrawFragmentProcessor>(); + : INHERITED(kOverdrawFragmentProcessor_ClassID, kNone_OptimizationFlags) { memcpy(fColors, colors, SkOverdrawColorFilter::kNumColors * sizeof(GrColor4f)); } diff --git a/src/effects/SkRRectsGaussianEdgeMaskFilter.cpp b/src/effects/SkRRectsGaussianEdgeMaskFilter.cpp index b0e7ca3529..2f697a3a63 100644 --- a/src/effects/SkRRectsGaussianEdgeMaskFilter.cpp +++ b/src/effects/SkRRectsGaussianEdgeMaskFilter.cpp @@ -458,23 +458,23 @@ private: } RRectsGaussianEdgeFP(const SkRRect& first, const SkRRect& second, SkScalar radius) - : INHERITED(kCompatibleWithCoverageAsAlpha_OptimizationFlag) + : INHERITED(kRRectsGaussianEdgeFP_ClassID, + kCompatibleWithCoverageAsAlpha_OptimizationFlag) , fFirst(first) , fSecond(second) , fRadius(radius) { - this->initClassID<RRectsGaussianEdgeFP>(); fFirstMode = ComputeMode(fFirst); fSecondMode = ComputeMode(fSecond); } RRectsGaussianEdgeFP(const RRectsGaussianEdgeFP& that) - : INHERITED(kCompatibleWithCoverageAsAlpha_OptimizationFlag) + : INHERITED(kRRectsGaussianEdgeFP_ClassID, + kCompatibleWithCoverageAsAlpha_OptimizationFlag) , fFirst(that.fFirst) , fFirstMode(that.fFirstMode) , fSecond(that.fSecond) , fSecondMode(that.fSecondMode) , fRadius(that.fRadius) { - this->initClassID<RRectsGaussianEdgeFP>(); } static Mode ComputeMode(const SkRRect& rr) { diff --git a/src/effects/SkTableColorFilter.cpp b/src/effects/SkTableColorFilter.cpp index 6ebcfa66e8..6e4e06853f 100644 --- a/src/effects/SkTableColorFilter.cpp +++ b/src/effects/SkTableColorFilter.cpp @@ -472,11 +472,11 @@ std::unique_ptr<GrFragmentProcessor> ColorTableEffect::Make(GrContext* context, } ColorTableEffect::ColorTableEffect(sk_sp<GrTextureProxy> proxy, GrTextureStripAtlas* atlas, int row) - : INHERITED(kNone_OptimizationFlags) // Not bothering with table-specific optimizations. + : INHERITED(kColorTableEffect_ClassID, + kNone_OptimizationFlags) // Not bothering with table-specific optimizations. , fTextureSampler(std::move(proxy)) , fAtlas(atlas) , fRow(row) { - this->initClassID<ColorTableEffect>(); this->addTextureSampler(&fTextureSampler); } |