update SkRasterPipeline::run() to also take y

y isn't used yet.  This is just a warmup that updates the callers.

Change-Id: I78f4f44e2b82f72b3a39fa8a8bdadef1d1b8a99e
Reviewed-on: https://skia-review.googlesource.com/18381
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
diff --git a/src/codec/SkWebpCodec.cpp b/src/codec/SkWebpCodec.cpp
index 829ebb8..700178a 100644
--- a/src/codec/SkWebpCodec.cpp
+++ b/src/codec/SkWebpCodec.cpp
@@ -377,7 +377,7 @@
     }
     p.append(store_dst, dst);
 
-    p.run(0, width);
+    p.run(0,0, width);
 }
 
 SkCodec::Result SkWebpCodec::onGetPixels(const SkImageInfo& dstInfo, void* dst, size_t rowBytes,
diff --git a/src/core/SkColorFilter.cpp b/src/core/SkColorFilter.cpp
index 65b5c45..a0b03c4 100644
--- a/src/core/SkColorFilter.cpp
+++ b/src/core/SkColorFilter.cpp
@@ -65,7 +65,7 @@
     this->onAppendStages(&pipeline, nullptr, &alloc, c.fA == 1);
     SkPM4f* dstPtr = &dst;
     pipeline.append(SkRasterPipeline::store_f32, &dstPtr);
-    pipeline.run(0,1);
+    pipeline.run(0,0, 1);
 
     return dst.unpremul();
 }
diff --git a/src/core/SkColorSpaceXform.cpp b/src/core/SkColorSpaceXform.cpp
index 0749aa4..8887bc2 100644
--- a/src/core/SkColorSpaceXform.cpp
+++ b/src/core/SkColorSpaceXform.cpp
@@ -1313,7 +1313,7 @@
             return false;
     }
 
-    pipeline.run(0, len);
+    pipeline.run(0,0, len);
     return true;
 }
 
diff --git a/src/core/SkColorSpaceXform_A2B.cpp b/src/core/SkColorSpaceXform_A2B.cpp
index 1cbf411..2e710f5 100644
--- a/src/core/SkColorSpaceXform_A2B.cpp
+++ b/src/core/SkColorSpaceXform_A2B.cpp
@@ -75,7 +75,7 @@
         default:
             return false;
     }
-    pipeline.run(0,count);
+    pipeline.run(0,0, count);
 
     return true;
 }
diff --git a/src/core/SkConvertPixels.cpp b/src/core/SkConvertPixels.cpp
index 1c201a7..2ada61f 100644
--- a/src/core/SkConvertPixels.cpp
+++ b/src/core/SkConvertPixels.cpp
@@ -397,7 +397,7 @@
     auto run = pipeline.compile();
     // This y is declared above when handling dither (which needs to know y).
     for (y = 0; y < srcInfo.height(); ++y) {
-        run(0,srcInfo.width());
+        run(0,y, srcInfo.width());
         // The pipeline has pointers to srcRow and dstRow, so we just need to update them in the
         // loop to move between rows of src/dst.
         dstRow = SkTAddOffset<void>(dstRow, dstRB);
diff --git a/src/core/SkPM4fPriv.h b/src/core/SkPM4fPriv.h
index 26f1557..700e128 100644
--- a/src/core/SkPM4fPriv.h
+++ b/src/core/SkPM4fPriv.h
@@ -157,7 +157,7 @@
         append_gamut_transform(&p, scratch_matrix_3x4, src, dst, kUnpremul_SkAlphaType);
         p.append(SkRasterPipeline::store_f32, &color4f_ptr);
 
-        p.run(0,1);
+        p.run(0,0,1);
     }
     return color4f;
 }
diff --git a/src/core/SkRasterPipeline.h b/src/core/SkRasterPipeline.h
index 0769f70..39a2f1f 100644
--- a/src/core/SkRasterPipeline.h
+++ b/src/core/SkRasterPipeline.h
@@ -135,10 +135,10 @@
     void extend(const SkRasterPipeline&);
 
     // Runs the pipeline walking x through [x,x+n).
