aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-06-29 12:21:22 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-06-29 16:56:09 +0000
commitb8d88d72cbe9cc3dde91eaf58e928b34748526a7 (patch)
tree5135004348b33a5605844fecb138afabc2294108 /src/core
parent9c1d7802284bf5a0e6fcf1a43e9218e21ce1a9e0 (diff)
update long out of date comment
Change-Id: I3dead53a30992edd032f16e6711b97bbf76a0e36 Reviewed-on: https://skia-review.googlesource.com/21261 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/SkRasterPipeline.h34
1 files changed, 5 insertions, 29 deletions
diff --git a/src/core/SkRasterPipeline.h b/src/core/SkRasterPipeline.h
index f1a3ef70d6..a4175c65a8 100644
--- a/src/core/SkRasterPipeline.h
+++ b/src/core/SkRasterPipeline.h
@@ -27,38 +27,14 @@ struct SkJumper_constants;
* end up bloating our code size dramatically. SkRasterPipeline stages can be chained together
* at runtime, so we can scale this problem linearly rather than combinatorically.
*
- * Each stage is represented by a function conforming to a common interface, SkRasterPipeline::Fn,
- * and by an arbitrary context pointer. Fn's arguments, and sometimes custom calling convention,
- * are designed to maximize the amount of data we can pass along the pipeline cheaply.
- * On many machines all arguments stay in registers the entire time.
+ * Each stage is represented by a function conforming to a common interface and by an
+ * arbitrary context pointer. The stage funciton arguments and calling convention are
+ * designed to maximize the amount of data we can pass along the pipeline cheaply, and
+ * vary depending on CPU feature detection.
*
- * The meaning of the arguments to Fn are sometimes fixed:
- * - The Stage* always represents the current stage, mainly providing access to ctx().
- * - The first size_t is always the destination x coordinate.
- * (If you need y, put it in your context.)
- * - The second size_t is always tail: 0 when working on a full 4-pixel slab,
- * or 1..3 when using only the bottom 1..3 lanes of each register.
- * - By the time the shader's done, the first four vectors should hold source red,
- * green, blue, and alpha, up to 4 pixels' worth each.
- *
- * Sometimes arguments are flexible:
- * - In the shader, the first four vectors can be used for anything, e.g. sample coordinates.
- * - The last four vectors are scratch registers that can be used to communicate between
- * stages; transfer modes use these to hold the original destination pixel components.
- *
- * On some platforms the last four vectors are slower to work with than the other arguments.
- *
- * When done mutating its arguments and/or context, a stage can either:
- * 1) call st->next() with its mutated arguments, chaining to the next stage of the pipeline; or
- * 2) return, indicating the pipeline is complete for these pixels.
- *
- * Some stages that typically return are those that write a color to a destination pointer,
- * but any stage can short-circuit the rest of the pipeline by returning instead of calling next().
+ * If you'd like to see how this works internally, you want to start digging around src/jumper.
*/
-// TODO: There may be a better place to stuff tail, e.g. in the bottom alignment bits of
-// the Stage*. This mostly matters on 64-bit Windows where every register is precious.
-
#define SK_RASTER_PIPELINE_STAGES(M) \
M(callback) \
M(move_src_dst) M(move_dst_src) \