aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/QuickRejectTest.cpp
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-01-07 09:06:08 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-01-07 09:06:08 -0800
commit7e44bb191633e225fd0455c267dbf67f9ee8633e (patch)
tree72f17ea3dcd93cd246d1f436317c8131cd69ec69 /tests/QuickRejectTest.cpp
parent152f524fd325b7776b01f84afbfe2fa071648a05 (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 'tests/QuickRejectTest.cpp')
-rw-r--r--tests/QuickRejectTest.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/QuickRejectTest.cpp b/tests/QuickRejectTest.cpp
index 8f4357e0b0..77bcd3c9b1 100644
--- a/tests/QuickRejectTest.cpp
+++ b/tests/QuickRejectTest.cpp
@@ -28,6 +28,8 @@ public:
}
#endif
+ SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(TestLooper);
+
private:
class TestDrawLooperContext : public SkDrawLooper::Context {
public:
@@ -45,10 +47,10 @@ private:
private:
bool fOnce;
};
-
- SK_DECLARE_UNFLATTENABLE_OBJECT()
};
+SkFlattenable* TestLooper::CreateProc(SkReadBuffer&) { return SkNEW(TestLooper); }
+
static void test_drawBitmap(skiatest::Reporter* reporter) {
SkBitmap src;
src.allocN32Pixels(10, 10);