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>
diff --git a/src/images/SkImageEncoderFns.h b/src/images/SkImageEncoderFns.h
index 4e73e4f..eb6ce8b 100644
--- a/src/images/SkImageEncoderFns.h
+++ b/src/images/SkImageEncoderFns.h
@@ -22,6 +22,7 @@
 #include "SkRasterPipeline.h"
 #include "SkUnPreMultiply.h"
 #include "SkUnPreMultiplyPriv.h"
+#include "../jumper/SkJumper.h"
 
 /**
  * Function template for transforming scanlines.
@@ -153,18 +154,20 @@
 
 template <bool kIsRGBA>
 static inline void transform_scanline_unpremultiply_sRGB(void* dst, const void* src, int width) {
+    SkJumper_MemoryCtx src_ctx = { (void*)src, 0 },
+                       dst_ctx = { (void*)dst, 0 };
     SkRasterPipeline_<256> p;
     if (kIsRGBA) {
-        p.append(SkRasterPipeline::load_8888, &src);
+        p.append(SkRasterPipeline::load_8888, &src_ctx);
     } else {
-        p.append(SkRasterPipeline::load_bgra, &src);
+        p.append(SkRasterPipeline::load_bgra, &src_ctx);
     }
 
     p.append_from_srgb(kPremul_SkAlphaType);
     p.append(SkRasterPipeline::unpremul);
     p.append(SkRasterPipeline::to_srgb);
-    p.append(SkRasterPipeline::store_8888, &dst);
-    p.run(0,0, width);
+    p.append(SkRasterPipeline::store_8888, &dst_ctx);
+    p.run(0,0, width,1);
 }
 
 /**
@@ -182,13 +185,15 @@
 static inline void transform_scanline_to_premul_linear(char* SK_RESTRICT dst,
                                                        const char* SK_RESTRICT src,
                                                        int width, int, const SkPMColor*) {
+    SkJumper_MemoryCtx src_ctx = { (void*)src, 0 },
+                       dst_ctx = { (void*)dst, 0 };
     SkRasterPipeline_<256> p;
-    p.append(SkRasterPipeline::load_8888, (const void**) &src);
+    p.append(SkRasterPipeline::load_8888, &src_ctx);
     p.append_from_srgb(kUnpremul_SkAlphaType);
     p.append(SkRasterPipeline::premul);
     p.append(SkRasterPipeline::to_srgb);
-    p.append(SkRasterPipeline::store_8888, (void**) &dst);
-    p.run(0,0, width);
+    p.append(SkRasterPipeline::store_8888, &dst_ctx);
+    p.run(0,0, width,1);
 }
 
 /**
@@ -256,11 +261,13 @@
  */
 static inline void transform_scanline_F16(char* SK_RESTRICT dst, const char* SK_RESTRICT src,
                                           int width, int, const SkPMColor*) {
+    SkJumper_MemoryCtx src_ctx = { (void*)src, 0 },
+                       dst_ctx = { (void*)dst, 0 };
     SkRasterPipeline_<256> p;
-    p.append(SkRasterPipeline::load_f16, (const void**) &src);
+    p.append(SkRasterPipeline::load_f16, &src_ctx);
     p.append(SkRasterPipeline::to_srgb);
-    p.append(SkRasterPipeline::store_u16_be, (void**) &dst);
-    p.run(0,0, width);
+    p.append(SkRasterPipeline::store_u16_be, &dst_ctx);
+    p.run(0,0, width,1);
 }
 
 /**
@@ -268,12 +275,14 @@
  */
 static inline void transform_scanline_F16_premul(char* SK_RESTRICT dst, const char* SK_RESTRICT src,
                                                  int width, int, const SkPMColor*) {
+    SkJumper_MemoryCtx src_ctx = { (void*)src, 0 },
+                       dst_ctx = { (void*)dst, 0 };
     SkRasterPipeline_<256> p;
-    p.append(SkRasterPipeline::load_f16, (const void**) &src);
+    p.append(SkRasterPipeline::load_f16, &src_ctx);
     p.append(SkRasterPipeline::unpremul);
     p.append(SkRasterPipeline::to_srgb);
-    p.append(SkRasterPipeline::store_u16_be, (void**) &dst);
-    p.run(0,0, width);
+    p.append(SkRasterPipeline::store_u16_be, &dst_ctx);
+    p.run(0,0, width,1);
 }
 
 /**
@@ -282,11 +291,13 @@
 static inline void transform_scanline_F16_to_8888(char* SK_RESTRICT dst,
                                                   const char* SK_RESTRICT src, int width, int,
                                                   const SkPMColor*) {
+    SkJumper_MemoryCtx src_ctx = { (void*)src, 0 },
+                       dst_ctx = { (void*)dst, 0 };
     SkRasterPipeline_<256> p;
-    p.append(SkRasterPipeline::load_f16, (const void**) &src);
+    p.append(SkRasterPipeline::load_f16, &src_ctx);
     p.append(SkRasterPipeline::to_srgb);
-    p.append(SkRasterPipeline::store_8888, (void**) &dst);
-    p.run(0,0, width);
+    p.append(SkRasterPipeline::store_8888, &dst_ctx);
+    p.run(0,0, width,1);
 }
 
 /**
@@ -295,12 +306,14 @@
 static inline void transform_scanline_F16_premul_to_8888(char* SK_RESTRICT dst,
                                                          const char* SK_RESTRICT src, int width,
                                                          int, const SkPMColor*) {
+    SkJumper_MemoryCtx src_ctx = { (void*)src, 0 },
+                       dst_ctx = { (void*)dst, 0 };
     SkRasterPipeline_<256> p;
-    p.append(SkRasterPipeline::load_f16, (const void**) &src);
+    p.append(SkRasterPipeline::load_f16, &src_ctx);
     p.append(SkRasterPipeline::unpremul);
     p.append(SkRasterPipeline::to_srgb);
-    p.append(SkRasterPipeline::store_8888, (void**) &dst);
-    p.run(0,0, width);
+    p.append(SkRasterPipeline::store_8888, &dst_ctx);
+    p.run(0,0, width,1);
 }
 
 /**
@@ -308,12 +321,14 @@
  */
 static inline void transform_scanline_F16_to_premul_8888(char* SK_RESTRICT dst,
         const char* SK_RESTRICT src, int width, int, const SkPMColor*) {
+    SkJumper_MemoryCtx src_ctx = { (void*)src, 0 },
+                       dst_ctx = { (void*)dst, 0 };
     SkRasterPipeline_<256> p;
-    p.append(SkRasterPipeline::load_f16, (const void**) &src);
+    p.append(SkRasterPipeline::load_f16, &src_ctx);
     p.append(SkRasterPipeline::premul);
     p.append(SkRasterPipeline::to_srgb);
-    p.append(SkRasterPipeline::store_8888, (void**) &dst);
-    p.run(0,0, width);
+    p.append(SkRasterPipeline::store_8888, &dst_ctx);
+    p.run(0,0, width,1);
 }
 
 static inline sk_sp<SkData> icc_from_color_space(const SkImageInfo& info) {