diff options
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()); |