diff options
author | mtklein <mtklein@chromium.org> | 2015-01-07 09:06:08 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-07 09:06:08 -0800 |
commit | 7e44bb191633e225fd0455c267dbf67f9ee8633e (patch) | |
tree | 72f17ea3dcd93cd246d1f436317c8131cd69ec69 /src/animator | |
parent | 152f524fd325b7776b01f84afbfe2fa071648a05 (diff) |
Remove macros that make it look like it's a good idea to not be able to flatten.
There are only a handful of SkFlattenables that are not flattenable. That
there are any seems highly illogical. To make this look less like a normal
thing, this removes both macros that marked SkFlattenables as non-flattenable
(in slightly different ways).
The handful of SkFlattenables in our codebase that can't be flattened now
assert violently that they can't be flattened. They're internal or
part of animator... places where we'll never actually flatten them.
TestLooper and DummyRasterizer were so trivial that I just made them flattenable.
BUG=skia:
Review URL: https://codereview.chromium.org/841753002
Diffstat (limited to 'src/animator')
-rw-r--r-- | src/animator/SkDrawExtraPathEffect.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/animator/SkDrawExtraPathEffect.cpp b/src/animator/SkDrawExtraPathEffect.cpp index cc097d0a9e..dc586055a7 100644 --- a/src/animator/SkDrawExtraPathEffect.cpp +++ b/src/animator/SkDrawExtraPathEffect.cpp @@ -89,7 +89,8 @@ public: fDraw(draw), fMaker(maker) { } - SK_DECLARE_UNFLATTENABLE_OBJECT() + // For serialization. This will never be called. + Factory getFactory() const SK_OVERRIDE { sk_throw(); return NULL; } protected: virtual SkScalar begin(SkScalar contourLength) const SK_OVERRIDE { @@ -228,6 +229,9 @@ public: const SkMatrix& matrix) : Sk2DPathEffect(matrix), fDraw(draw), fMaker(maker) { } + // For serialization. This will never be called. + Factory getFactory() const SK_OVERRIDE { sk_throw(); return NULL; } + protected: virtual void begin(const SkIRect& uvBounds, SkPath*) const SK_OVERRIDE { const_cast<SkShape2DPathEffect*>(this)->setUVBounds(uvBounds); |