-    void run(size_t x, size_t n) const;
+    void run(size_t x, size_t y, size_t n) const;
 
     // Allocates a thunk which amortizes run() setup cost in alloc.
-    std::function<void(size_t, size_t)> compile() const;
+    std::function<void(size_t, size_t, size_t)> compile() const;
 
     void dump() const;
 
diff --git a/src/core/SkRasterPipelineBlitter.cpp b/src/core/SkRasterPipelineBlitter.cpp
index a34609f..2f28eec 100644
--- a/src/core/SkRasterPipelineBlitter.cpp
+++ b/src/core/SkRasterPipelineBlitter.cpp
@@ -67,10 +67,10 @@
     uint64_t fMemsetColor      = 0;     // Big enough for largest dst format, F16.
 
     // Built lazily on first use.
-    std::function<void(size_t, size_t)> fBlitH,
-                                        fBlitAntiH,
-                                        fBlitMaskA8,
-                                        fBlitMaskLCD16;
+    std::function<void(size_t, size_t, size_t)> fBlitH,
+                                                fBlitAntiH,
+                                                fBlitMaskA8,
+                                                fBlitMaskLCD16;
 
     // These values are pointed to by the blit pipelines above,
     // which allows us to adjust them from call to call.
@@ -211,7 +211,7 @@
     if (is_constant) {
         auto constantColor = alloc->make<SkPM4f>();
         colorPipeline->append(SkRasterPipeline::store_f32, &constantColor);
-        colorPipeline->run(0,1);
+        colorPipeline->run(0,0,1);
         colorPipeline->reset();
         colorPipeline->append(SkRasterPipeline::constant_color, constantColor);
 
@@ -232,7 +232,7 @@
         p.extend(*colorPipeline);
         blitter->fDstPtr = &blitter->fMemsetColor;
         blitter->append_store(&p);
-        p.run(0,1);
+        p.run(0,0,1);
 
         blitter->fCanMemsetInBlitH = true;
     }
@@ -336,7 +336,7 @@
         fBlitH = p.compile();
     }
     this->maybe_shade(x,y,w);
-    fBlitH(x,w);
+    fBlitH(x,y,w);
 }
 
 void SkRasterPipelineBlitter::blitAntiH(int x, int y, const SkAlpha aa[], const int16_t runs[]) {
@@ -366,7 +366,7 @@
             default:
                 this->maybe_shade(x,y,run);
                 fCurrentCoverage = *aa * (1/255.0f);
-                fBlitAntiH(x,run);
+                fBlitAntiH(x,y,run);
         }
         x    += run;
         runs += run;
