From 1f4a874addd7c039fb8b434181040cd6a8a35339 Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Tue, 27 Sep 2016 12:08:10 -0400 Subject: SkRasterPipeline: add last() and docs. Today if you use the simple SK_RASTER_STAGE interface to build a pipeline, each stage you add calls into a next stage. The last stage you add calls into a special backstop stage JustReturn that, well, just returns, ending the pipeline. This adds last(), which cuts that last stage off the pipeline. Instead, the stage you add using last() returns directly, ending the pipeline itself without jumping into JustReturn. This reduces the overhead of using the pipelined version of SkRasterPipelineBench from ~25% to ~20% on my desktop. Also, add docs. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2713 Change-Id: I11469378e2765c6e34db52eb3eef648d6612da3f Reviewed-on: https://skia-review.googlesource.com/2713 Reviewed-by: Mike Reed Commit-Queue: Mike Klein --- bench/SkRasterPipelineBench.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bench/SkRasterPipelineBench.cpp') diff --git a/bench/SkRasterPipelineBench.cpp b/bench/SkRasterPipelineBench.cpp index a5263d770f..5ef64ce603 100644 --- a/bench/SkRasterPipelineBench.cpp +++ b/bench/SkRasterPipelineBench.cpp @@ -174,7 +174,7 @@ public: p.append< scale_u8, scale_u8_tail>(mask); p.append( dst); p.append(); - p.append< store_srgb, store_srgb_tail>( dst); + p.last< store_srgb, store_srgb_tail>( dst); p.run(N); } -- cgit v1.2.3