hide public factory for intermediate class

Use SK_DECLARE_UNFLATTENABLE_OBJECT if the subclass should not be directly instantiated.

TBR=

Author: reed@google.com

Review URL: https://codereview.chromium.org/399383007
This commit is contained in:
reed 2014-07-21 07:31:53 -07:00 committed by Commit bot
parent 1bd6f7de52
commit 3f8540346d
3 changed files with 2 additions and 9 deletions

View File

@ -14,14 +14,9 @@
class SK_API Sk2DPathEffect : public SkPathEffect { class SK_API Sk2DPathEffect : public SkPathEffect {
public: public:
static Sk2DPathEffect* Create(const SkMatrix& mat) { virtual bool filterPath(SkPath*, const SkPath&, SkStrokeRec*, const SkRect*) const SK_OVERRIDE;
return SkNEW_ARGS(Sk2DPathEffect, (mat));
}
virtual bool filterPath(SkPath*, const SkPath&, SK_DECLARE_UNFLATTENABLE_OBJECT()
SkStrokeRec*, const SkRect*) const SK_OVERRIDE;
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Sk2DPathEffect)
protected: protected:
/** New virtual, to be overridden by subclasses. /** New virtual, to be overridden by subclasses.

View File

@ -85,7 +85,6 @@ static void InitializeFlattenables() {
SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLocalMatrixShader) SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLocalMatrixShader)
SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLumaColorFilter) SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLumaColorFilter)
SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPath1DPathEffect) SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPath1DPathEffect)
SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(Sk2DPathEffect)
SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLine2DPathEffect) SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLine2DPathEffect)
SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPath2DPathEffect) SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPath2DPathEffect)
SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPerlinNoiseShader) SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPerlinNoiseShader)

View File

@ -85,7 +85,6 @@ static void InitializeFlattenables() {
SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLocalMatrixShader) SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLocalMatrixShader)
SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLumaColorFilter) SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLumaColorFilter)
SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPath1DPathEffect) SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPath1DPathEffect)
SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(Sk2DPathEffect)
SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLine2DPathEffect) SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLine2DPathEffect)
SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPath2DPathEffect) SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPath2DPathEffect)
SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPerlinNoiseShader) SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPerlinNoiseShader)