aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/GrAlphaThresholdFragmentProcessor.h
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2017-10-09 10:54:08 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-09 15:20:33 +0000
commitabff956455637b12eab374fd44b99e1338799113 (patch)
tree77f932f38b3f00f904faeae1c847f1218f61d0c4 /src/effects/GrAlphaThresholdFragmentProcessor.h
parent4e7cdd5a0052aa76bed6f80ec325be19e09e6ab1 (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/GrAlphaThresholdFragmentProcessor.h')
-rw-r--r--src/effects/GrAlphaThresholdFragmentProcessor.h3
1 files changed, 1 insertions, 2 deletions
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;