aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkRasterPipeline.h
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-08-03 09:42:53 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-03 14:36:07 +0000
commit073073e4a49993818a7fc4996a7fb42f3ec79640 (patch)
tree0a1a63ffa859fc2425463e1e20d399a06c72c9ea /src/core/SkRasterPipeline.h
parentc18ab884ae6cf85521ed2c719d78e45308404335 (diff)
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>
Diffstat (limited to 'src/core/SkRasterPipeline.h')
-rw-r--r--src/core/SkRasterPipeline.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/SkRasterPipeline.h b/src/core/SkRasterPipeline.h
index e9cb886e6f..ff7bada24c 100644
--- a/src/core/SkRasterPipeline.h
+++ b/src/core/SkRasterPipeline.h
@@ -129,12 +129,13 @@ public:
void append_from_srgb(SkAlphaType);
void append_from_srgb_dst(SkAlphaType);
- // Appends a stage for the specified matrix. Tries to optimize the stage by analyzing
- // the type of matrix.
+ // Appends a stage for the specified matrix.
+ // Tries to optimize the stage by analyzing the type of matrix.
void append_matrix(SkArenaAlloc*, const SkMatrix&);
- // Appends a stage for the uniform color. Tries to optimize the stage based on the color.
- void append_uniform_color(SkArenaAlloc*, const SkPM4f& color);
+ // Appends a stage for a constant uniform color.
+ // Tries to optimize the stage based on the color.
+ void append_constant_color(SkArenaAlloc*, const SkPM4f& color);
bool empty() const { return fStages == nullptr; }