diff options
author | Mike Klein <mtklein@chromium.org> | 2017-07-18 18:15:13 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-07-20 19:50:32 +0000 |
commit | 45c16fa82cd2fec010d4cb7763b654a413cabd0c (patch) | |
tree | 2c6e4376e11dca4b4c3ae479b7835096124016f5 /tests/SRGBTest.cpp | |
parent | 3f4671871fac8e5439440ce756d0666bc2a96f46 (diff) |
convert over to 2d-mode
[√] convert all stages to use SkJumper_MemoryCtx / be 2d-compatible
[√] convert compile to 2d also, remove 1d run/compile
[√] convert all call sites
[√] no diffs
Change-Id: I3b806eb8fe0c3ec043359616409f7cd1211a1e43
Reviewed-on: https://skia-review.googlesource.com/24263
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'tests/SRGBTest.cpp')
-rw-r--r-- | tests/SRGBTest.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/SRGBTest.cpp b/tests/SRGBTest.cpp index fc02f7d96c..1db9eb306f 100644 --- a/tests/SRGBTest.cpp +++ b/tests/SRGBTest.cpp @@ -11,6 +11,7 @@ #include "SkTypes.h" #include "Test.h" #include <math.h> +#include "../src/jumper/SkJumper.h" static uint8_t linear_to_srgb(float l) { return (uint8_t)sk_linear_to_srgb(Sk4f{l})[0]; @@ -46,7 +47,7 @@ DEF_TEST(sk_pipeline_srgb_roundtrip, r) { reds[i] = i; } - auto ptr = (void*)reds; + SkJumper_MemoryCtx ptr = { reds, 0 }; SkRasterPipeline_<256> p; p.append(SkRasterPipeline::load_8888, &ptr); @@ -54,7 +55,7 @@ DEF_TEST(sk_pipeline_srgb_roundtrip, r) { p.append(SkRasterPipeline::to_srgb); p.append(SkRasterPipeline::store_8888, &ptr); - p.run(0,0,256); + p.run(0,0,256,1); for (int i = 0; i < 256; i++) { if (reds[i] != (uint32_t)i) { @@ -67,13 +68,14 @@ DEF_TEST(sk_pipeline_srgb_edge_cases, r) { // We need to run at least 4 pixels to make sure we hit all specializations. SkPM4f colors[4] = { {{0,1,1,1}}, {{0,0,0,0}}, {{0,0,0,0}}, {{0,0,0,0}} }; auto& color = colors[0]; - void* dst = &color; + + SkJumper_MemoryCtx dst = { &color, 0 }; SkRasterPipeline_<256> p; p.append(SkRasterPipeline::uniform_color, &color); p.append(SkRasterPipeline::to_srgb); p.append(SkRasterPipeline::store_f32, &dst); - p.run(0,0,4); + p.run(0,0,4,1); if (color.r() != 0.0f) { ERRORF(r, "expected to_srgb() to map 0.0f to 0.0f, got %f", color.r()); |