From 319ba3d3a177498095c31696e0aec8b3af25f663 Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Fri, 20 Jan 2017 15:11:54 -0500 Subject: Move shader register setup to SkRasterPipelineBlitter. We've been seeding the initial values of our registers to x+0.5,y+0.5, 1,0, 0,0,0,0 (useful values for shaders to start with) in all pipelines. This CL changes that to do so only when blitting, and only when we have a shader. The nicest part of this change is that SkRasterPipeline itself no longer needs to have a concept of y, or what x means. It just marches x through [x,x+n), and the blitter handles y and layers the meaning of "dst x coordinate" onto x. This ought to make SkSplicer a little easier to work with too. dm --src gm --config f16 srgb 565 all draws the same. Change-Id: I69d8c1cc14a06e5dfdd6a7493364f43a18f8dec5 Reviewed-on: https://skia-review.googlesource.com/7353 Reviewed-by: Herb Derby Commit-Queue: Mike Klein --- bench/SkRasterPipelineBench.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bench/SkRasterPipelineBench.cpp') diff --git a/bench/SkRasterPipelineBench.cpp b/bench/SkRasterPipelineBench.cpp index 9afc029c30..7447f4d059 100644 --- a/bench/SkRasterPipelineBench.cpp +++ b/bench/SkRasterPipelineBench.cpp @@ -63,11 +63,11 @@ public: if (kCompiled) { auto compiled = p.compile(); while (loops --> 0) { - compiled(0,0, N); + compiled(0,N); } } else { while (loops --> 0) { - p.run(0,0, N); + p.run(0,N); } } } @@ -100,11 +100,11 @@ public: if (kCompiled) { auto compiled = p.compile(); while (loops --> 0) { - compiled(0,0, N); + compiled(0,N); } } else { while (loops --> 0) { - p.run(0,0, N); + p.run(0,N); } } } -- cgit v1.2.3