aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/SkRasterPipelineTest.cpp
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2018-05-22 10:32:20 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-23 12:30:36 +0000
commit6747f52778135ee59debe52ac27d8f19333d75f2 (patch)
treea4971615d99d6c5268354a81ff71c23bd97026e4 /tests/SkRasterPipelineTest.cpp
parentbb9cad053ba577e7e20e03c15a5243faa82ece5b (diff)
Reland "start cleaning up non-skcms SkColorSpaceXforms"
This is a reland of 339133f82c30cd3080672db28e6f72c894cba05a Original change's description: > start cleaning up non-skcms SkColorSpaceXforms > > I think this gets rid of > - SkColorSpaceXform_Base > - SkColorSpaceXform_XYZ > - SkColorSpaceXform_A2B > and lots of support code. Might be more left to clean up? > > Change-Id: I560d974d1e879dfd6a63ee2244a3dd88bd495c8a > Reviewed-on: https://skia-review.googlesource.com/129512 > Commit-Queue: Brian Osman <brianosman@google.com> > Auto-Submit: Mike Klein <mtklein@chromium.org> > Reviewed-by: Brian Osman <brianosman@google.com> Change-Id: I33ee0d8bcfd72c401823a2e7d5168c9ecc9a5181 Reviewed-on: https://skia-review.googlesource.com/129624 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
Diffstat (limited to 'tests/SkRasterPipelineTest.cpp')
-rw-r--r--tests/SkRasterPipelineTest.cpp48
1 files changed, 0 insertions, 48 deletions
diff --git a/tests/SkRasterPipelineTest.cpp b/tests/SkRasterPipelineTest.cpp
index ac0278386a..e54c8c8039 100644
--- a/tests/SkRasterPipelineTest.cpp
+++ b/tests/SkRasterPipelineTest.cpp
@@ -93,14 +93,6 @@ static uint16_t h(float f) {
: SkTo<uint16_t>((s>>16) + (em>>13) - ((127-15)<<10));
}
-static uint16_t n(uint16_t x) {
- return (x<<8) | (x>>8);
-}
-
-static float a(uint16_t x) {
- return (1/65535.0f) * x;
-}
-
DEF_TEST(SkRasterPipeline_tail, r) {
{
float data[][4] = {
@@ -164,46 +156,6 @@ DEF_TEST(SkRasterPipeline_tail, r) {
}
}
}
-
- {
- uint16_t data[][3] = {
- {n(00), n(01), n(02)},
- {n(10), n(11), n(12)},
- {n(20), n(21), n(22)},
- {n(30), n(31), n(32)}
- };
-
- float answer[][4] = {
- {a(00), a(01), a(02), 1.0f},
- {a(10), a(11), a(12), 1.0f},
- {a(20), a(21), a(22), 1.0f},
- {a(30), a(31), a(32), 1.0f}
- };
-
- float buffer[4][4];
- SkJumper_MemoryCtx src = { &data[0][0], 0 },
- dst = { &buffer[0][0], 0 };
-
- for (unsigned i = 1; i <= 4; i++) {
- memset(buffer, 0xff, sizeof(buffer));
- SkRasterPipeline_<256> p;
- p.append(SkRasterPipeline::load_rgb_u16_be, &src);
- p.append(SkRasterPipeline::store_f32, &dst);
- p.run(0,0, i,1);
- for (unsigned j = 0; j < i; j++) {
- for (unsigned k = 0; k < 4; k++) {
- if (buffer[j][k] != answer[j][k]) {
- ERRORF(r, "(%u, %u) - a: %g r: %g\n", j, k, answer[j][k], buffer[j][k]);
- }
- }
- }
- for (int j = i; j < 4; j++) {
- for (auto f : buffer[j]) {
- REPORTER_ASSERT(r, SkScalarIsNaN(f));
- }
- }
- }
- }
}
DEF_TEST(SkRasterPipeline_lowp, r) {