diff options
author | Mike Klein <mtklein@chromium.org> | 2017-07-18 11:30:25 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-07-18 18:34:04 +0000 |
commit | 3b92b6907a6b9f7020a7589ad07cad2472fe4e86 (patch) | |
tree | 46aa8308f49ffd5c757ee9aec11ae268fe961a96 /src/core/SkRasterPipeline.h | |
parent | 135e446b9f035f6b028df77b006ac556294d5dbb (diff) |
start on raster pipeline 2d mode
- Add run_2d(x,y,w,h) and start_pipeline_2d().
- Add and test a 2d-compatible store_8888_2d stage.
Change-Id: Ib9c225d1b8cb40471ae4333df1d06eec4d506f8a
Reviewed-on: https://skia-review.googlesource.com/24401
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'src/core/SkRasterPipeline.h')
-rw-r--r-- | src/core/SkRasterPipeline.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/core/SkRasterPipeline.h b/src/core/SkRasterPipeline.h index fee5346bf0..c7ff7704ba 100644 --- a/src/core/SkRasterPipeline.h +++ b/src/core/SkRasterPipeline.h @@ -17,6 +17,7 @@ #include <vector> struct SkJumper_constants; +struct SkJumper_Engine; struct SkPM4f; /** @@ -91,8 +92,8 @@ struct SkPM4f; M(xy_to_2pt_conical_linear) \ M(mask_2pt_conical_degenerates) M(apply_vector_mask) \ M(byte_tables) M(byte_tables_rgb) \ - M(rgb_to_hsl) \ - M(hsl_to_rgb) + M(rgb_to_hsl) M(hsl_to_rgb) \ + M(store_8888_2d) class SkRasterPipeline { public: @@ -120,6 +121,9 @@ public: // Runs the pipeline walking x through [x,x+n). void run(size_t x, size_t y, size_t n) const; + // Runs the pipeline in 2d from (x,y) inclusive to (x+w,y+h) exclusive. + void run_2d(size_t x, size_t y, size_t w, size_t h) const; + // Allocates a thunk which amortizes run() setup cost in alloc. std::function<void(size_t, size_t, size_t)> compile() const; @@ -140,15 +144,13 @@ public: bool empty() const { return fStages == nullptr; } private: - using StartPipelineFn = void(size_t,size_t,size_t,void**,const SkJumper_constants*); - struct StageList { StageList* prev; StockStage stage; void* ctx; }; - StartPipelineFn* build_pipeline(void**) const; + const SkJumper_Engine& build_pipeline(void**) const; void unchecked_append(StockStage, void*); SkArenaAlloc* fAlloc; |