aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/images/transform_scanline.h
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-01-20 15:11:54 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-01-23 20:00:23 +0000
commit319ba3d3a177498095c31696e0aec8b3af25f663 (patch)
treebed59456eaf6d87a39eed79c33df5e3fe6921e8b /src/images/transform_scanline.h
parent889176b3a3b5b71cc05c51dad3e7d2ddac610b7e (diff)
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 <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src/images/transform_scanline.h')
-rw-r--r--src/images/transform_scanline.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/images/transform_scanline.h b/src/images/transform_scanline.h
index e26dde3e07..d49203642e 100644
--- a/src/images/transform_scanline.h
+++ b/src/images/transform_scanline.h
@@ -190,7 +190,7 @@ static inline void transform_scanline_unpremultiply_sRGB(void* dst, const void*
p.append(SkRasterPipeline::unpremul);
p.append(SkRasterPipeline::to_srgb);
p.append(SkRasterPipeline::store_8888, &dst);
- p.run(0, 0, width);
+ p.run(0, width);
}
/**
@@ -262,7 +262,7 @@ static inline void transform_scanline_F16(char* SK_RESTRICT dst, const char* SK_
p.append(SkRasterPipeline::load_f16, (const void**) &src);
p.append(SkRasterPipeline::to_srgb);
p.append(SkRasterPipeline::store_u16_be, (void**) &dst);
- p.run(0, 0, width);
+ p.run(0, width);
}
/**
@@ -275,5 +275,5 @@ static inline void transform_scanline_F16_premul(char* SK_RESTRICT dst, const ch
p.append(SkRasterPipeline::unpremul);
p.append(SkRasterPipeline::to_srgb);
p.append(SkRasterPipeline::store_u16_be, (void**) &dst);
- p.run(0, 0, width);
+ p.run(0, width);
}