зеркало из https://github.com/mozilla/moz-skia.git
register 1D and 2D patheffects, so they work when serialized (and piperized)
git-svn-id: http://skia.googlecode.com/svn/trunk@2085 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
eefe6f1eef
Коммит
e28b917669
|
@ -59,6 +59,10 @@ public:
|
|||
// override from SkPathEffect
|
||||
virtual bool filterPath(SkPath* dst, const SkPath& src, SkScalar* width);
|
||||
|
||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
||||
return SkNEW_ARGS(SkPath1DPathEffect, (buffer));
|
||||
}
|
||||
|
||||
protected:
|
||||
SkPath1DPathEffect(SkFlattenableReadBuffer& buffer);
|
||||
|
||||
|
@ -74,10 +78,6 @@ private:
|
|||
SkScalar fAdvance; // copied from constructor
|
||||
SkScalar fInitialOffset; // computed from phase
|
||||
Style fStyle; // copied from constructor
|
||||
|
||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
||||
return SkNEW_ARGS(SkPath1DPathEffect, (buffer));
|
||||
}
|
||||
|
||||
typedef Sk1DPathEffect INHERITED;
|
||||
};
|
||||
|
|
|
@ -29,6 +29,8 @@ public:
|
|||
// This method is not exported to java.
|
||||
virtual Factory getFactory();
|
||||
|
||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer&);
|
||||
|
||||
protected:
|
||||
/** New virtual, to be overridden by subclasses.
|
||||
This is called once from filterPath, and provides the
|
||||
|
@ -57,8 +59,6 @@ private:
|
|||
Sk2DPathEffect(const Sk2DPathEffect&);
|
||||
Sk2DPathEffect& operator=(const Sk2DPathEffect&);
|
||||
|
||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer&);
|
||||
|
||||
friend class Sk2DPathEffectBlitter;
|
||||
typedef SkPathEffect INHERITED;
|
||||
};
|
||||
|
|
|
@ -196,3 +196,8 @@ SkScalar SkPath1DPathEffect::next(SkPath* dst, SkScalar distance, SkPathMeasure&
|
|||
return fAdvance;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static SkFlattenable::Registrar gReg("SkPath1DPathEffect",
|
||||
SkPath1DPathEffect::CreateProc);
|
||||
|
||||
|
|
|
@ -100,5 +100,8 @@ SkFlattenable* Sk2DPathEffect::CreateProc(SkFlattenableReadBuffer& buffer)
|
|||
return SkNEW_ARGS(Sk2DPathEffect, (buffer));
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static SkFlattenable::Registrar gReg("Sk2DPathEffect",
|
||||
Sk2DPathEffect::CreateProc);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче