aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/SkRasterPipelineTest.cpp
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2016-07-13 08:22:20 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-13 08:22:20 -0700
commit0abddf7bb7f77b1ff6a48efc9d1eafd053d975d2 (patch)
treee1c90476b5c025a6dd1c1ec172379dd5413037f4 /tests/SkRasterPipelineTest.cpp
parentf461e7c2277984783f43b5578044fc9a0c856e64 (diff)
SkRasterPipeline: simplify impl and remove need to rewire stages
This builds the stages correctly wired from the get-go. With a little clever setup, we can also design around the previous error cases like having no stages or pipelines that call st->next() off the end. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2149443002 Review-Url: https://codereview.chromium.org/2149443002
Diffstat (limited to 'tests/SkRasterPipelineTest.cpp')
-rw-r--r--tests/SkRasterPipelineTest.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/SkRasterPipelineTest.cpp b/tests/SkRasterPipelineTest.cpp
index 1db0206705..beb517b3f7 100644
--- a/tests/SkRasterPipelineTest.cpp
+++ b/tests/SkRasterPipelineTest.cpp
@@ -85,3 +85,17 @@ DEF_TEST(SkRasterPipeline, r) {
REPORTER_ASSERT(r, dst_vals[3] == 16);
REPORTER_ASSERT(r, dst_vals[4] == 25);
}
+
+DEF_TEST(SkRasterPipeline_empty, r) {
+ // No asserts... just a test that this is safe to run.
+ SkRasterPipeline p;
+ p.run(20);
+}
+
+DEF_TEST(SkRasterPipeline_nonsense, r) {
+ // No asserts... just a test that this is safe to run and terminates.
+ // square() always calls st->next(); this makes sure we've always got something there to call.
+ SkRasterPipeline p;
+ p.append(square);
+ p.run(20);
+}