aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-02-09 16:09:47 -0500
committerGravatar Robert Phillips <robertphillips@google.com>2017-02-09 21:46:45 +0000
commit2c49a4185865140827ac4630e6b63cd03e0ad3bb (patch)
tree53fa75132b1e2125e928a632f66cbbf8cef0e5a4
parent549638c8525eaa8e78ac8b758325c749cd3fba45 (diff)
Remove inner/outer threshold restriction on SkAlphaThresholdFilter.
Chrome pixel tests are relying on this being a valid configuration. Change-Id: Ib67e3168b72c15d014fae50faff4eb34fcc50a0d Reviewed-on: https://skia-review.googlesource.com/8284 Reviewed-by: Robert Phillips <robertphillips@google.com>
-rw-r--r--src/effects/GrAlphaThresholdFragmentProcessor.cpp3
-rw-r--r--src/effects/SkAlphaThresholdFilter.cpp3
2 files changed, 0 insertions, 6 deletions
diff --git a/src/effects/GrAlphaThresholdFragmentProcessor.cpp b/src/effects/GrAlphaThresholdFragmentProcessor.cpp
index 52e408ff26..9a90b2a51e 100644
--- a/src/effects/GrAlphaThresholdFragmentProcessor.cpp
+++ b/src/effects/GrAlphaThresholdFragmentProcessor.cpp
@@ -178,9 +178,6 @@ sk_sp<GrFragmentProcessor> GrAlphaThresholdFragmentProcessor::TestCreate(GrProce
// Make the inner and outer thresholds be in (0, 1) exclusive and be sorted correctly.
float innerThresh = d->fRandom->nextUScalar1() * .99f + 0.005f;
float outerThresh = d->fRandom->nextUScalar1() * .99f + 0.005f;
- if (innerThresh > outerThresh) {
- SkTSwap(innerThresh, outerThresh);
- }
const int kMaxWidth = 1000;
const int kMaxHeight = 1000;
uint32_t width = d->fRandom->nextULessThan(kMaxWidth);
diff --git a/src/effects/SkAlphaThresholdFilter.cpp b/src/effects/SkAlphaThresholdFilter.cpp
index 96f8365d60..0e38cccd65 100644
--- a/src/effects/SkAlphaThresholdFilter.cpp
+++ b/src/effects/SkAlphaThresholdFilter.cpp
@@ -65,9 +65,6 @@ sk_sp<SkImageFilter> SkAlphaThresholdFilter::Make(const SkRegion& region,
const SkImageFilter::CropRect* cropRect) {
innerThreshold = pin_0_1(innerThreshold);
outerThreshold = pin_0_1(outerThreshold);
- if (innerThreshold > outerThreshold) {
- return nullptr;
- }
if (!SkScalarIsFinite(innerThreshold) || !SkScalarIsFinite(outerThreshold)) {
return nullptr;
}