aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/SkRasterPipelineTest.cpp
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-01-20 15:11:54 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-01-23 20:00:23 +0000
commit319ba3d3a177498095c31696e0aec8b3af25f663 (patch)
treebed59456eaf6d87a39eed79c33df5e3fe6921e8b /tests/SkRasterPipelineTest.cpp
parent889176b3a3b5b71cc05c51dad3e7d2ddac610b7e (diff)
Move shader register setup to SkRasterPipelineBlitter.
We've been seeding the initial values of our registers to x+0.5,y+0.5, 1,0, 0,0,0,0 (useful values for shaders to start with) in all pipelines. This CL changes that to do so only when blitting, and only when we have a shader. The nicest part of this change is that SkRasterPipeline itself no longer needs to have a concept of y, or what x means. It just marches x through [x,x+n), and the blitter handles y and layers the meaning of "dst x coordinate" onto x. This ought to make SkSplicer a little easier to work with too. dm --src gm --config f16 srgb 565 all draws the same. Change-Id: I69d8c1cc14a06e5dfdd6a7493364f43a18f8dec5 Reviewed-on: https://skia-review.googlesource.com/7353 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'tests/SkRasterPipelineTest.cpp')
-rw-r--r--tests/SkRasterPipelineTest.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/SkRasterPipelineTest.cpp b/tests/SkRasterPipelineTest.cpp
index a3314b80b0..4e992cb6e0 100644
--- a/tests/SkRasterPipelineTest.cpp
+++ b/tests/SkRasterPipelineTest.cpp
@@ -27,7 +27,7 @@ DEF_TEST(SkRasterPipeline, r) {
p.append(SkRasterPipeline::swap);
p.append(SkRasterPipeline::srcover);
p.append(SkRasterPipeline::store_f16, &store_ctx);
- p.run(0,0, 1);
+ p.run(0,1);
// We should see half-intensity magenta.
REPORTER_ASSERT(r, ((result >> 0) & 0xffff) == 0x3800);
@@ -39,7 +39,7 @@ DEF_TEST(SkRasterPipeline, r) {
result = 0;
auto fn = p.compile();
- fn(0,0, 1);
+ fn(0,1);
REPORTER_ASSERT(r, ((result >> 0) & 0xffff) == 0x3800);
REPORTER_ASSERT(r, ((result >> 16) & 0xffff) == 0x0000);
REPORTER_ASSERT(r, ((result >> 32) & 0xffff) == 0x3800);
@@ -49,7 +49,7 @@ DEF_TEST(SkRasterPipeline, r) {
DEF_TEST(SkRasterPipeline_empty, r) {
// No asserts... just a test that this is safe to run.
SkRasterPipeline p;
- p.run(0,0, 20);
+ p.run(0,20);
}
DEF_TEST(SkRasterPipeline_nonsense, r) {
@@ -57,7 +57,7 @@ DEF_TEST(SkRasterPipeline_nonsense, r) {
// srcover() calls st->next(); this makes sure we've always got something there to call.
SkRasterPipeline p;
p.append(SkRasterPipeline::srcover);
- p.run(0,0, 20);
+ p.run(0,20);
}
DEF_TEST(SkRasterPipeline_JIT, r) {
@@ -80,7 +80,7 @@ DEF_TEST(SkRasterPipeline_JIT, r) {
p.append(SkRasterPipeline:: load_8888, &src);
p.append(SkRasterPipeline::store_8888, &dst);
auto fn = p.compile();
- fn(15, 0, 20);
+ fn(15, 20);
for (int i = 0; i < 36; i++) {
if (i < 15 || i == 35) {