aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkRasterPipeline.cpp
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-10-17 14:22:58 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-18 16:17:55 +0000
commit85f8536ca2dd446f2f68d82b0e69134a3e7a88b7 (patch)
treef09aa8f7eb3f7f7f6018f8b4c672046a95a62d75 /src/core/SkRasterPipeline.cpp
parente4442cb0b537720ab32106b3b5353dbb78f11b26 (diff)
Feed seed_shader() iota through a context pointer.
As this array grows longer it causes troublesome code generation when we're compiling offline, but it's easy as an argument. Change-Id: I53526443f534f29d3bff17c3aec24a9e916c9b86 Reviewed-on: https://skia-review.googlesource.com/60564 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
Diffstat (limited to 'src/core/SkRasterPipeline.cpp')
-rw-r--r--src/core/SkRasterPipeline.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/SkRasterPipeline.cpp b/src/core/SkRasterPipeline.cpp
index 0e56fc4810..73105b4d7b 100644
--- a/src/core/SkRasterPipeline.cpp
+++ b/src/core/SkRasterPipeline.cpp
@@ -23,6 +23,7 @@ void SkRasterPipeline::reset() {
void SkRasterPipeline::append(StockStage stage, void* ctx) {
SkASSERT(stage != from_srgb); // Please use append_from_srgb().
SkASSERT(stage != uniform_color); // Please use append_constant_color().
+ SkASSERT(stage != seed_shader); // Please use append_seed_shader().
this->unchecked_append(stage, ctx);
}
void SkRasterPipeline::unchecked_append(StockStage stage, void* ctx) {
@@ -190,3 +191,11 @@ void SkRasterPipeline::clamp_if_unclamped(SkAlphaType alphaType) {
fClamped = true;
}
}
+
+void SkRasterPipeline::append_seed_shader() {
+ static const float iota[] = {
+ 0.5f, 1.5f, 2.5f, 3.5f, 4.5f, 5.5f, 6.5f, 7.5f,
+ 8.5f, 9.5f,10.5f,11.5f,12.5f,13.5f,14.5f,15.5f,
+ };
+ this->unchecked_append(SkRasterPipeline::seed_shader, const_cast<float*>(iota));
+}