Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(464)

Side by Side Diff: tests/SkRasterPipelineTest.cpp

Issue 2149443002: SkRasterPipeline: simplify impl and remove need to rewire stages (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: comments Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/core/SkRasterPipeline.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "Test.h" 8 #include "Test.h"
9 #include "SkRasterPipeline.h" 9 #include "SkRasterPipeline.h"
10 10
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 p.append(store, store_tail, dst_vals); 78 p.append(store, store_tail, dst_vals);
79 79
80 p.run(5); 80 p.run(5);
81 81
82 REPORTER_ASSERT(r, dst_vals[0] == 1); 82 REPORTER_ASSERT(r, dst_vals[0] == 1);
83 REPORTER_ASSERT(r, dst_vals[1] == 4); 83 REPORTER_ASSERT(r, dst_vals[1] == 4);
84 REPORTER_ASSERT(r, dst_vals[2] == 9); 84 REPORTER_ASSERT(r, dst_vals[2] == 9);
85 REPORTER_ASSERT(r, dst_vals[3] == 16); 85 REPORTER_ASSERT(r, dst_vals[3] == 16);
86 REPORTER_ASSERT(r, dst_vals[4] == 25); 86 REPORTER_ASSERT(r, dst_vals[4] == 25);
87 } 87 }
88
89 DEF_TEST(SkRasterPipeline_empty, r) {
90 // No asserts... just a test that this is safe to run.
91 SkRasterPipeline p;
92 p.run(20);
93 }
94
95 DEF_TEST(SkRasterPipeline_nonsense, r) {
96 // No asserts... just a test that this is safe to run and terminates.
97 // square() always calls st->next(); this makes sure we've always got someth ing there to call.
98 SkRasterPipeline p;
99 p.append(square);
100 p.run(20);
101 }
OLDNEW
« no previous file with comments | « src/core/SkRasterPipeline.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698