aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkRasterPipeline.h
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-12-15 09:55:03 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-18 18:48:42 +0000
commit37155d476cd727329d985b75ecedbefe380a0f23 (patch)
treebecffe9033cd48e0eaee3c8df335eaae7c850c21 /src/core/SkRasterPipeline.h
parent5b92ce1b24186e0ac5a84878a4bcefd81581d2b9 (diff)
Rework out-of-gamut handling in SkRasterPipeline
Instead of trying to carefully manage the in-gamut / out-of-gamut state of the pipeline, let's do what a GPU would do, clamping to representable range in any float -> integer conversion. Most effects doing table lookups now clamp themselves internally, and the store_foo() methods clamp when the destination is fixed point. In turn the from_srgb() conversions and all future transfer function stages can care less about this stuff. If I'm thinking right, the _lowp side of things need not change at all, and that will soften the performance impact of this change. Anything that was fast to begin with was probably running a _lowp pipeline. Bug: skia:7419 Change-Id: Id2e080ac240a97b900a1ac131c85d9e15f70af32 Reviewed-on: https://skia-review.googlesource.com/85740 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/core/SkRasterPipeline.h')
-rw-r--r--src/core/SkRasterPipeline.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/core/SkRasterPipeline.h b/src/core/SkRasterPipeline.h
index 66dd5de648..005c3dd7ab 100644
--- a/src/core/SkRasterPipeline.h
+++ b/src/core/SkRasterPipeline.h
@@ -150,11 +150,6 @@ public:
bool empty() const { return fStages == nullptr; }
- // Used to track if we're handling values outside [0.0f, 1.0f],
- // and to clamp back to [0.0f, 1.0f] if so.
- void set_clamped(bool clamped) { fClamped = clamped; }
- void clamp_if_unclamped(SkAlphaType);
-
private:
struct StageList {
StageList* prev;
@@ -169,7 +164,6 @@ private:
StageList* fStages;
int fNumStages;
int fSlotsNeeded;
- bool fClamped;
};
template <size_t bytes>