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 --- tests/GrPipelineDynamicStateTest.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tests/GrPipelineDynamicStateTest.cpp') diff --git a/tests/GrPipelineDynamicStateTest.cpp b/tests/GrPipelineDynamicStateTest.cpp index 4b8621db04..6b518abdb2 100644 --- a/tests/GrPipelineDynamicStateTest.cpp +++ b/tests/GrPipelineDynamicStateTest.cpp @@ -59,10 +59,9 @@ struct Vertex { class GrPipelineDynamicStateTestProcessor : public GrGeometryProcessor { public: GrPipelineDynamicStateTestProcessor() - : fVertex(this->addVertexAttrib("vertex", kHalf2_GrVertexAttribType)) - , fColor(this->addVertexAttrib("color", kUByte4_norm_GrVertexAttribType)) { - this->initClassID(); - } + : INHERITED(kGrPipelineDynamicStateTestProcessor_ClassID) + , fVertex(this->addVertexAttrib("vertex", kHalf2_GrVertexAttribType)) + , fColor(this->addVertexAttrib("color", kUByte4_norm_GrVertexAttribType)) {} const char* name() const override { return "GrPipelineDynamicStateTest Processor"; } -- cgit v1.2.3