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/core/SkColorMatrixFilterRowMajor255.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/SkColorMatrixFilterRowMajor255.cpp b/src/core/SkColorMatrixFilterRowMajor255.cpp index 9c9aa1aff1..59b3f3c9f4 100644 --- a/src/core/SkColorMatrixFilterRowMajor255.cpp +++ b/src/core/SkColorMatrixFilterRowMajor255.cpp @@ -255,9 +255,9 @@ private: // We could implement the constant input->constant output optimization but haven't. Other // optimizations would be matrix-dependent. - ColorMatrixEffect(const SkScalar matrix[20]) : INHERITED(kNone_OptimizationFlags) { + ColorMatrixEffect(const SkScalar matrix[20]) + : INHERITED(kColorMatrixEffect_ClassID, kNone_OptimizationFlags) { memcpy(fMatrix, matrix, sizeof(SkScalar) * 20); - this->initClassID(); } GrGLSLFragmentProcessor* onCreateGLSLInstance() const override { -- cgit v1.2.3