diff options
author | Mike Klein <mtklein@chromium.org> | 2017-10-20 14:50:12 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-10-24 17:31:51 +0000 |
commit | be0bd925614bcfdea859416177b527294a6c92b1 (patch) | |
tree | df2abf0d5de9d9ea2118d59785c4c7d620435ee4 /tests/SkRasterPipelineTest.cpp | |
parent | f47069cdbbc8026295e4e23db001401861e3e63e (diff) |
more easy lowp shader stages
This fills out a couple more matrix and gather stages.
Deletes a not particularly important unit test that was using a
scale matrix in a weird, non-lowp compatible way.
This will require guards for Blink layout tests.
Change-Id: I54cb228ff541f771e8f4758f07d26c5161d48af3
Reviewed-on: https://skia-review.googlesource.com/62520
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'tests/SkRasterPipelineTest.cpp')
-rw-r--r-- | tests/SkRasterPipelineTest.cpp | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/tests/SkRasterPipelineTest.cpp b/tests/SkRasterPipelineTest.cpp index 773c0d5d66..1923f1cb64 100644 --- a/tests/SkRasterPipelineTest.cpp +++ b/tests/SkRasterPipelineTest.cpp @@ -232,33 +232,3 @@ DEF_TEST(SkRasterPipeline_lowp, r) { } } } - -DEF_TEST(SkRasterPipeline_2d, r) { - uint32_t rgba[2*2] = {0,0,0,0}; - - SkSTArenaAlloc<256> alloc; - SkRasterPipeline p(&alloc); - - // Splat out the (2d) dst coordinates: (0.5,0.5), (1.5,0.5), (0.5,1.5), (1.5,1.5). - p.append_seed_shader(); - - // Scale down to [0,1] range to write out as bytes. - p.append_matrix(&alloc, SkMatrix::Concat(SkMatrix::MakeScale(0.5f), - SkMatrix::MakeTrans(-0.5f, -0.5f))); - - // Write out to rgba, with row stride = 2 pixels. - SkJumper_MemoryCtx ctx = { rgba, 2 }; - p.append(SkRasterPipeline::store_8888, &ctx); - - p.run(0,0, 2,2); - - REPORTER_ASSERT(r, ((rgba[0] >> 0) & 0xff) == 0); - REPORTER_ASSERT(r, ((rgba[1] >> 0) & 0xff) == 128); - REPORTER_ASSERT(r, ((rgba[2] >> 0) & 0xff) == 0); - REPORTER_ASSERT(r, ((rgba[3] >> 0) & 0xff) == 128); - - REPORTER_ASSERT(r, ((rgba[0] >> 8) & 0xff) == 0); - REPORTER_ASSERT(r, ((rgba[1] >> 8) & 0xff) == 0); - REPORTER_ASSERT(r, ((rgba[2] >> 8) & 0xff) == 128); - REPORTER_ASSERT(r, ((rgba[3] >> 8) & 0xff) == 128); -} |