From be0bd925614bcfdea859416177b527294a6c92b1 Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Fri, 20 Oct 2017 14:50:12 -0400 Subject: 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 Commit-Queue: Mike Klein --- tests/SkRasterPipelineTest.cpp | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'tests/SkRasterPipelineTest.cpp') 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); -} -- cgit v1.2.3