@@ -417,11 +417,11 @@
         switch (mask.fFormat) {
             case SkMask::kA8_Format:
                 fMaskPtr = mask.getAddr8(x,y)-x;
-                fBlitMaskA8(x,clip.width());
+                fBlitMaskA8(x,y,clip.width());
                 break;
             case SkMask::kLCD16_Format:
                 fMaskPtr = mask.getAddrLCD16(x,y)-x;
-                fBlitMaskLCD16(x,clip.width());
+                fBlitMaskLCD16(x,y,clip.width());
                 break;
             default:
                 // TODO
diff --git a/src/images/SkImageEncoderFns.h b/src/images/SkImageEncoderFns.h
index dfe5001..f5a33e5 100644
--- a/src/images/SkImageEncoderFns.h
+++ b/src/images/SkImageEncoderFns.h
@@ -162,7 +162,7 @@
     p.append(SkRasterPipeline::unpremul);
     p.append(SkRasterPipeline::to_srgb);
     p.append(SkRasterPipeline::store_8888, &dst);
-    p.run(0, width);
+    p.run(0,0, width);
 }
 
 /**
@@ -186,7 +186,7 @@
     p.append(SkRasterPipeline::premul);
     p.append(SkRasterPipeline::to_srgb);
     p.append(SkRasterPipeline::store_8888, (void**) &dst);
-    p.run(0, width);
+    p.run(0,0, width);
 }
 
 /**
@@ -258,7 +258,7 @@
     p.append(SkRasterPipeline::load_f16, (const void**) &src);
     p.append(SkRasterPipeline::to_srgb);
     p.append(SkRasterPipeline::store_u16_be, (void**) &dst);
-    p.run(0, width);
+    p.run(0,0, width);
 }
 
 /**
@@ -271,7 +271,7 @@
     p.append(SkRasterPipeline::unpremul);
     p.append(SkRasterPipeline::to_srgb);
     p.append(SkRasterPipeline::store_u16_be, (void**) &dst);
-    p.run(0, width);
+    p.run(0,0, width);
 }
 
 /**
@@ -284,7 +284,7 @@
     p.append(SkRasterPipeline::load_f16, (const void**) &src);
     p.append(SkRasterPipeline::to_srgb);
     p.append(SkRasterPipeline::store_8888, (void**) &dst);
-    p.run(0, width);
+    p.run(0,0, width);
 }
 
 /**
@@ -298,7 +298,7 @@
     p.append(SkRasterPipeline::unpremul);
     p.append(SkRasterPipeline::to_srgb);
     p.append(SkRasterPipeline::store_8888, (void**) &dst);
-    p.run(0, width);
+    p.run(0,0, width);
 }
 
 /**
@@ -311,7 +311,7 @@
     p.append(SkRasterPipeline::premul);
     p.append(SkRasterPipeline::to_srgb);
     p.append(SkRasterPipeline::store_8888, (void**) &dst);
-    p.run(0, width);
+    p.run(0,0, width);
 }
 
 static inline sk_sp<SkData> icc_from_color_space(const SkColorSpace& cs) {
diff --git a/src/jumper/SkJumper.cpp b/src/jumper/SkJumper.cpp
index 795483f..6593888 100644
--- a/src/jumper/SkJumper.cpp
+++ b/src/jumper/SkJumper.cpp
@@ -184,7 +184,7 @@
     }
 }
 
-void SkRasterPipeline::run(size_t x, size_t n) const {
+void SkRasterPipeline::run(size_t x, size_t y, size_t n) const {
     if (this->empty()) {
         return;
     }
@@ -198,16 +198,16 @@
     gEngine.start_pipeline(x, program.get(), &kConstants, limit);
 }
 
-std::function<void(size_t, size_t)> SkRasterPipeline::compile() const {
+std::function<void(size_t, size_t, size_t)> SkRasterPipeline::compile() const {
     if (this->empty()) {
-        return [](size_t, size_t) {};
+        return [](size_t, size_t, size_t) {};
     }
     gChooseEngineOnce([]{ gEngine = choose_engine(); });
 
     void** program = fAlloc->makeArray<void*>(fSlotsNeeded);
     BuildPipeline(fStages, gEngine, program + fSlotsNeeded);
 
-    return [=](size_t x, size_t n) {
+    return [=](size_t x, size_t y, size_t n) {
         const size_t limit = x+n;
         gEngine.start_pipeline(x, program, &kConstants, limit);
     };
diff --git a/src/shaders/SkColorFilterShader.cpp b/src/shaders/SkColorFilterShader.cpp
index 549f396..b7d6b15 100644
--- a/src/shaders/SkColorFilterShader.cpp
+++ b/src/shaders/SkColorFilterShader.cpp
@@ -110,7 +110,7 @@
     filterShader.fFilter->appendStages(&pipeline, nullptr, &alloc, filterShader.isOpaque());
     SkPM4f* dst = result;
     pipeline.append(SkRasterPipeline::store_f32, &dst);
-    pipeline.run(0, count);
+    pipeline.run(0,y, count);
 }
 
 #if SK_SUPPORT_GPU