From 00d6e515e5835f7df6163ceb5f5ceb1770552bf7 Mon Sep 17 00:00:00 2001 From: mdempsky Date: Thu, 24 Sep 2015 15:04:45 -0700 Subject: Eliminate some clutter in SkFlattenable The Registrar class is unnecessary, as SkFlattenable factory registration is now handled via initialization routines that can just call the Register function directly. Also, no need to lazily initialize gCount to 0, as initializing an int to a constant value does not require dynamic initialization. (C++ actually guarantees zero initialization of global ints anyway, but existing practice in Skia appears to favor the explicit "= 0"). Relatedly, this requires removing the unused/unimplemented SkLayerDrawLooper::MyRegistrar class. And removing that allows Clang to realize that SkLayerDrawLooper::fTopRec is unneeded too, so remove that too to squelch the compiler warning/error. This doesn't change any public API. TBR=reed@google.com Review URL: https://codereview.chromium.org/1361323002 --- include/effects/SkLayerDrawLooper.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'include/effects/SkLayerDrawLooper.h') diff --git a/include/effects/SkLayerDrawLooper.h b/include/effects/SkLayerDrawLooper.h index c59b8b006a..76172dfd4b 100644 --- a/include/effects/SkLayerDrawLooper.h +++ b/include/effects/SkLayerDrawLooper.h @@ -94,7 +94,6 @@ private: LayerInfo fInfo; }; Rec* fRecs; - Rec* fTopRec; int fCount; // state-machine during the init/next cycle @@ -111,11 +110,6 @@ private: static void ApplyInfo(SkPaint* dst, const SkPaint& src, const LayerInfo&); }; - class MyRegistrar : public SkFlattenable::Registrar { - public: - MyRegistrar(); - }; - typedef SkDrawLooper INHERITED; public: -- cgit v1.2.3