Rename append_uniform_color() to append_constant_color().
The color appended here is both uniform and constant, and it's the
constantness that makes this custom append method useful over just
append(SkRasterPipeline::uniform_color, ...).
Uniform colors that are not constant have to be loaded from the pointer
each time (the caller might have changed the color out-of-band), but
constant uniform colors can be analyzed once and implemented with
specalizations like black_color and white_color.
Change-Id: I3cfc00ccc578dd915367bca7113010557181224c
Reviewed-on: https://skia-review.googlesource.com/30560
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
diff --git a/src/core/SkRasterPipelineBlitter.cpp b/src/core/SkRasterPipelineBlitter.cpp
index 158217e..fb15014 100644
--- a/src/core/SkRasterPipelineBlitter.cpp
+++ b/src/core/SkRasterPipelineBlitter.cpp
@@ -99,7 +99,7 @@
SkRasterPipeline_<256> shaderPipeline;
if (!shader) {
// Having no shader makes things nice and easy... just use the paint color.
- shaderPipeline.append_uniform_color(alloc, paintColor);
+ shaderPipeline.append_constant_color(alloc, paintColor);
bool is_opaque = paintColor.a() == 1.0f,
is_constant = true;
return SkRasterPipelineBlitter::Create(dst, paint, alloc,
@@ -198,7 +198,7 @@
colorPipeline->append(SkRasterPipeline::store_f32, &constantColorPtr);
colorPipeline->run(0,0,1,1);
colorPipeline->reset();
- colorPipeline->append_uniform_color(alloc, constantColor);
+ colorPipeline->append_constant_color(alloc, constantColor);
is_opaque = constantColor.a() == 1.0f;
}