From abff956455637b12eab374fd44b99e1338799113 Mon Sep 17 00:00:00 2001 From: Ethan Nicholas Date: Mon, 9 Oct 2017 10:54:08 -0400 Subject: 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 Reviewed-by: Brian Salomon --- src/effects/GrAlphaThresholdFragmentProcessor.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/effects/GrAlphaThresholdFragmentProcessor.h') 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 colorXform, sk_sp 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(); } GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override; -- cgit v1.2.3