зеркало из https://github.com/mozilla/moz-skia.git
Create macro for registering classes for deserialization
Review URL: https://codereview.appspot.com/5909063 git-svn-id: http://skia.googlecode.com/svn/trunk@3494 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
d43b0a87f8
Коммит
ba28d03e94
|
@ -17,8 +17,8 @@
|
||||||
class FailImageFilter : public SkImageFilter {
|
class FailImageFilter : public SkImageFilter {
|
||||||
public:
|
public:
|
||||||
FailImageFilter() {}
|
FailImageFilter() {}
|
||||||
virtual Factory getFactory() SK_OVERRIDE { return CreateProc; };
|
|
||||||
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(FailImageFilter)
|
||||||
protected:
|
protected:
|
||||||
virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
|
virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
|
||||||
SkBitmap* result, SkIPoint* offset) {
|
SkBitmap* result, SkIPoint* offset) {
|
||||||
|
@ -28,18 +28,18 @@ protected:
|
||||||
FailImageFilter(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {}
|
FailImageFilter(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
|
||||||
return new FailImageFilter(buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef SkImageFilter INHERITED;
|
typedef SkImageFilter INHERITED;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// register the filter with the flattenable registry
|
||||||
|
static SkFlattenable::Registrar gFailImageFilterReg("FailImageFilter",
|
||||||
|
FailImageFilter::CreateProc);
|
||||||
|
|
||||||
class IdentityImageFilter : public SkImageFilter {
|
class IdentityImageFilter : public SkImageFilter {
|
||||||
public:
|
public:
|
||||||
IdentityImageFilter() {}
|
IdentityImageFilter() {}
|
||||||
virtual Factory getFactory() SK_OVERRIDE { return CreateProc; };
|
|
||||||
|
|
||||||
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(IdentityImageFilter)
|
||||||
protected:
|
protected:
|
||||||
virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
|
virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
|
||||||
SkBitmap* result, SkIPoint* offset) {
|
SkBitmap* result, SkIPoint* offset) {
|
||||||
|
@ -50,13 +50,14 @@ protected:
|
||||||
IdentityImageFilter(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {}
|
IdentityImageFilter(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
|
||||||
return new IdentityImageFilter(buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef SkImageFilter INHERITED;
|
typedef SkImageFilter INHERITED;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// register the filter with the flattenable registry
|
||||||
|
static SkFlattenable::Registrar gIdentityImageFilterReg("IdentityImageFilter",
|
||||||
|
IdentityImageFilter::CreateProc);
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
static void draw_paint(SkCanvas* canvas, const SkRect& r, SkImageFilter* imf) {
|
static void draw_paint(SkCanvas* canvas, const SkRect& r, SkImageFilter* imf) {
|
||||||
|
|
|
@ -143,13 +143,13 @@ public:
|
||||||
virtual void beginSession();
|
virtual void beginSession();
|
||||||
virtual void endSession();
|
virtual void endSession();
|
||||||
|
|
||||||
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkFilterShader)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SkFilterShader(SkFlattenableReadBuffer& );
|
SkFilterShader(SkFlattenableReadBuffer& );
|
||||||
virtual void flatten(SkFlattenableWriteBuffer& ) SK_OVERRIDE;
|
virtual void flatten(SkFlattenableWriteBuffer& ) SK_OVERRIDE;
|
||||||
virtual Factory getFactory() SK_OVERRIDE { return CreateProc; }
|
|
||||||
private:
|
private:
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
|
||||||
return SkNEW_ARGS(SkFilterShader, (buffer)); }
|
|
||||||
SkShader* fShader;
|
SkShader* fShader;
|
||||||
SkColorFilter* fFilter;
|
SkColorFilter* fFilter;
|
||||||
|
|
||||||
|
|
|
@ -49,13 +49,11 @@ public:
|
||||||
|
|
||||||
virtual GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE;
|
virtual GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE;
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer&);
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorShader)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SkColorShader(SkFlattenableReadBuffer&);
|
SkColorShader(SkFlattenableReadBuffer&);
|
||||||
|
|
||||||
virtual void flatten(SkFlattenableWriteBuffer&) SK_OVERRIDE;
|
virtual void flatten(SkFlattenableWriteBuffer&) SK_OVERRIDE;
|
||||||
virtual Factory getFactory() SK_OVERRIDE;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
@ -40,14 +40,13 @@ public:
|
||||||
virtual void beginSession();
|
virtual void beginSession();
|
||||||
virtual void endSession();
|
virtual void endSession();
|
||||||
|
|
||||||
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposeShader)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SkComposeShader(SkFlattenableReadBuffer& );
|
SkComposeShader(SkFlattenableReadBuffer& );
|
||||||
virtual void flatten(SkFlattenableWriteBuffer& );
|
virtual void flatten(SkFlattenableWriteBuffer& );
|
||||||
virtual Factory getFactory() { return CreateProc; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
|
||||||
return SkNEW_ARGS(SkComposeShader, (buffer)); }
|
|
||||||
|
|
||||||
SkShader* fShaderA;
|
SkShader* fShaderA;
|
||||||
SkShader* fShaderB;
|
SkShader* fShaderB;
|
||||||
|
|
|
@ -30,14 +30,10 @@ public:
|
||||||
virtual void shadeSpan16(int x, int y, uint16_t span[], int count) SK_OVERRIDE;
|
virtual void shadeSpan16(int x, int y, uint16_t span[], int count) SK_OVERRIDE;
|
||||||
virtual void shadeSpanAlpha(int x, int y, uint8_t alpha[], int count) SK_OVERRIDE;
|
virtual void shadeSpanAlpha(int x, int y, uint8_t alpha[], int count) SK_OVERRIDE;
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkEmptyShader)
|
||||||
return SkNEW_ARGS(SkEmptyShader, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SkEmptyShader(SkFlattenableReadBuffer&);
|
SkEmptyShader(SkFlattenableReadBuffer&);
|
||||||
|
|
||||||
virtual Factory getFactory() SK_OVERRIDE;
|
|
||||||
virtual void flatten(SkFlattenableWriteBuffer&) SK_OVERRIDE;
|
virtual void flatten(SkFlattenableWriteBuffer&) SK_OVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -49,6 +49,15 @@ class SkString;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define SK_DECLARE_UNFLATTENABLE_OBJECT() \
|
||||||
|
virtual Factory getFactory() SK_OVERRIDE { return NULL; }; \
|
||||||
|
|
||||||
|
#define SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(flattenable) \
|
||||||
|
virtual Factory getFactory() SK_OVERRIDE { return CreateProc; }; \
|
||||||
|
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) { \
|
||||||
|
return SkNEW_ARGS(flattenable, (buffer)); \
|
||||||
|
}
|
||||||
|
|
||||||
/** \class SkFlattenable
|
/** \class SkFlattenable
|
||||||
|
|
||||||
SkFlattenable is the base class for objects that need to be flattened
|
SkFlattenable is the base class for objects that need to be flattened
|
||||||
|
|
|
@ -943,9 +943,7 @@ public:
|
||||||
|
|
||||||
// overrides for SkFlattenable
|
// overrides for SkFlattenable
|
||||||
virtual void flatten(SkFlattenableWriteBuffer&);
|
virtual void flatten(SkFlattenableWriteBuffer&);
|
||||||
virtual Factory getFactory();
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkStrokePathEffect)
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer&);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SkScalar fWidth, fMiter;
|
SkScalar fWidth, fMiter;
|
||||||
|
|
|
@ -34,10 +34,15 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual bool filterPath(SkPath* dst, const SkPath& src, SkScalar* width) = 0;
|
virtual bool filterPath(SkPath* dst, const SkPath& src, SkScalar* width) = 0;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
SkPathEffect(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// illegal
|
// illegal
|
||||||
SkPathEffect(const SkPathEffect&);
|
SkPathEffect(const SkPathEffect&);
|
||||||
SkPathEffect& operator=(const SkPathEffect&);
|
SkPathEffect& operator=(const SkPathEffect&);
|
||||||
|
|
||||||
|
typedef SkFlattenable INHERITED;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** \class SkPairPathEffect
|
/** \class SkPairPathEffect
|
||||||
|
@ -80,12 +85,7 @@ public:
|
||||||
|
|
||||||
virtual bool filterPath(SkPath* dst, const SkPath& src, SkScalar* width);
|
virtual bool filterPath(SkPath* dst, const SkPath& src, SkScalar* width);
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposePathEffect)
|
||||||
return SkNEW_ARGS(SkComposePathEffect, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual Factory getFactory() SK_OVERRIDE { return CreateProc; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SkComposePathEffect(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {}
|
SkComposePathEffect(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {}
|
||||||
|
@ -115,12 +115,7 @@ public:
|
||||||
// overrides
|
// overrides
|
||||||
virtual bool filterPath(SkPath* dst, const SkPath& src, SkScalar* width);
|
virtual bool filterPath(SkPath* dst, const SkPath& src, SkScalar* width);
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkSumPathEffect)
|
||||||
return SkNEW_ARGS(SkSumPathEffect, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual Factory getFactory() SK_OVERRIDE { return CreateProc; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SkSumPathEffect(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {}
|
SkSumPathEffect(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {}
|
||||||
|
|
|
@ -32,11 +32,8 @@ public:
|
||||||
void drawMatrix(SkCanvas*, const SkMatrix&);
|
void drawMatrix(SkCanvas*, const SkMatrix&);
|
||||||
|
|
||||||
// overrides
|
// overrides
|
||||||
virtual Factory getFactory();
|
|
||||||
virtual void flatten(SkFlattenableWriteBuffer&);
|
virtual void flatten(SkFlattenableWriteBuffer&);
|
||||||
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkShape)
|
||||||
// public for Registrar
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer&);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void onDraw(SkCanvas*);
|
virtual void onDraw(SkCanvas*);
|
||||||
|
|
|
@ -215,8 +215,8 @@ public:
|
||||||
const SkAlpha aa[]) SK_OVERRIDE;
|
const SkAlpha aa[]) SK_OVERRIDE;
|
||||||
|
|
||||||
// overrides from SkFlattenable
|
// overrides from SkFlattenable
|
||||||
virtual Factory getFactory() SK_OVERRIDE { return CreateProc; }
|
|
||||||
virtual void flatten(SkFlattenableWriteBuffer&) SK_OVERRIDE;
|
virtual void flatten(SkFlattenableWriteBuffer&) SK_OVERRIDE;
|
||||||
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkProcXfermode)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SkProcXfermode(SkFlattenableReadBuffer&);
|
SkProcXfermode(SkFlattenableReadBuffer&);
|
||||||
|
@ -229,9 +229,6 @@ protected:
|
||||||
private:
|
private:
|
||||||
SkXfermodeProc fProc;
|
SkXfermodeProc fProc;
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
|
||||||
return SkNEW_ARGS(SkProcXfermode, (buffer)); }
|
|
||||||
|
|
||||||
typedef SkXfermode INHERITED;
|
typedef SkXfermode INHERITED;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -59,9 +59,7 @@ public:
|
||||||
// override from SkPathEffect
|
// override from SkPathEffect
|
||||||
virtual bool filterPath(SkPath*, const SkPath&, SkScalar* width) SK_OVERRIDE;
|
virtual bool filterPath(SkPath*, const SkPath&, SkScalar* width) SK_OVERRIDE;
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPath1DPathEffect)
|
||||||
return SkNEW_ARGS(SkPath1DPathEffect, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SkPath1DPathEffect(SkFlattenableReadBuffer& buffer);
|
SkPath1DPathEffect(SkFlattenableReadBuffer& buffer);
|
||||||
|
@ -71,7 +69,6 @@ protected:
|
||||||
virtual SkScalar next(SkPath*, SkScalar distance, SkPathMeasure&) SK_OVERRIDE;
|
virtual SkScalar next(SkPath*, SkScalar distance, SkPathMeasure&) SK_OVERRIDE;
|
||||||
// overrides from SkFlattenable
|
// overrides from SkFlattenable
|
||||||
virtual void flatten(SkFlattenableWriteBuffer&) SK_OVERRIDE;
|
virtual void flatten(SkFlattenableWriteBuffer&) SK_OVERRIDE;
|
||||||
virtual Factory getFactory() SK_OVERRIDE { return CreateProc; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SkPath fPath; // copied from constructor
|
SkPath fPath; // copied from constructor
|
||||||
|
|
|
@ -23,7 +23,7 @@ public:
|
||||||
|
|
||||||
// overrides from SkFlattenable
|
// overrides from SkFlattenable
|
||||||
virtual void flatten(SkFlattenableWriteBuffer&) SK_OVERRIDE;
|
virtual void flatten(SkFlattenableWriteBuffer&) SK_OVERRIDE;
|
||||||
virtual Factory getFactory() 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.
|
||||||
|
@ -53,8 +53,6 @@ private:
|
||||||
Sk2DPathEffect(const Sk2DPathEffect&);
|
Sk2DPathEffect(const Sk2DPathEffect&);
|
||||||
Sk2DPathEffect& operator=(const Sk2DPathEffect&);
|
Sk2DPathEffect& operator=(const Sk2DPathEffect&);
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer&);
|
|
||||||
|
|
||||||
friend class Sk2DPathEffectBlitter;
|
friend class Sk2DPathEffectBlitter;
|
||||||
typedef SkPathEffect INHERITED;
|
typedef SkPathEffect INHERITED;
|
||||||
};
|
};
|
||||||
|
@ -67,13 +65,12 @@ public:
|
||||||
*/
|
*/
|
||||||
SkPath2DPathEffect(const SkMatrix&, const SkPath&);
|
SkPath2DPathEffect(const SkMatrix&, const SkPath&);
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer&);
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPath2DPathEffect)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SkPath2DPathEffect(SkFlattenableReadBuffer& buffer);
|
SkPath2DPathEffect(SkFlattenableReadBuffer& buffer);
|
||||||
|
|
||||||
virtual void flatten(SkFlattenableWriteBuffer&) SK_OVERRIDE;
|
virtual void flatten(SkFlattenableWriteBuffer&) SK_OVERRIDE;
|
||||||
virtual Factory getFactory() SK_OVERRIDE;
|
|
||||||
virtual void next(const SkPoint&, int u, int v, SkPath* dst) SK_OVERRIDE;
|
virtual void next(const SkPoint&, int u, int v, SkPath* dst) SK_OVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -52,12 +52,8 @@ public:
|
||||||
const SkAlpha aa[]) SK_OVERRIDE;
|
const SkAlpha aa[]) SK_OVERRIDE;
|
||||||
|
|
||||||
// overrides from SkFlattenable
|
// overrides from SkFlattenable
|
||||||
virtual Factory getFactory() SK_OVERRIDE;
|
|
||||||
virtual void flatten(SkFlattenableWriteBuffer&) SK_OVERRIDE;
|
virtual void flatten(SkFlattenableWriteBuffer&) SK_OVERRIDE;
|
||||||
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkAvoidXfermode)
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
|
||||||
return SkNEW_ARGS(SkAvoidXfermode, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SkAvoidXfermode(SkFlattenableReadBuffer&);
|
SkAvoidXfermode(SkFlattenableReadBuffer&);
|
||||||
|
@ -67,8 +63,6 @@ private:
|
||||||
uint32_t fDistMul; // x.14
|
uint32_t fDistMul; // x.14
|
||||||
Mode fMode;
|
Mode fMode;
|
||||||
|
|
||||||
static SkFlattenable* Create(SkFlattenableReadBuffer&);
|
|
||||||
|
|
||||||
typedef SkXfermode INHERITED;
|
typedef SkXfermode INHERITED;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -44,15 +44,12 @@ public:
|
||||||
virtual void init(SkCanvas*);
|
virtual void init(SkCanvas*);
|
||||||
virtual bool next(SkCanvas*, SkPaint* paint);
|
virtual bool next(SkCanvas*, SkPaint* paint);
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBlurDrawLooper)
|
||||||
return SkNEW_ARGS(SkBlurDrawLooper, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SkBlurDrawLooper(SkFlattenableReadBuffer&);
|
SkBlurDrawLooper(SkFlattenableReadBuffer&);
|
||||||
// overrides from SkFlattenable
|
// overrides from SkFlattenable
|
||||||
virtual void flatten(SkFlattenableWriteBuffer& );
|
virtual void flatten(SkFlattenableWriteBuffer& );
|
||||||
virtual Factory getFactory() { return CreateProc; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SkMaskFilter* fBlur;
|
SkMaskFilter* fBlur;
|
||||||
|
|
|
@ -17,9 +17,7 @@ public:
|
||||||
|
|
||||||
virtual bool asABlur(SkSize* sigma) const SK_OVERRIDE;
|
virtual bool asABlur(SkSize* sigma) const SK_OVERRIDE;
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBlurImageFilter)
|
||||||
return SkNEW_ARGS(SkBlurImageFilter, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit SkBlurImageFilter(SkFlattenableReadBuffer& buffer);
|
explicit SkBlurImageFilter(SkFlattenableReadBuffer& buffer);
|
||||||
|
@ -27,7 +25,6 @@ protected:
|
||||||
virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
|
virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
|
||||||
SkBitmap* result, SkIPoint* offset) SK_OVERRIDE;
|
SkBitmap* result, SkIPoint* offset) SK_OVERRIDE;
|
||||||
virtual void flatten(SkFlattenableWriteBuffer& buffer) SK_OVERRIDE;
|
virtual void flatten(SkFlattenableWriteBuffer& buffer) SK_OVERRIDE;
|
||||||
virtual Factory getFactory() SK_OVERRIDE { return CreateProc; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SkSize fSigma;
|
SkSize fSigma;
|
||||||
|
|
|
@ -37,12 +37,9 @@ public:
|
||||||
int32_t fResult[4];
|
int32_t fResult[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer);
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorMatrixFilter)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// overrides for SkFlattenable
|
|
||||||
virtual Factory getFactory();
|
|
||||||
|
|
||||||
SkColorMatrixFilter(SkFlattenableReadBuffer& buffer);
|
SkColorMatrixFilter(SkFlattenableReadBuffer& buffer);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -31,11 +31,8 @@ public:
|
||||||
|
|
||||||
// overrides for SkFlattenable
|
// overrides for SkFlattenable
|
||||||
// This method is not exported to java.
|
// This method is not exported to java.
|
||||||
virtual Factory getFactory();
|
|
||||||
// This method is not exported to java.
|
|
||||||
virtual void flatten(SkFlattenableWriteBuffer&);
|
virtual void flatten(SkFlattenableWriteBuffer&);
|
||||||
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkCornerPathEffect)
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer&);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SkCornerPathEffect(SkFlattenableReadBuffer&);
|
SkCornerPathEffect(SkFlattenableReadBuffer&);
|
||||||
|
|
|
@ -30,11 +30,8 @@ public:
|
||||||
|
|
||||||
// overrides for SkFlattenable
|
// overrides for SkFlattenable
|
||||||
// This method is not exported to java.
|
// This method is not exported to java.
|
||||||
virtual Factory getFactory();
|
|
||||||
// This method is not exported to java.
|
|
||||||
virtual void flatten(SkFlattenableWriteBuffer&);
|
virtual void flatten(SkFlattenableWriteBuffer&);
|
||||||
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDiscretePathEffect)
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer&);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SkDiscretePathEffect(SkFlattenableReadBuffer&);
|
SkDiscretePathEffect(SkFlattenableReadBuffer&);
|
||||||
|
|
|
@ -35,11 +35,10 @@ public:
|
||||||
SkIPoint* margin);
|
SkIPoint* margin);
|
||||||
|
|
||||||
// overrides from SkFlattenable
|
// overrides from SkFlattenable
|
||||||
|
|
||||||
// This method is not exported to java.
|
|
||||||
virtual Factory getFactory();
|
|
||||||
// This method is not exported to java.
|
// This method is not exported to java.
|
||||||
virtual void flatten(SkFlattenableWriteBuffer&);
|
virtual void flatten(SkFlattenableWriteBuffer&);
|
||||||
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkEmbossMaskFilter)
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SkEmbossMaskFilter(SkFlattenableReadBuffer&);
|
SkEmbossMaskFilter(SkFlattenableReadBuffer&);
|
||||||
|
@ -47,8 +46,6 @@ protected:
|
||||||
private:
|
private:
|
||||||
Light fLight;
|
Light fLight;
|
||||||
SkScalar fBlurRadius;
|
SkScalar fBlurRadius;
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer&);
|
|
||||||
|
|
||||||
typedef SkMaskFilter INHERITED;
|
typedef SkMaskFilter INHERITED;
|
||||||
};
|
};
|
||||||
|
|
|
@ -132,11 +132,9 @@ public:
|
||||||
void removeAllShapes();
|
void removeAllShapes();
|
||||||
|
|
||||||
// overrides
|
// overrides
|
||||||
virtual Factory getFactory();
|
|
||||||
virtual void flatten(SkFlattenableWriteBuffer&);
|
virtual void flatten(SkFlattenableWriteBuffer&);
|
||||||
|
|
||||||
// public for Registrar
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkGroupShape)
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer&);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// overrides
|
// overrides
|
||||||
|
|
|
@ -50,14 +50,13 @@ public:
|
||||||
|
|
||||||
// overrides from SkFlattenable
|
// overrides from SkFlattenable
|
||||||
virtual void flatten(SkFlattenableWriteBuffer& wb);
|
virtual void flatten(SkFlattenableWriteBuffer& wb);
|
||||||
virtual Factory getFactory();
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkKernel33MaskFilter)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int fKernel[3][3];
|
int fKernel[3][3];
|
||||||
int fShift;
|
int fShift;
|
||||||
|
|
||||||
SkKernel33MaskFilter(SkFlattenableReadBuffer& rb);
|
SkKernel33MaskFilter(SkFlattenableReadBuffer& rb);
|
||||||
static SkFlattenable* Create(SkFlattenableReadBuffer& rb);
|
|
||||||
|
|
||||||
typedef SkKernel33ProcMaskFilter INHERITED;
|
typedef SkKernel33ProcMaskFilter INHERITED;
|
||||||
};
|
};
|
||||||
|
|
|
@ -101,17 +101,13 @@ public:
|
||||||
virtual void init(SkCanvas*);
|
virtual void init(SkCanvas*);
|
||||||
virtual bool next(SkCanvas*, SkPaint* paint);
|
virtual bool next(SkCanvas*, SkPaint* paint);
|
||||||
|
|
||||||
// must be public for Registrar :(
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLayerDrawLooper)
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
|
||||||
return SkNEW_ARGS(SkLayerDrawLooper, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SkLayerDrawLooper(SkFlattenableReadBuffer&);
|
SkLayerDrawLooper(SkFlattenableReadBuffer&);
|
||||||
|
|
||||||
// overrides from SkFlattenable
|
// overrides from SkFlattenable
|
||||||
virtual void flatten(SkFlattenableWriteBuffer& );
|
virtual void flatten(SkFlattenableWriteBuffer& );
|
||||||
virtual Factory getFactory() { return CreateProc; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct Rec {
|
struct Rec {
|
||||||
|
|
|
@ -33,10 +33,9 @@ public:
|
||||||
void addLayer(const SkPaint& paint, SkScalar dx, SkScalar dy);
|
void addLayer(const SkPaint& paint, SkScalar dx, SkScalar dy);
|
||||||
|
|
||||||
// overrides from SkFlattenable
|
// overrides from SkFlattenable
|
||||||
virtual Factory getFactory();
|
|
||||||
virtual void flatten(SkFlattenableWriteBuffer&);
|
virtual void flatten(SkFlattenableWriteBuffer&);
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer&);
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLayerRasterizer)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SkLayerRasterizer(SkFlattenableReadBuffer&);
|
SkLayerRasterizer(SkFlattenableReadBuffer&);
|
||||||
|
|
|
@ -33,10 +33,8 @@ public:
|
||||||
virtual bool asADilate(SkISize* radius) const SK_OVERRIDE;
|
virtual bool asADilate(SkISize* radius) const SK_OVERRIDE;
|
||||||
virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
|
virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
|
||||||
SkBitmap* result, SkIPoint* offset) SK_OVERRIDE;
|
SkBitmap* result, SkIPoint* offset) SK_OVERRIDE;
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
|
||||||
return SkNEW_ARGS(SkDilateImageFilter, (buffer));
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDilateImageFilter)
|
||||||
}
|
|
||||||
virtual Factory getFactory() SK_OVERRIDE { return CreateProc; }
|
|
||||||
|
|
||||||
typedef SkMorphologyImageFilter INHERITED;
|
typedef SkMorphologyImageFilter INHERITED;
|
||||||
};
|
};
|
||||||
|
@ -50,10 +48,7 @@ public:
|
||||||
virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
|
virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
|
||||||
SkBitmap* result, SkIPoint* offset) SK_OVERRIDE;
|
SkBitmap* result, SkIPoint* offset) SK_OVERRIDE;
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkErodeImageFilter)
|
||||||
return SkNEW_ARGS(SkErodeImageFilter, (buffer));
|
|
||||||
}
|
|
||||||
virtual Factory getFactory() SK_OVERRIDE { return CreateProc; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef SkMorphologyImageFilter INHERITED;
|
typedef SkMorphologyImageFilter INHERITED;
|
||||||
|
|
|
@ -22,12 +22,9 @@ public:
|
||||||
SkPixelXorXfermode(SkColor opColor) : fOpColor(opColor) {}
|
SkPixelXorXfermode(SkColor opColor) : fOpColor(opColor) {}
|
||||||
|
|
||||||
// override from SkFlattenable
|
// override from SkFlattenable
|
||||||
virtual Factory getFactory();
|
|
||||||
virtual void flatten(SkFlattenableWriteBuffer&);
|
virtual void flatten(SkFlattenableWriteBuffer&);
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPixelXorXfermode)
|
||||||
return SkNEW_ARGS(SkPixelXorXfermode, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// override from SkXfermode
|
// override from SkXfermode
|
||||||
|
@ -37,8 +34,6 @@ private:
|
||||||
SkColor fOpColor;
|
SkColor fOpColor;
|
||||||
|
|
||||||
SkPixelXorXfermode(SkFlattenableReadBuffer& rb);
|
SkPixelXorXfermode(SkFlattenableReadBuffer& rb);
|
||||||
// our private factory
|
|
||||||
static SkFlattenable* Create(SkFlattenableReadBuffer&);
|
|
||||||
|
|
||||||
typedef SkXfermode INHERITED;
|
typedef SkXfermode INHERITED;
|
||||||
};
|
};
|
||||||
|
|
|
@ -41,11 +41,9 @@ public:
|
||||||
void setRRect(const SkRect&, SkScalar rx, SkScalar ry);
|
void setRRect(const SkRect&, SkScalar rx, SkScalar ry);
|
||||||
|
|
||||||
// overrides
|
// overrides
|
||||||
virtual Factory getFactory();
|
|
||||||
virtual void flatten(SkFlattenableWriteBuffer&);
|
virtual void flatten(SkFlattenableWriteBuffer&);
|
||||||
|
|
||||||
// public for Registrar
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkRectShape)
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer&);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SkRectShape(SkFlattenableReadBuffer&);
|
SkRectShape(SkFlattenableReadBuffer&);
|
||||||
|
|
|
@ -53,11 +53,10 @@ public:
|
||||||
|
|
||||||
// overrides from SkFlattenable
|
// overrides from SkFlattenable
|
||||||
virtual void flatten(SkFlattenableWriteBuffer& wb);
|
virtual void flatten(SkFlattenableWriteBuffer& wb);
|
||||||
virtual Factory getFactory();
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTableMaskFilter)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SkTableMaskFilter(SkFlattenableReadBuffer& rb);
|
SkTableMaskFilter(SkFlattenableReadBuffer& rb);
|
||||||
static SkFlattenable* Factory(SkFlattenableReadBuffer&);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint8_t fTable[256];
|
uint8_t fTable[256];
|
||||||
|
|
|
@ -11,9 +11,7 @@ public:
|
||||||
fOffset.set(dx, dy);
|
fOffset.set(dx, dy);
|
||||||
}
|
}
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkOffsetImageFilter)
|
||||||
return SkNEW_ARGS(SkOffsetImageFilter, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SkOffsetImageFilter(SkFlattenableReadBuffer& buffer);
|
SkOffsetImageFilter(SkFlattenableReadBuffer& buffer);
|
||||||
|
@ -23,7 +21,6 @@ protected:
|
||||||
virtual bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*) SK_OVERRIDE;
|
virtual bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*) SK_OVERRIDE;
|
||||||
// overrides from SkFlattenable
|
// overrides from SkFlattenable
|
||||||
virtual void flatten(SkFlattenableWriteBuffer&) SK_OVERRIDE;
|
virtual void flatten(SkFlattenableWriteBuffer&) SK_OVERRIDE;
|
||||||
virtual Factory getFactory() SK_OVERRIDE;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SkVector fOffset;
|
SkVector fOffset;
|
||||||
|
@ -41,9 +38,7 @@ public:
|
||||||
}
|
}
|
||||||
virtual ~SkComposeImageFilter();
|
virtual ~SkComposeImageFilter();
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposeImageFilter)
|
||||||
return SkNEW_ARGS(SkComposeImageFilter, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SkComposeImageFilter(SkFlattenableReadBuffer& buffer);
|
SkComposeImageFilter(SkFlattenableReadBuffer& buffer);
|
||||||
|
@ -53,7 +48,6 @@ protected:
|
||||||
virtual bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*) SK_OVERRIDE;
|
virtual bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*) SK_OVERRIDE;
|
||||||
// overrides from SkFlattenable
|
// overrides from SkFlattenable
|
||||||
virtual void flatten(SkFlattenableWriteBuffer&) SK_OVERRIDE;
|
virtual void flatten(SkFlattenableWriteBuffer&) SK_OVERRIDE;
|
||||||
virtual Factory getFactory() SK_OVERRIDE;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SkImageFilter* fOuter;
|
SkImageFilter* fOuter;
|
||||||
|
@ -72,9 +66,7 @@ public:
|
||||||
const SkXfermode::Mode modes[] = NULL);
|
const SkXfermode::Mode modes[] = NULL);
|
||||||
virtual ~SkMergeImageFilter();
|
virtual ~SkMergeImageFilter();
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMergeImageFilter)
|
||||||
return SkNEW_ARGS(SkMergeImageFilter, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SkMergeImageFilter(SkFlattenableReadBuffer& buffer);
|
SkMergeImageFilter(SkFlattenableReadBuffer& buffer);
|
||||||
|
@ -84,7 +76,6 @@ protected:
|
||||||
virtual bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*) SK_OVERRIDE;
|
virtual bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*) SK_OVERRIDE;
|
||||||
// overrides from SkFlattenable
|
// overrides from SkFlattenable
|
||||||
virtual void flatten(SkFlattenableWriteBuffer&) SK_OVERRIDE;
|
virtual void flatten(SkFlattenableWriteBuffer&) SK_OVERRIDE;
|
||||||
virtual Factory getFactory() SK_OVERRIDE;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SkImageFilter** fFilters;
|
SkImageFilter** fFilters;
|
||||||
|
@ -108,9 +99,7 @@ public:
|
||||||
}
|
}
|
||||||
virtual ~SkColorFilterImageFilter();
|
virtual ~SkColorFilterImageFilter();
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorFilterImageFilter)
|
||||||
return SkNEW_ARGS(SkColorFilterImageFilter, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SkColorFilterImageFilter(SkFlattenableReadBuffer& buffer);
|
SkColorFilterImageFilter(SkFlattenableReadBuffer& buffer);
|
||||||
|
@ -119,7 +108,6 @@ protected:
|
||||||
SkBitmap* result, SkIPoint* loc) SK_OVERRIDE;
|
SkBitmap* result, SkIPoint* loc) SK_OVERRIDE;
|
||||||
// overrides from SkFlattenable
|
// overrides from SkFlattenable
|
||||||
virtual void flatten(SkFlattenableWriteBuffer&) SK_OVERRIDE;
|
virtual void flatten(SkFlattenableWriteBuffer&) SK_OVERRIDE;
|
||||||
virtual Factory getFactory() SK_OVERRIDE;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SkColorFilter* fColorFilter;
|
SkColorFilter* fColorFilter;
|
||||||
|
@ -134,9 +122,7 @@ class SkDownSampleImageFilter : public SkImageFilter {
|
||||||
public:
|
public:
|
||||||
SkDownSampleImageFilter(SkScalar scale) : fScale(scale) {}
|
SkDownSampleImageFilter(SkScalar scale) : fScale(scale) {}
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDownSampleImageFilter)
|
||||||
return SkNEW_ARGS(SkDownSampleImageFilter, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SkDownSampleImageFilter(SkFlattenableReadBuffer& buffer);
|
SkDownSampleImageFilter(SkFlattenableReadBuffer& buffer);
|
||||||
|
@ -145,7 +131,6 @@ protected:
|
||||||
SkBitmap* result, SkIPoint* loc) SK_OVERRIDE;
|
SkBitmap* result, SkIPoint* loc) SK_OVERRIDE;
|
||||||
// overrides from SkFlattenable
|
// overrides from SkFlattenable
|
||||||
virtual void flatten(SkFlattenableWriteBuffer&) SK_OVERRIDE;
|
virtual void flatten(SkFlattenableWriteBuffer&) SK_OVERRIDE;
|
||||||
virtual Factory getFactory() SK_OVERRIDE;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SkScalar fScale;
|
SkScalar fScale;
|
||||||
|
|
|
@ -24,8 +24,8 @@ public:
|
||||||
virtual void shadeSpan16(int x, int y, uint16_t span[], int count) SK_OVERRIDE;
|
virtual void shadeSpan16(int x, int y, uint16_t span[], int count) SK_OVERRIDE;
|
||||||
|
|
||||||
// overrides for SkFlattenable
|
// overrides for SkFlattenable
|
||||||
virtual Factory getFactory() SK_OVERRIDE;
|
|
||||||
virtual void flatten(SkFlattenableWriteBuffer&) SK_OVERRIDE;
|
virtual void flatten(SkFlattenableWriteBuffer&) SK_OVERRIDE;
|
||||||
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTransparentShader)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// these are a cache from the call to setContext()
|
// these are a cache from the call to setContext()
|
||||||
|
@ -34,10 +34,6 @@ private:
|
||||||
|
|
||||||
SkTransparentShader(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {}
|
SkTransparentShader(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {}
|
||||||
|
|
||||||
static SkFlattenable* Create(SkFlattenableReadBuffer& buffer) {
|
|
||||||
return SkNEW_ARGS(SkTransparentShader, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef SkShader INHERITED;
|
typedef SkShader INHERITED;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -20,17 +20,17 @@ public:
|
||||||
// override from SkUnitMapper
|
// override from SkUnitMapper
|
||||||
virtual uint16_t mapUnit16(uint16_t x);
|
virtual uint16_t mapUnit16(uint16_t x);
|
||||||
|
|
||||||
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDiscreteMapper)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SkDiscreteMapper(SkFlattenableReadBuffer& );
|
SkDiscreteMapper(SkFlattenableReadBuffer& );
|
||||||
// overrides from SkFlattenable
|
// overrides from SkFlattenable
|
||||||
virtual void flatten(SkFlattenableWriteBuffer& );
|
virtual void flatten(SkFlattenableWriteBuffer& );
|
||||||
virtual Factory getFactory();
|
|
||||||
private:
|
private:
|
||||||
int fSegments;
|
int fSegments;
|
||||||
SkFract fScale; // computed from fSegments
|
SkFract fScale; // computed from fSegments
|
||||||
|
|
||||||
static SkFlattenable* Create(SkFlattenableReadBuffer& buffer);
|
|
||||||
|
|
||||||
typedef SkUnitMapper INHERITED;
|
typedef SkUnitMapper INHERITED;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -43,13 +43,12 @@ public:
|
||||||
// override from SkUnitMapper
|
// override from SkUnitMapper
|
||||||
virtual uint16_t mapUnit16(uint16_t x);
|
virtual uint16_t mapUnit16(uint16_t x);
|
||||||
|
|
||||||
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkCosineMapper)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SkCosineMapper(SkFlattenableReadBuffer&);
|
SkCosineMapper(SkFlattenableReadBuffer&);
|
||||||
// overrides from SkFlattenable
|
|
||||||
virtual Factory getFactory();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static SkFlattenable* Create(SkFlattenableReadBuffer&);
|
|
||||||
|
|
||||||
typedef SkUnitMapper INHERITED;
|
typedef SkUnitMapper INHERITED;
|
||||||
};
|
};
|
||||||
|
|
|
@ -76,7 +76,8 @@ public:
|
||||||
|
|
||||||
buffer.writeScalar(fRadius);
|
buffer.writeScalar(fRadius);
|
||||||
}
|
}
|
||||||
virtual Factory getFactory() { return CreateProc; }
|
|
||||||
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Dot2DPathEffect)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void begin(const SkIRect& uvBounds, SkPath* dst) {
|
virtual void begin(const SkIRect& uvBounds, SkPath* dst) {
|
||||||
|
@ -103,11 +104,6 @@ private:
|
||||||
SkScalar fRadius;
|
SkScalar fRadius;
|
||||||
SkTDArray<SkPoint>* fPts;
|
SkTDArray<SkPoint>* fPts;
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer)
|
|
||||||
{
|
|
||||||
return new Dot2DPathEffect(buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef Sk2DPathEffect INHERITED;
|
typedef Sk2DPathEffect INHERITED;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -119,13 +115,12 @@ public:
|
||||||
dst->setFillType(SkPath::kInverseWinding_FillType);
|
dst->setFillType(SkPath::kInverseWinding_FillType);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
virtual Factory getFactory() { return Factory; }
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(InverseFillPE)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// InverseFillPE(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {}
|
InverseFillPE(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {}
|
||||||
private:
|
private:
|
||||||
static SkFlattenable* Factory(SkFlattenableReadBuffer& buffer) {
|
|
||||||
return new InverseFillPE;
|
|
||||||
}
|
|
||||||
typedef SkPathEffect INHERITED;
|
typedef SkPathEffect INHERITED;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -164,7 +164,7 @@ public:
|
||||||
|
|
||||||
buffer.writeScalar(fRadius);
|
buffer.writeScalar(fRadius);
|
||||||
}
|
}
|
||||||
virtual Factory getFactory() { return CreateProc; }
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Dot2DPathEffect)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void next(const SkPoint& loc, int u, int v, SkPath* dst) {
|
virtual void next(const SkPoint& loc, int u, int v, SkPath* dst) {
|
||||||
|
@ -177,10 +177,6 @@ protected:
|
||||||
private:
|
private:
|
||||||
SkScalar fRadius;
|
SkScalar fRadius;
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
|
||||||
return new Dot2DPathEffect(buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef Sk2DPathEffect INHERITED;
|
typedef Sk2DPathEffect INHERITED;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -222,11 +218,13 @@ public:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual Factory getFactory() { return CreateProc; }
|
|
||||||
virtual void flatten(SkFlattenableWriteBuffer& buffer) {
|
virtual void flatten(SkFlattenableWriteBuffer& buffer) {
|
||||||
this->INHERITED::flatten(buffer);
|
this->INHERITED::flatten(buffer);
|
||||||
buffer.writeScalar(fWidth);
|
buffer.writeScalar(fWidth);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Line2DPathEffect)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void nextSpan(int u, int v, int ucount, SkPath* dst) {
|
virtual void nextSpan(int u, int v, int ucount, SkPath* dst) {
|
||||||
if (ucount > 1) {
|
if (ucount > 1) {
|
||||||
|
@ -250,8 +248,6 @@ protected:
|
||||||
private:
|
private:
|
||||||
SkScalar fWidth;
|
SkScalar fWidth;
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) { return new Line2DPathEffect(buffer); }
|
|
||||||
|
|
||||||
typedef Sk2DPathEffect INHERITED;
|
typedef Sk2DPathEffect INHERITED;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -612,12 +612,13 @@ public:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual Factory getFactory() { return CreateProc; }
|
|
||||||
virtual void flatten(SkFlattenableWriteBuffer& buffer)
|
virtual void flatten(SkFlattenableWriteBuffer& buffer)
|
||||||
{
|
{
|
||||||
this->INHERITED::flatten(buffer);
|
this->INHERITED::flatten(buffer);
|
||||||
buffer.writeScalar(fWidth);
|
buffer.writeScalar(fWidth);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Line2DPathEffect)
|
||||||
protected:
|
protected:
|
||||||
virtual void nextSpan(int u, int v, int ucount, SkPath* dst)
|
virtual void nextSpan(int u, int v, int ucount, SkPath* dst)
|
||||||
{
|
{
|
||||||
|
@ -644,11 +645,6 @@ protected:
|
||||||
private:
|
private:
|
||||||
SkScalar fWidth;
|
SkScalar fWidth;
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer)
|
|
||||||
{
|
|
||||||
return new Line2DPathEffect(buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef Sk2DPathEffect INHERITED;
|
typedef Sk2DPathEffect INHERITED;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -54,12 +54,10 @@ public:
|
||||||
// if (c < min) c = min;
|
// if (c < min) c = min;
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
virtual Factory getFactory() { return Create; }
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(ReduceNoise)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ReduceNoise(SkFlattenableReadBuffer& rb) : SkKernel33ProcMaskFilter(rb) {}
|
ReduceNoise(SkFlattenableReadBuffer& rb) : SkKernel33ProcMaskFilter(rb) {}
|
||||||
static SkFlattenable* Create(SkFlattenableReadBuffer& rb) {
|
|
||||||
return new ReduceNoise(rb);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class Darken : public SkKernel33ProcMaskFilter {
|
class Darken : public SkKernel33ProcMaskFilter {
|
||||||
|
@ -78,12 +76,10 @@ public:
|
||||||
SkASSERT(f >= 0 && f <= 1);
|
SkASSERT(f >= 0 && f <= 1);
|
||||||
return (int)(f * 255);
|
return (int)(f * 255);
|
||||||
}
|
}
|
||||||
virtual Factory getFactory() { return Create; }
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Darken)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Darken(SkFlattenableReadBuffer& rb) : SkKernel33ProcMaskFilter(rb) {}
|
Darken(SkFlattenableReadBuffer& rb) : SkKernel33ProcMaskFilter(rb) {}
|
||||||
static SkFlattenable* Create(SkFlattenableReadBuffer& rb) {
|
|
||||||
return new Darken(rb);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static SkMaskFilter* makemf() { return new Darken(0x30); }
|
static SkMaskFilter* makemf() { return new Darken(0x30); }
|
||||||
|
@ -136,11 +132,11 @@ public:
|
||||||
typedef SkFlattenable* (*Factory)(SkFlattenableReadBuffer&);
|
typedef SkFlattenable* (*Factory)(SkFlattenableReadBuffer&);
|
||||||
|
|
||||||
// overrides for SkFlattenable
|
// overrides for SkFlattenable
|
||||||
virtual Factory getFactory() { return Create; }
|
|
||||||
virtual void flatten(SkFlattenableWriteBuffer& b) {
|
virtual void flatten(SkFlattenableWriteBuffer& b) {
|
||||||
// this->INHERITED::flatten(b); How can we know if this is legal????
|
// this->INHERITED::flatten(b); How can we know if this is legal????
|
||||||
b.write32(SkScalarToFixed(fExp));
|
b.write32(SkScalarToFixed(fExp));
|
||||||
}
|
}
|
||||||
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPowerMode)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SkScalar fExp; // user's value
|
SkScalar fExp; // user's value
|
||||||
|
@ -151,9 +147,6 @@ private:
|
||||||
// read the exponent
|
// read the exponent
|
||||||
this->init(SkFixedToScalar(b.readS32()));
|
this->init(SkFixedToScalar(b.readS32()));
|
||||||
}
|
}
|
||||||
static SkFlattenable* Create(SkFlattenableReadBuffer& b) {
|
|
||||||
return SkNEW_ARGS(SkPowerMode, (b));
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef SkXfermode INHERITED;
|
typedef SkXfermode INHERITED;
|
||||||
};
|
};
|
||||||
|
|
|
@ -189,11 +189,11 @@ public:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual Factory getFactory() { return CreateProc; }
|
|
||||||
virtual void flatten(SkFlattenableWriteBuffer& buffer) {
|
virtual void flatten(SkFlattenableWriteBuffer& buffer) {
|
||||||
this->INHERITED::flatten(buffer);
|
this->INHERITED::flatten(buffer);
|
||||||
buffer.writeScalar(fWidth);
|
buffer.writeScalar(fWidth);
|
||||||
}
|
}
|
||||||
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Line2DPathEffect)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void nextSpan(int u, int v, int ucount, SkPath* dst) {
|
virtual void nextSpan(int u, int v, int ucount, SkPath* dst) {
|
||||||
|
@ -218,10 +218,6 @@ protected:
|
||||||
private:
|
private:
|
||||||
SkScalar fWidth;
|
SkScalar fWidth;
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
|
||||||
return new Line2DPathEffect(buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef Sk2DPathEffect INHERITED;
|
typedef Sk2DPathEffect INHERITED;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -91,6 +91,8 @@ public:
|
||||||
fDraw(draw), fMaker(maker) {
|
fDraw(draw), fMaker(maker) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SK_DECLARE_UNFLATTENABLE_OBJECT()
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual SkScalar begin(SkScalar contourLength)
|
virtual SkScalar begin(SkScalar contourLength)
|
||||||
{
|
{
|
||||||
|
@ -139,7 +141,6 @@ protected:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual void flatten(SkFlattenableWriteBuffer& ) {}
|
virtual void flatten(SkFlattenableWriteBuffer& ) {}
|
||||||
virtual Factory getFactory() { return NULL; }
|
|
||||||
|
|
||||||
static bool GetContourLength(const char* token, size_t len, void* clen, SkScriptValue* value) {
|
static bool GetContourLength(const char* token, size_t len, void* clen, SkScriptValue* value) {
|
||||||
if (SK_LITERAL_STR_EQUAL("contourLength", token, len)) {
|
if (SK_LITERAL_STR_EQUAL("contourLength", token, len)) {
|
||||||
|
|
|
@ -35,8 +35,7 @@ public:
|
||||||
SkGradientUnitMapper(SkAnimateMaker* maker, const char* script) : fMaker(maker), fScript(script) {
|
SkGradientUnitMapper(SkAnimateMaker* maker, const char* script) : fMaker(maker), fScript(script) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// overrides for SkFlattenable
|
SK_DECLARE_UNFLATTENABLE_OBJECT()
|
||||||
virtual Factory getFactory() { return NULL; }
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual uint16_t mapUnit16(uint16_t x) {
|
virtual uint16_t mapUnit16(uint16_t x) {
|
||||||
|
|
|
@ -30,17 +30,13 @@ public:
|
||||||
|
|
||||||
static bool CanDo(const SkBitmap&, TileMode tx, TileMode ty);
|
static bool CanDo(const SkBitmap&, TileMode tx, TileMode ty);
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
|
||||||
return SkNEW_ARGS(SkBitmapProcShader, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
// override from flattenable
|
// override from flattenable
|
||||||
virtual bool toDumpString(SkString* str) const;
|
virtual bool toDumpString(SkString* str) const;
|
||||||
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBitmapProcShader)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SkBitmapProcShader(SkFlattenableReadBuffer& );
|
SkBitmapProcShader(SkFlattenableReadBuffer& );
|
||||||
virtual void flatten(SkFlattenableWriteBuffer& );
|
virtual void flatten(SkFlattenableWriteBuffer& );
|
||||||
virtual Factory getFactory() { return CreateProc; }
|
|
||||||
|
|
||||||
SkBitmap fRawBitmap; // experimental for RLE encoding
|
SkBitmap fRawBitmap; // experimental for RLE encoding
|
||||||
SkBitmapProcState fState;
|
SkBitmapProcState fState;
|
||||||
|
|
|
@ -656,6 +656,8 @@ public:
|
||||||
this->INHERITED::endSession();
|
this->INHERITED::endSession();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Sk3DShader)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Sk3DShader(SkFlattenableReadBuffer& buffer) :
|
Sk3DShader(SkFlattenableReadBuffer& buffer) :
|
||||||
INHERITED(buffer) {
|
INHERITED(buffer) {
|
||||||
|
@ -670,15 +672,7 @@ protected:
|
||||||
buffer.write32(fPMColor);
|
buffer.write32(fPMColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual Factory getFactory() {
|
|
||||||
return CreateProc;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
|
||||||
return SkNEW_ARGS(Sk3DShader, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
SkShader* fProxy;
|
SkShader* fProxy;
|
||||||
SkPMColor fPMColor;
|
SkPMColor fPMColor;
|
||||||
const SkMask* fMask;
|
const SkMask* fMask;
|
||||||
|
|
|
@ -2212,18 +2212,15 @@ public:
|
||||||
|
|
||||||
virtual void shadeSpan(int x, int y, SkPMColor dstC[], int count);
|
virtual void shadeSpan(int x, int y, SkPMColor dstC[], int count);
|
||||||
|
|
||||||
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTriColorShader)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SkTriColorShader(SkFlattenableReadBuffer& buffer) : SkShader(buffer) {}
|
SkTriColorShader(SkFlattenableReadBuffer& buffer) : SkShader(buffer) {}
|
||||||
|
|
||||||
virtual Factory getFactory() { return CreateProc; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SkMatrix fDstToUnit;
|
SkMatrix fDstToUnit;
|
||||||
SkPMColor fColors[3];
|
SkPMColor fColors[3];
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
|
||||||
return SkNEW_ARGS(SkTriColorShader, (buffer));
|
|
||||||
}
|
|
||||||
typedef SkShader INHERITED;
|
typedef SkShader INHERITED;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -108,14 +108,6 @@ bool SkStrokePathEffect::filterPath(SkPath* dst, const SkPath& src,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
SkFlattenable::Factory SkStrokePathEffect::getFactory() {
|
|
||||||
return CreateProc;
|
|
||||||
}
|
|
||||||
|
|
||||||
SkFlattenable* SkStrokePathEffect::CreateProc(SkFlattenableReadBuffer& buffer) {
|
|
||||||
return SkNEW_ARGS(SkStrokePathEffect, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
void SkStrokePathEffect::flatten(SkFlattenableWriteBuffer& buffer) {
|
void SkStrokePathEffect::flatten(SkFlattenableWriteBuffer& buffer) {
|
||||||
buffer.writeScalar(fWidth);
|
buffer.writeScalar(fWidth);
|
||||||
buffer.writeScalar(fMiter);
|
buffer.writeScalar(fMiter);
|
||||||
|
|
|
@ -247,14 +247,6 @@ void SkColorShader::flatten(SkFlattenableWriteBuffer& buffer) {
|
||||||
buffer.write32(fColor);
|
buffer.write32(fColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
SkFlattenable* SkColorShader::CreateProc(SkFlattenableReadBuffer& buffer) {
|
|
||||||
return SkNEW_ARGS(SkColorShader, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
SkFlattenable::Factory SkColorShader::getFactory() {
|
|
||||||
return CreateProc;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t SkColorShader::getFlags() {
|
uint32_t SkColorShader::getFlags() {
|
||||||
return fFlags;
|
return fFlags;
|
||||||
}
|
}
|
||||||
|
@ -359,8 +351,6 @@ void SkEmptyShader::shadeSpanAlpha(int x, int y, uint8_t alpha[], int count) {
|
||||||
SkDEBUGFAIL("should never get called, since setContext() returned false");
|
SkDEBUGFAIL("should never get called, since setContext() returned false");
|
||||||
}
|
}
|
||||||
|
|
||||||
SkFlattenable::Factory SkEmptyShader::getFactory() { return NULL; }
|
|
||||||
|
|
||||||
void SkEmptyShader::flatten(SkFlattenableWriteBuffer& buffer) {
|
void SkEmptyShader::flatten(SkFlattenableWriteBuffer& buffer) {
|
||||||
this->INHERITED::flatten(buffer);
|
this->INHERITED::flatten(buffer);
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,14 +60,6 @@ SkShape::SkShape(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {
|
||||||
inc_shape(this);
|
inc_shape(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
SkFlattenable* SkShape::CreateProc(SkFlattenableReadBuffer& buffer) {
|
|
||||||
return SkNEW_ARGS(SkShape, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
SkFlattenable::Factory SkShape::getFactory() {
|
|
||||||
return CreateProc;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SkShape::flatten(SkFlattenableWriteBuffer& buffer) {
|
void SkShape::flatten(SkFlattenableWriteBuffer& buffer) {
|
||||||
this->INHERITED::flatten(buffer);
|
this->INHERITED::flatten(buffer);
|
||||||
}
|
}
|
||||||
|
|
|
@ -729,15 +729,12 @@ public:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual Factory getFactory() { return CreateProc; }
|
|
||||||
virtual void flatten(SkFlattenableWriteBuffer& buffer) {
|
virtual void flatten(SkFlattenableWriteBuffer& buffer) {
|
||||||
this->INHERITED::flatten(buffer);
|
this->INHERITED::flatten(buffer);
|
||||||
buffer.write32(fMode);
|
buffer.write32(fMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkProcCoeffXfermode)
|
||||||
return SkNEW_ARGS(SkProcCoeffXfermode, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SkProcCoeffXfermode(SkFlattenableReadBuffer& buffer)
|
SkProcCoeffXfermode(SkFlattenableReadBuffer& buffer)
|
||||||
|
@ -768,11 +765,8 @@ public:
|
||||||
|
|
||||||
virtual void xfer32(SkPMColor*, const SkPMColor*, int, const SkAlpha*) SK_OVERRIDE;
|
virtual void xfer32(SkPMColor*, const SkPMColor*, int, const SkAlpha*) SK_OVERRIDE;
|
||||||
virtual void xferA8(SkAlpha*, const SkPMColor*, int, const SkAlpha*) SK_OVERRIDE;
|
virtual void xferA8(SkAlpha*, const SkPMColor*, int, const SkAlpha*) SK_OVERRIDE;
|
||||||
virtual Factory getFactory() SK_OVERRIDE { return CreateProc; }
|
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkClearXfermode)
|
||||||
return SkNEW_ARGS(SkClearXfermode, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SkClearXfermode(SkFlattenableReadBuffer& buffer)
|
SkClearXfermode(SkFlattenableReadBuffer& buffer)
|
||||||
|
@ -825,11 +819,8 @@ public:
|
||||||
|
|
||||||
virtual void xfer32(SkPMColor*, const SkPMColor*, int, const SkAlpha*) SK_OVERRIDE;
|
virtual void xfer32(SkPMColor*, const SkPMColor*, int, const SkAlpha*) SK_OVERRIDE;
|
||||||
virtual void xferA8(SkAlpha*, const SkPMColor*, int, const SkAlpha*) SK_OVERRIDE;
|
virtual void xferA8(SkAlpha*, const SkPMColor*, int, const SkAlpha*) SK_OVERRIDE;
|
||||||
virtual Factory getFactory() SK_OVERRIDE { return CreateProc; }
|
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkSrcXfermode)
|
||||||
return SkNEW_ARGS(SkSrcXfermode, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SkSrcXfermode(SkFlattenableReadBuffer& buffer)
|
SkSrcXfermode(SkFlattenableReadBuffer& buffer)
|
||||||
|
@ -887,11 +878,8 @@ public:
|
||||||
SkDstInXfermode(const ProcCoeff& rec) : SkProcCoeffXfermode(rec, kDstIn_Mode) {}
|
SkDstInXfermode(const ProcCoeff& rec) : SkProcCoeffXfermode(rec, kDstIn_Mode) {}
|
||||||
|
|
||||||
virtual void xfer32(SkPMColor*, const SkPMColor*, int, const SkAlpha*) SK_OVERRIDE;
|
virtual void xfer32(SkPMColor*, const SkPMColor*, int, const SkAlpha*) SK_OVERRIDE;
|
||||||
virtual Factory getFactory() SK_OVERRIDE { return CreateProc; }
|
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDstInXfermode)
|
||||||
return SkNEW_ARGS(SkDstInXfermode, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SkDstInXfermode(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {}
|
SkDstInXfermode(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {}
|
||||||
|
@ -926,11 +914,8 @@ public:
|
||||||
SkDstOutXfermode(const ProcCoeff& rec) : SkProcCoeffXfermode(rec, kDstOut_Mode) {}
|
SkDstOutXfermode(const ProcCoeff& rec) : SkProcCoeffXfermode(rec, kDstOut_Mode) {}
|
||||||
|
|
||||||
virtual void xfer32(SkPMColor*, const SkPMColor*, int, const SkAlpha*) SK_OVERRIDE;
|
virtual void xfer32(SkPMColor*, const SkPMColor*, int, const SkAlpha*) SK_OVERRIDE;
|
||||||
virtual Factory getFactory() SK_OVERRIDE { return CreateProc; }
|
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDstOutXfermode)
|
||||||
return SkNEW_ARGS(SkDstOutXfermode, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SkDstOutXfermode(SkFlattenableReadBuffer& buffer)
|
SkDstOutXfermode(SkFlattenableReadBuffer& buffer)
|
||||||
|
|
|
@ -80,14 +80,6 @@ Sk2DPathEffect::Sk2DPathEffect(SkFlattenableReadBuffer& buffer) {
|
||||||
fMatrix.invert(&fInverse);
|
fMatrix.invert(&fInverse);
|
||||||
}
|
}
|
||||||
|
|
||||||
SkFlattenable::Factory Sk2DPathEffect::getFactory() {
|
|
||||||
return CreateProc;
|
|
||||||
}
|
|
||||||
|
|
||||||
SkFlattenable* Sk2DPathEffect::CreateProc(SkFlattenableReadBuffer& buffer) {
|
|
||||||
return SkNEW_ARGS(Sk2DPathEffect, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@ -100,19 +92,11 @@ SkPath2DPathEffect::SkPath2DPathEffect(SkFlattenableReadBuffer& buffer)
|
||||||
fPath.unflatten(buffer);
|
fPath.unflatten(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
SkFlattenable* SkPath2DPathEffect::CreateProc(SkFlattenableReadBuffer& buffer) {
|
|
||||||
return SkNEW_ARGS(SkPath2DPathEffect, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
void SkPath2DPathEffect::flatten(SkFlattenableWriteBuffer& buffer) {
|
void SkPath2DPathEffect::flatten(SkFlattenableWriteBuffer& buffer) {
|
||||||
this->INHERITED::flatten(buffer);
|
this->INHERITED::flatten(buffer);
|
||||||
fPath.flatten(buffer);
|
fPath.flatten(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
SkFlattenable::Factory SkPath2DPathEffect::getFactory() {
|
|
||||||
return CreateProc;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SkPath2DPathEffect::next(const SkPoint& loc, int u, int v, SkPath* dst) {
|
void SkPath2DPathEffect::next(const SkPoint& loc, int u, int v, SkPath* dst) {
|
||||||
dst->addPath(fPath, loc.fX, loc.fY);
|
dst->addPath(fPath, loc.fX, loc.fY);
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,20 +13,13 @@ public:
|
||||||
|
|
||||||
virtual void xfer32(SkPMColor dst[], const SkPMColor src[], int count,
|
virtual void xfer32(SkPMColor dst[], const SkPMColor src[], int count,
|
||||||
const SkAlpha aa[]) SK_OVERRIDE;
|
const SkAlpha aa[]) SK_OVERRIDE;
|
||||||
virtual Factory getFactory() SK_OVERRIDE;
|
|
||||||
|
|
||||||
static SkFlattenable* Create(SkFlattenableReadBuffer& buffer) {
|
SK_DECLARE_UNFLATTENABLE_OBJECT()
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SkScalar fK[4];
|
SkScalar fK[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
SkFlattenable::Factory SkArithmeticMode_scalar::getFactory() {
|
|
||||||
return Create;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int pinToByte(int value) {
|
static int pinToByte(int value) {
|
||||||
if (value < 0) {
|
if (value < 0) {
|
||||||
value = 0;
|
value = 0;
|
||||||
|
|
|
@ -38,16 +38,6 @@ void SkAvoidXfermode::flatten(SkFlattenableWriteBuffer& buffer)
|
||||||
buffer.write8(fMode);
|
buffer.write8(fMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
SkFlattenable* SkAvoidXfermode::Create(SkFlattenableReadBuffer& rb)
|
|
||||||
{
|
|
||||||
return SkNEW_ARGS(SkAvoidXfermode, (rb));
|
|
||||||
}
|
|
||||||
|
|
||||||
SkFlattenable::Factory SkAvoidXfermode::getFactory()
|
|
||||||
{
|
|
||||||
return Create;
|
|
||||||
}
|
|
||||||
|
|
||||||
// returns 0..31
|
// returns 0..31
|
||||||
static unsigned color_dist16(uint16_t c, unsigned r, unsigned g, unsigned b)
|
static unsigned color_dist16(uint16_t c, unsigned r, unsigned g, unsigned b)
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,10 +25,9 @@ public:
|
||||||
virtual void computeFastBounds(const SkRect& src, SkRect* dst) SK_OVERRIDE;
|
virtual void computeFastBounds(const SkRect& src, SkRect* dst) SK_OVERRIDE;
|
||||||
|
|
||||||
// overrides from SkFlattenable
|
// overrides from SkFlattenable
|
||||||
virtual Factory getFactory() SK_OVERRIDE;
|
|
||||||
virtual void flatten(SkFlattenableWriteBuffer&) SK_OVERRIDE;
|
virtual void flatten(SkFlattenableWriteBuffer&) SK_OVERRIDE;
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer&);
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBlurMaskFilterImpl)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SkScalar fRadius;
|
SkScalar fRadius;
|
||||||
|
@ -104,14 +103,6 @@ void SkBlurMaskFilterImpl::computeFastBounds(const SkRect& src, SkRect* dst) {
|
||||||
src.fRight + fRadius, src.fBottom + fRadius);
|
src.fRight + fRadius, src.fBottom + fRadius);
|
||||||
}
|
}
|
||||||
|
|
||||||
SkFlattenable* SkBlurMaskFilterImpl::CreateProc(SkFlattenableReadBuffer& buffer) {
|
|
||||||
return SkNEW_ARGS(SkBlurMaskFilterImpl, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
SkFlattenable::Factory SkBlurMaskFilterImpl::getFactory() {
|
|
||||||
return CreateProc;
|
|
||||||
}
|
|
||||||
|
|
||||||
SkBlurMaskFilterImpl::SkBlurMaskFilterImpl(SkFlattenableReadBuffer& buffer)
|
SkBlurMaskFilterImpl::SkBlurMaskFilterImpl(SkFlattenableReadBuffer& buffer)
|
||||||
: SkMaskFilter(buffer) {
|
: SkMaskFilter(buffer) {
|
||||||
fRadius = buffer.readScalar();
|
fRadius = buffer.readScalar();
|
||||||
|
|
|
@ -96,13 +96,9 @@ public:
|
||||||
sk_memset16(result, SkPixel32ToPixel16(fPMColor), count);
|
sk_memset16(result, SkPixel32ToPixel16(fPMColor), count);
|
||||||
}
|
}
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Src_SkModeColorFilter)
|
||||||
return SkNEW_ARGS(Src_SkModeColorFilter, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual Factory getFactory() { return CreateProc; }
|
|
||||||
|
|
||||||
Src_SkModeColorFilter(SkFlattenableReadBuffer& buffer)
|
Src_SkModeColorFilter(SkFlattenableReadBuffer& buffer)
|
||||||
: INHERITED(buffer) {}
|
: INHERITED(buffer) {}
|
||||||
|
|
||||||
|
@ -139,13 +135,9 @@ public:
|
||||||
sk_memset16(result, SkPixel32ToPixel16(fPMColor), count);
|
sk_memset16(result, SkPixel32ToPixel16(fPMColor), count);
|
||||||
}
|
}
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SrcOver_SkModeColorFilter)
|
||||||
return SkNEW_ARGS(SrcOver_SkModeColorFilter, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual Factory getFactory() { return CreateProc; }
|
|
||||||
|
|
||||||
SrcOver_SkModeColorFilter(SkFlattenableReadBuffer& buffer)
|
SrcOver_SkModeColorFilter(SkFlattenableReadBuffer& buffer)
|
||||||
: INHERITED(buffer), fColor32Proc(NULL) {}
|
: INHERITED(buffer), fColor32Proc(NULL) {}
|
||||||
|
|
||||||
|
@ -198,9 +190,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Proc_SkModeColorFilter)
|
||||||
return SkNEW_ARGS(Proc_SkModeColorFilter, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void flatten(SkFlattenableWriteBuffer& buffer) {
|
virtual void flatten(SkFlattenableWriteBuffer& buffer) {
|
||||||
|
@ -209,10 +199,6 @@ protected:
|
||||||
buffer.writeFunctionPtr((void*)fProc16);
|
buffer.writeFunctionPtr((void*)fProc16);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual Factory getFactory() {
|
|
||||||
return CreateProc;
|
|
||||||
}
|
|
||||||
|
|
||||||
Proc_SkModeColorFilter(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {
|
Proc_SkModeColorFilter(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {
|
||||||
fProc = (SkXfermodeProc) buffer.readFunctionPtr();
|
fProc = (SkXfermodeProc) buffer.readFunctionPtr();
|
||||||
fProc16 = (SkXfermodeProc16) buffer.readFunctionPtr();
|
fProc16 = (SkXfermodeProc16) buffer.readFunctionPtr();
|
||||||
|
@ -323,9 +309,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLightingColorFilter)
|
||||||
return SkNEW_ARGS(SkLightingColorFilter, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void flatten(SkFlattenableWriteBuffer& buffer) {
|
virtual void flatten(SkFlattenableWriteBuffer& buffer) {
|
||||||
|
@ -334,10 +318,6 @@ protected:
|
||||||
buffer.write32(fAdd);
|
buffer.write32(fAdd);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual Factory getFactory() {
|
|
||||||
return CreateProc;
|
|
||||||
}
|
|
||||||
|
|
||||||
SkLightingColorFilter(SkFlattenableReadBuffer& buffer) {
|
SkLightingColorFilter(SkFlattenableReadBuffer& buffer) {
|
||||||
fMul = buffer.readU32();
|
fMul = buffer.readU32();
|
||||||
fAdd = buffer.readU32();
|
fAdd = buffer.readU32();
|
||||||
|
@ -374,13 +354,9 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLightingColorFilter_JustAdd)
|
||||||
return SkNEW_ARGS(SkLightingColorFilter_JustAdd, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual Factory getFactory() { return CreateProc; }
|
|
||||||
|
|
||||||
SkLightingColorFilter_JustAdd(SkFlattenableReadBuffer& buffer)
|
SkLightingColorFilter_JustAdd(SkFlattenableReadBuffer& buffer)
|
||||||
: INHERITED(buffer) {}
|
: INHERITED(buffer) {}
|
||||||
|
|
||||||
|
@ -412,13 +388,9 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLightingColorFilter_JustMul)
|
||||||
return SkNEW_ARGS(SkLightingColorFilter_JustMul, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual Factory getFactory() { return CreateProc; }
|
|
||||||
|
|
||||||
SkLightingColorFilter_JustMul(SkFlattenableReadBuffer& buffer)
|
SkLightingColorFilter_JustMul(SkFlattenableReadBuffer& buffer)
|
||||||
: INHERITED(buffer) {}
|
: INHERITED(buffer) {}
|
||||||
|
|
||||||
|
@ -453,13 +425,9 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLightingColorFilter_SingleMul)
|
||||||
return SkNEW_ARGS(SkLightingColorFilter_SingleMul, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual Factory getFactory() { return CreateProc; }
|
|
||||||
|
|
||||||
SkLightingColorFilter_SingleMul(SkFlattenableReadBuffer& buffer)
|
SkLightingColorFilter_SingleMul(SkFlattenableReadBuffer& buffer)
|
||||||
: INHERITED(buffer) {}
|
: INHERITED(buffer) {}
|
||||||
|
|
||||||
|
@ -496,13 +464,9 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLightingColorFilter_NoPin)
|
||||||
return SkNEW_ARGS(SkLightingColorFilter_NoPin, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual Factory getFactory() { return CreateProc; }
|
|
||||||
|
|
||||||
SkLightingColorFilter_NoPin(SkFlattenableReadBuffer& buffer)
|
SkLightingColorFilter_NoPin(SkFlattenableReadBuffer& buffer)
|
||||||
: INHERITED(buffer) {}
|
: INHERITED(buffer) {}
|
||||||
|
|
||||||
|
|
|
@ -318,8 +318,6 @@ void SkColorMatrixFilter::flatten(SkFlattenableWriteBuffer& buffer) {
|
||||||
buffer.write32(fFlags);
|
buffer.write32(fFlags);
|
||||||
}
|
}
|
||||||
|
|
||||||
SkFlattenable::Factory SkColorMatrixFilter::getFactory() { return CreateProc; }
|
|
||||||
|
|
||||||
SkColorMatrixFilter::SkColorMatrixFilter(SkFlattenableReadBuffer& buffer)
|
SkColorMatrixFilter::SkColorMatrixFilter(SkFlattenableReadBuffer& buffer)
|
||||||
: INHERITED(buffer) {
|
: INHERITED(buffer) {
|
||||||
fProc = (Proc)buffer.readFunctionPtr();
|
fProc = (Proc)buffer.readFunctionPtr();
|
||||||
|
@ -344,10 +342,6 @@ bool SkColorMatrixFilter::asColorMatrix(SkScalar matrix[20]) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
SkFlattenable* SkColorMatrixFilter::CreateProc(SkFlattenableReadBuffer& buf) {
|
|
||||||
return SkNEW_ARGS(SkColorMatrixFilter, (buf));
|
|
||||||
}
|
|
||||||
|
|
||||||
void SkColorMatrixFilter::setMatrix(const SkColorMatrix& matrix) {
|
void SkColorMatrixFilter::setMatrix(const SkColorMatrix& matrix) {
|
||||||
setup(matrix.fMat);
|
setup(matrix.fMat);
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,18 +129,10 @@ DONE:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
SkFlattenable::Factory SkCornerPathEffect::getFactory() {
|
|
||||||
return CreateProc;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SkCornerPathEffect::flatten(SkFlattenableWriteBuffer& buffer) {
|
void SkCornerPathEffect::flatten(SkFlattenableWriteBuffer& buffer) {
|
||||||
buffer.writeScalar(fRadius);
|
buffer.writeScalar(fRadius);
|
||||||
}
|
}
|
||||||
|
|
||||||
SkFlattenable* SkCornerPathEffect::CreateProc(SkFlattenableReadBuffer& buffer) {
|
|
||||||
return SkNEW_ARGS(SkCornerPathEffect, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
SkCornerPathEffect::SkCornerPathEffect(SkFlattenableReadBuffer& buffer) {
|
SkCornerPathEffect::SkCornerPathEffect(SkFlattenableReadBuffer& buffer) {
|
||||||
fRadius = buffer.readScalar();
|
fRadius = buffer.readScalar();
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,14 +67,6 @@ bool SkDiscretePathEffect::filterPath(SkPath* dst, const SkPath& src,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
SkFlattenable::Factory SkDiscretePathEffect::getFactory() {
|
|
||||||
return CreateProc;
|
|
||||||
}
|
|
||||||
|
|
||||||
SkFlattenable* SkDiscretePathEffect::CreateProc(SkFlattenableReadBuffer& buffer) {
|
|
||||||
return SkNEW_ARGS(SkDiscretePathEffect, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
void SkDiscretePathEffect::flatten(SkFlattenableWriteBuffer& buffer) {
|
void SkDiscretePathEffect::flatten(SkFlattenableWriteBuffer& buffer) {
|
||||||
buffer.writeScalar(fSegLength);
|
buffer.writeScalar(fSegLength);
|
||||||
buffer.writeScalar(fPerterb);
|
buffer.writeScalar(fPerterb);
|
||||||
|
|
|
@ -115,14 +115,6 @@ bool SkEmbossMaskFilter::filterMask(SkMask* dst, const SkMask& src,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
SkFlattenable* SkEmbossMaskFilter::CreateProc(SkFlattenableReadBuffer& buffer) {
|
|
||||||
return SkNEW_ARGS(SkEmbossMaskFilter, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
SkFlattenable::Factory SkEmbossMaskFilter::getFactory() {
|
|
||||||
return CreateProc;
|
|
||||||
}
|
|
||||||
|
|
||||||
SkEmbossMaskFilter::SkEmbossMaskFilter(SkFlattenableReadBuffer& buffer)
|
SkEmbossMaskFilter::SkEmbossMaskFilter(SkFlattenableReadBuffer& buffer)
|
||||||
: SkMaskFilter(buffer) {
|
: SkMaskFilter(buffer) {
|
||||||
buffer.read(&fLight, sizeof(fLight));
|
buffer.read(&fLight, sizeof(fLight));
|
||||||
|
|
|
@ -849,10 +849,6 @@ public:
|
||||||
SkScalar* twoPointRadialParams) const SK_OVERRIDE;
|
SkScalar* twoPointRadialParams) const SK_OVERRIDE;
|
||||||
virtual GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE;
|
virtual GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE;
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
|
||||||
return SkNEW_ARGS(Linear_Gradient, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void flatten(SkFlattenableWriteBuffer& buffer) SK_OVERRIDE {
|
virtual void flatten(SkFlattenableWriteBuffer& buffer) SK_OVERRIDE {
|
||||||
this->INHERITED::flatten(buffer);
|
this->INHERITED::flatten(buffer);
|
||||||
buffer.writeScalar(fStart.fX);
|
buffer.writeScalar(fStart.fX);
|
||||||
|
@ -861,13 +857,14 @@ public:
|
||||||
buffer.writeScalar(fEnd.fY);
|
buffer.writeScalar(fEnd.fY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Linear_Gradient)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Linear_Gradient(SkFlattenableReadBuffer& buffer)
|
Linear_Gradient(SkFlattenableReadBuffer& buffer)
|
||||||
: Gradient_Shader(buffer),
|
: Gradient_Shader(buffer),
|
||||||
fStart(unflatten_point(buffer)),
|
fStart(unflatten_point(buffer)),
|
||||||
fEnd(unflatten_point(buffer)) {
|
fEnd(unflatten_point(buffer)) {
|
||||||
}
|
}
|
||||||
virtual Factory getFactory() SK_OVERRIDE { return CreateProc; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef Gradient_Shader INHERITED;
|
typedef Gradient_Shader INHERITED;
|
||||||
|
@ -1510,10 +1507,6 @@ public:
|
||||||
return kRadial_GradientType;
|
return kRadial_GradientType;
|
||||||
}
|
}
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
|
||||||
return SkNEW_ARGS(Radial_Gradient, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void flatten(SkFlattenableWriteBuffer& buffer) SK_OVERRIDE {
|
virtual void flatten(SkFlattenableWriteBuffer& buffer) SK_OVERRIDE {
|
||||||
this->INHERITED::flatten(buffer);
|
this->INHERITED::flatten(buffer);
|
||||||
buffer.writeScalar(fCenter.fX);
|
buffer.writeScalar(fCenter.fX);
|
||||||
|
@ -1521,13 +1514,14 @@ public:
|
||||||
buffer.writeScalar(fRadius);
|
buffer.writeScalar(fRadius);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Radial_Gradient)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Radial_Gradient(SkFlattenableReadBuffer& buffer)
|
Radial_Gradient(SkFlattenableReadBuffer& buffer)
|
||||||
: Gradient_Shader(buffer),
|
: Gradient_Shader(buffer),
|
||||||
fCenter(unflatten_point(buffer)),
|
fCenter(unflatten_point(buffer)),
|
||||||
fRadius(buffer.readScalar()) {
|
fRadius(buffer.readScalar()) {
|
||||||
}
|
}
|
||||||
virtual Factory getFactory() SK_OVERRIDE { return CreateProc; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef Gradient_Shader INHERITED;
|
typedef Gradient_Shader INHERITED;
|
||||||
|
@ -2045,10 +2039,6 @@ public:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
|
||||||
return SkNEW_ARGS(Two_Point_Radial_Gradient, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void flatten(SkFlattenableWriteBuffer& buffer) SK_OVERRIDE {
|
virtual void flatten(SkFlattenableWriteBuffer& buffer) SK_OVERRIDE {
|
||||||
this->INHERITED::flatten(buffer);
|
this->INHERITED::flatten(buffer);
|
||||||
buffer.writeScalar(fCenter1.fX);
|
buffer.writeScalar(fCenter1.fX);
|
||||||
|
@ -2059,6 +2049,8 @@ public:
|
||||||
buffer.writeScalar(fRadius2);
|
buffer.writeScalar(fRadius2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Two_Point_Radial_Gradient)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Two_Point_Radial_Gradient(SkFlattenableReadBuffer& buffer)
|
Two_Point_Radial_Gradient(SkFlattenableReadBuffer& buffer)
|
||||||
: Gradient_Shader(buffer),
|
: Gradient_Shader(buffer),
|
||||||
|
@ -2068,7 +2060,6 @@ protected:
|
||||||
fRadius2(buffer.readScalar()) {
|
fRadius2(buffer.readScalar()) {
|
||||||
init();
|
init();
|
||||||
};
|
};
|
||||||
virtual Factory getFactory() SK_OVERRIDE { return CreateProc; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef Gradient_Shader INHERITED;
|
typedef Gradient_Shader INHERITED;
|
||||||
|
@ -2134,24 +2125,20 @@ public:
|
||||||
return kSweep_GradientType;
|
return kSweep_GradientType;
|
||||||
}
|
}
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
|
||||||
return SkNEW_ARGS(Sweep_Gradient, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void flatten(SkFlattenableWriteBuffer& buffer) SK_OVERRIDE {
|
virtual void flatten(SkFlattenableWriteBuffer& buffer) SK_OVERRIDE {
|
||||||
this->INHERITED::flatten(buffer);
|
this->INHERITED::flatten(buffer);
|
||||||
buffer.writeScalar(fCenter.fX);
|
buffer.writeScalar(fCenter.fX);
|
||||||
buffer.writeScalar(fCenter.fY);
|
buffer.writeScalar(fCenter.fY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Sweep_Gradient)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Sweep_Gradient(SkFlattenableReadBuffer& buffer)
|
Sweep_Gradient(SkFlattenableReadBuffer& buffer)
|
||||||
: Gradient_Shader(buffer),
|
: Gradient_Shader(buffer),
|
||||||
fCenter(unflatten_point(buffer)) {
|
fCenter(unflatten_point(buffer)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual Factory getFactory() SK_OVERRIDE { return CreateProc; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef Gradient_Shader INHERITED;
|
typedef Gradient_Shader INHERITED;
|
||||||
const SkPoint fCenter;
|
const SkPoint fCenter;
|
||||||
|
|
|
@ -83,10 +83,6 @@ void SkGroupShape::onDraw(SkCanvas* canvas) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SkFlattenable::Factory SkGroupShape::getFactory() {
|
|
||||||
return CreateProc;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SkGroupShape::flatten(SkFlattenableWriteBuffer& buffer) {
|
void SkGroupShape::flatten(SkFlattenableWriteBuffer& buffer) {
|
||||||
this->INHERITED::flatten(buffer);
|
this->INHERITED::flatten(buffer);
|
||||||
|
|
||||||
|
@ -127,9 +123,5 @@ SkGroupShape::SkGroupShape(SkFlattenableReadBuffer& buffer) : INHERITED(buffer){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SkFlattenable* SkGroupShape::CreateProc(SkFlattenableReadBuffer& buffer) {
|
|
||||||
return SkNEW_ARGS(SkGroupShape, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
SK_DEFINE_FLATTENABLE_REGISTRAR(SkGroupShape)
|
SK_DEFINE_FLATTENABLE_REGISTRAR(SkGroupShape)
|
||||||
|
|
||||||
|
|
|
@ -110,14 +110,6 @@ void SkKernel33MaskFilter::flatten(SkFlattenableWriteBuffer& wb) {
|
||||||
wb.write32(fShift);
|
wb.write32(fShift);
|
||||||
}
|
}
|
||||||
|
|
||||||
SkFlattenable::Factory SkKernel33MaskFilter::getFactory() {
|
|
||||||
return Create;
|
|
||||||
}
|
|
||||||
|
|
||||||
SkFlattenable* SkKernel33MaskFilter::Create(SkFlattenableReadBuffer& rb) {
|
|
||||||
return new SkKernel33MaskFilter(rb);
|
|
||||||
}
|
|
||||||
|
|
||||||
SkKernel33MaskFilter::SkKernel33MaskFilter(SkFlattenableReadBuffer& rb)
|
SkKernel33MaskFilter::SkKernel33MaskFilter(SkFlattenableReadBuffer& rb)
|
||||||
: SkKernel33ProcMaskFilter(rb) {
|
: SkKernel33ProcMaskFilter(rb) {
|
||||||
rb.read(fKernel, 9 * sizeof(int));
|
rb.read(fKernel, 9 * sizeof(int));
|
||||||
|
|
|
@ -216,13 +216,5 @@ void SkLayerRasterizer::flatten(SkFlattenableWriteBuffer& buffer) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SkFlattenable* SkLayerRasterizer::CreateProc(SkFlattenableReadBuffer& buffer) {
|
|
||||||
return SkNEW_ARGS(SkLayerRasterizer, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
SkFlattenable::Factory SkLayerRasterizer::getFactory() {
|
|
||||||
return CreateProc;
|
|
||||||
}
|
|
||||||
|
|
||||||
SK_DEFINE_FLATTENABLE_REGISTRAR(SkLayerRasterizer)
|
SK_DEFINE_FLATTENABLE_REGISTRAR(SkLayerRasterizer)
|
||||||
|
|
||||||
|
|
|
@ -28,12 +28,4 @@ SkPixelXorXfermode::SkPixelXorXfermode(SkFlattenableReadBuffer& rb)
|
||||||
fOpColor = rb.readU32();
|
fOpColor = rb.readU32();
|
||||||
}
|
}
|
||||||
|
|
||||||
SkFlattenable::Factory SkPixelXorXfermode::getFactory() {
|
|
||||||
return Create;
|
|
||||||
}
|
|
||||||
|
|
||||||
SkFlattenable* SkPixelXorXfermode::Create(SkFlattenableReadBuffer& rb) {
|
|
||||||
return SkNEW_ARGS(SkPixelXorXfermode, (rb));
|
|
||||||
}
|
|
||||||
|
|
||||||
SK_DEFINE_FLATTENABLE_REGISTRAR(SkPixelXorXfermode)
|
SK_DEFINE_FLATTENABLE_REGISTRAR(SkPixelXorXfermode)
|
||||||
|
|
|
@ -60,10 +60,6 @@ void SkRectShape::onDraw(SkCanvas* canvas) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SkFlattenable::Factory SkRectShape::getFactory() {
|
|
||||||
return CreateProc;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SkRectShape::flatten(SkFlattenableWriteBuffer& buffer) {
|
void SkRectShape::flatten(SkFlattenableWriteBuffer& buffer) {
|
||||||
this->INHERITED::flatten(buffer);
|
this->INHERITED::flatten(buffer);
|
||||||
|
|
||||||
|
@ -76,10 +72,6 @@ SkRectShape::SkRectShape(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {
|
||||||
buffer.read(&fRadii, sizeof(fRadii));
|
buffer.read(&fRadii, sizeof(fRadii));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkFlattenable* SkRectShape::CreateProc(SkFlattenableReadBuffer& buffer) {
|
|
||||||
return SkNEW_ARGS(SkRectShape, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void SkPaintShape::flatten(SkFlattenableWriteBuffer& buffer) {
|
void SkPaintShape::flatten(SkFlattenableWriteBuffer& buffer) {
|
||||||
|
|
|
@ -36,11 +36,8 @@ public:
|
||||||
virtual void filterSpan(const SkPMColor src[], int count,
|
virtual void filterSpan(const SkPMColor src[], int count,
|
||||||
SkPMColor dst[]) SK_OVERRIDE;
|
SkPMColor dst[]) SK_OVERRIDE;
|
||||||
virtual void flatten(SkFlattenableWriteBuffer&) SK_OVERRIDE;
|
virtual void flatten(SkFlattenableWriteBuffer&) SK_OVERRIDE;
|
||||||
virtual Factory getFactory() SK_OVERRIDE;
|
|
||||||
|
|
||||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTable_ColorFilter)
|
||||||
return SkNEW_ARGS(SkTable_ColorFilter, (buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SkTable_ColorFilter(SkFlattenableReadBuffer& buffer);
|
SkTable_ColorFilter(SkFlattenableReadBuffer& buffer);
|
||||||
|
@ -139,10 +136,6 @@ void SkTable_ColorFilter::filterSpan(const SkPMColor src[], int count,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SkFlattenable::Factory SkTable_ColorFilter::getFactory() {
|
|
||||||
return CreateProc;
|
|
||||||
}
|
|
||||||
|
|
||||||
static const uint8_t gCountNibBits[] = {
|
static const uint8_t gCountNibBits[] = {
|
||||||
0, 1, 1, 2,
|
0, 1, 1, 2,
|
||||||
1, 2, 2, 3,
|
1, 2, 2, 3,
|
||||||
|
|
|
@ -81,14 +81,6 @@ SkTableMaskFilter::SkTableMaskFilter(SkFlattenableReadBuffer& rb)
|
||||||
rb.read(fTable, 256);
|
rb.read(fTable, 256);
|
||||||
}
|
}
|
||||||
|
|
||||||
SkFlattenable* SkTableMaskFilter::Factory(SkFlattenableReadBuffer& rb) {
|
|
||||||
return SkNEW_ARGS(SkTableMaskFilter, (rb));
|
|
||||||
}
|
|
||||||
|
|
||||||
SkFlattenable::Factory SkTableMaskFilter::getFactory() {
|
|
||||||
return SkTableMaskFilter::Factory;
|
|
||||||
}
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void SkTableMaskFilter::MakeGammaTable(uint8_t table[256], SkScalar gamma) {
|
void SkTableMaskFilter::MakeGammaTable(uint8_t table[256], SkScalar gamma) {
|
||||||
|
|
|
@ -43,10 +43,6 @@ SkOffsetImageFilter::SkOffsetImageFilter(SkFlattenableReadBuffer& buffer) : INHE
|
||||||
fOffset.fY = buffer.readScalar();
|
fOffset.fY = buffer.readScalar();
|
||||||
}
|
}
|
||||||
|
|
||||||
SkFlattenable::Factory SkOffsetImageFilter::getFactory() {
|
|
||||||
return CreateProc;
|
|
||||||
}
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
SkComposeImageFilter::~SkComposeImageFilter() {
|
SkComposeImageFilter::~SkComposeImageFilter() {
|
||||||
|
@ -100,10 +96,6 @@ SkComposeImageFilter::SkComposeImageFilter(SkFlattenableReadBuffer& buffer) : IN
|
||||||
fInner = (SkImageFilter*)buffer.readFlattenable();
|
fInner = (SkImageFilter*)buffer.readFlattenable();
|
||||||
}
|
}
|
||||||
|
|
||||||
SkFlattenable::Factory SkComposeImageFilter::getFactory() {
|
|
||||||
return CreateProc;
|
|
||||||
}
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
template <typename T> T* SkSafeRefReturn(T* obj) {
|
template <typename T> T* SkSafeRefReturn(T* obj) {
|
||||||
|
@ -282,10 +274,6 @@ SkMergeImageFilter::SkMergeImageFilter(SkFlattenableReadBuffer& buffer) : INHERI
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SkFlattenable::Factory SkMergeImageFilter::getFactory() {
|
|
||||||
return CreateProc;
|
|
||||||
}
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "SkColorFilter.h"
|
#include "SkColorFilter.h"
|
||||||
|
@ -329,10 +317,6 @@ SkColorFilterImageFilter::SkColorFilterImageFilter(SkFlattenableReadBuffer& buff
|
||||||
fColorFilter = (SkColorFilter*)buffer.readFlattenable();
|
fColorFilter = (SkColorFilter*)buffer.readFlattenable();
|
||||||
}
|
}
|
||||||
|
|
||||||
SkFlattenable::Factory SkColorFilterImageFilter::getFactory() {
|
|
||||||
return CreateProc;
|
|
||||||
}
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
bool SkDownSampleImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& src,
|
bool SkDownSampleImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& src,
|
||||||
|
@ -395,10 +379,6 @@ SkDownSampleImageFilter::SkDownSampleImageFilter(SkFlattenableReadBuffer& buffer
|
||||||
fScale = buffer.readScalar();
|
fScale = buffer.readScalar();
|
||||||
}
|
}
|
||||||
|
|
||||||
SkFlattenable::Factory SkDownSampleImageFilter::getFactory() {
|
|
||||||
return CreateProc;
|
|
||||||
}
|
|
||||||
|
|
||||||
SK_DEFINE_FLATTENABLE_REGISTRAR(SkOffsetImageFilter)
|
SK_DEFINE_FLATTENABLE_REGISTRAR(SkOffsetImageFilter)
|
||||||
SK_DEFINE_FLATTENABLE_REGISTRAR(SkComposeImageFilter)
|
SK_DEFINE_FLATTENABLE_REGISTRAR(SkComposeImageFilter)
|
||||||
SK_DEFINE_FLATTENABLE_REGISTRAR(SkMergeImageFilter)
|
SK_DEFINE_FLATTENABLE_REGISTRAR(SkMergeImageFilter)
|
||||||
|
|
|
@ -126,10 +126,6 @@ void SkTransparentShader::shadeSpan16(int x, int y, uint16_t span[], int count)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SkFlattenable::Factory SkTransparentShader::getFactory() {
|
|
||||||
return Create;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SkTransparentShader::flatten(SkFlattenableWriteBuffer& buffer) {
|
void SkTransparentShader::flatten(SkFlattenableWriteBuffer& buffer) {
|
||||||
this->INHERITED::flatten(buffer);
|
this->INHERITED::flatten(buffer);
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,6 @@ SkDiscreteMapper::SkDiscreteMapper(SkFlattenableReadBuffer& rb)
|
||||||
fScale = rb.readU32();
|
fScale = rb.readU32();
|
||||||
}
|
}
|
||||||
|
|
||||||
SkFlattenable::Factory SkDiscreteMapper::getFactory() {
|
|
||||||
return Create;
|
|
||||||
}
|
|
||||||
|
|
||||||
SkFlattenable* SkDiscreteMapper::Create(SkFlattenableReadBuffer& rb) {
|
|
||||||
return SkNEW_ARGS(SkDiscreteMapper, (rb));
|
|
||||||
}
|
|
||||||
|
|
||||||
void SkDiscreteMapper::flatten(SkFlattenableWriteBuffer& wb) {
|
void SkDiscreteMapper::flatten(SkFlattenableWriteBuffer& wb) {
|
||||||
this->INHERITED::flatten(wb);
|
this->INHERITED::flatten(wb);
|
||||||
|
|
||||||
|
@ -65,11 +57,3 @@ uint16_t SkCosineMapper::mapUnit16(uint16_t input)
|
||||||
SkCosineMapper::SkCosineMapper(SkFlattenableReadBuffer& rb)
|
SkCosineMapper::SkCosineMapper(SkFlattenableReadBuffer& rb)
|
||||||
: SkUnitMapper(rb) {}
|
: SkUnitMapper(rb) {}
|
||||||
|
|
||||||
SkFlattenable::Factory SkCosineMapper::getFactory() {
|
|
||||||
return Create;
|
|
||||||
}
|
|
||||||
|
|
||||||
SkFlattenable* SkCosineMapper::Create(SkFlattenableReadBuffer& rb) {
|
|
||||||
return SkNEW_ARGS(SkCosineMapper, (rb));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -29,9 +29,7 @@ public:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual Factory getFactory() SK_OVERRIDE {
|
SK_DECLARE_UNFLATTENABLE_OBJECT()
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static void test_drawBitmap(skiatest::Reporter* reporter) {
|
static void test_drawBitmap(skiatest::Reporter* reporter) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче