aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2016-11-30 20:54:37 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-30 20:54:52 +0000
commitbf49d61fce3dc3829626762e1ffa3c4a70b7db32 (patch)
treec43452715453f08450f47ef9173d7319eb5e9c11 /src/core
parent94e4ab1e353f2202369798045ec3dfe0a89c9bbe (diff)
Revert "Show constant-foldable runs in SkRasterPipeline::dump()."
This reverts commit 9ac7b2c545769a6b7c863b8e4c7f88096c9a9969. Reason for revert: misguided. Original change's description: > Show constant-foldable runs in SkRasterPipeline::dump(). > > Change-Id: I2f85249a09163dd21a8008f50340b8463718ada2 > Reviewed-on: https://skia-review.googlesource.com/5350 > Reviewed-by: Mike Klein <mtklein@chromium.org> > Commit-Queue: Mike Klein <mtklein@chromium.org> > TBR=mtklein@chromium.org,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I3ae6c8ec11853592b332a17aefd611dc238e6c26 Reviewed-on: https://skia-review.googlesource.com/5394 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/SkRasterPipeline.cpp59
1 files changed, 1 insertions, 58 deletions
diff --git a/src/core/SkRasterPipeline.cpp b/src/core/SkRasterPipeline.cpp
index 27856fd576..a9164d342d 100644
--- a/src/core/SkRasterPipeline.cpp
+++ b/src/core/SkRasterPipeline.cpp
@@ -35,54 +35,8 @@ std::function<void(size_t, size_t, size_t)> SkRasterPipeline::compile() const {
return SkOpts::compile_pipeline(fStages, fNum);
}
-static bool invariant_in_x(const SkRasterPipeline::Stage& st) {
- if (st.ctx == nullptr) {
- // If a stage doesn't have a context pointer, it can't really do anything with x.
- return true;
- }
-
- // This would be a lot more compact as a blacklist (the loads, the stores, the gathers),
- // but it's safer to write as a whitelist. If we get it wrong this way, not a big deal.
- switch (st.stage) {
- default: return false;
-
- case SkRasterPipeline::trace:
- case SkRasterPipeline::set_rgb:
- case SkRasterPipeline::constant_color:
- case SkRasterPipeline::scale_constant_float:
- case SkRasterPipeline::lerp_constant_float:
- case SkRasterPipeline::matrix_2x3:
- case SkRasterPipeline::matrix_3x4:
- case SkRasterPipeline::matrix_4x5:
- case SkRasterPipeline::matrix_perspective:
- case SkRasterPipeline::parametric_r:
- case SkRasterPipeline::parametric_g:
- case SkRasterPipeline::parametric_b:
- case SkRasterPipeline::table_r:
- case SkRasterPipeline::table_g:
- case SkRasterPipeline::table_b:
- case SkRasterPipeline::color_lookup_table:
- case SkRasterPipeline::lab_to_xyz:
- case SkRasterPipeline::clamp_x:
- case SkRasterPipeline::mirror_x:
- case SkRasterPipeline::repeat_x:
- case SkRasterPipeline::clamp_y:
- case SkRasterPipeline::mirror_y:
- case SkRasterPipeline::repeat_y:
- case SkRasterPipeline::top_left:
- case SkRasterPipeline::top_right:
- case SkRasterPipeline::bottom_left:
- case SkRasterPipeline::bottom_right:
- case SkRasterPipeline::accumulate:
- SkASSERT(st.ctx != nullptr);
- return true;
- }
- return false;
-}
-
void SkRasterPipeline::dump() const {
SkDebugf("SkRasterPipeline, %d stages\n", fNum);
- bool in_constant_run = false;
for (int i = 0; i < fNum; i++) {
const char* name = "";
switch (fStages[i].stage) {
@@ -90,18 +44,7 @@ void SkRasterPipeline::dump() const {
SK_RASTER_PIPELINE_STAGES(M)
#undef M
}
-
- char mark = ' ';
- if (fStages[i].stage == SkRasterPipeline::constant_color) {
- mark = '*';
- in_constant_run = true;
- } else if (in_constant_run && invariant_in_x(fStages[i])) {
- mark = '|';
- } else {
- mark = ' ';
- in_constant_run = false;
- }
- SkDebugf("\t%c %s\n", mark, name);
+ SkDebugf("\t%s\n", name);
}
SkDebugf("\n");
}