Add SkRasterPipeline blitter.
This is now pixel-exact with the existing sRGB SW impl as far as I've tested.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2146413002
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot
Committed: https://skia.googlesource.com/skia/+/3011e337693a9786f62d8de9ac4b239ad6dbdaca
Review-Url: https://codereview.chromium.org/2146413002
diff --git a/src/core/SkRasterPipeline.h b/src/core/SkRasterPipeline.h
index 186ee65..acbabcb 100644
--- a/src/core/SkRasterPipeline.h
+++ b/src/core/SkRasterPipeline.h
@@ -72,9 +72,10 @@
SkRasterPipeline();
- // Run the pipeline constructed with append(), walking x through [0,n),
+ // Run the pipeline constructed with append(), walking x through [x,x+n),
// generally in 4 pixel steps, but sometimes 1 pixel at a time.
- void run(size_t n);
+ void run(size_t x, size_t n);
+ void run(size_t n) { this->run(0, n); }
// Use this append() if your stage is sensitive to the number of pixels you're working with:
// - body will always be called for a full 4 pixels
@@ -93,6 +94,9 @@
this->append(body, ctx, tail, ctx);
}
+ // Append all stages to this pipeline.
+ void extend(const SkRasterPipeline&);
+
private:
using Stages = SkSTArray<10, Stage, /*MEM_COPY=*/true>;