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>
This commit is contained in:
Brian Salomon 2017-02-09 16:09:47 -05:00 committed by Robert Phillips
parent 549638c852
commit 2c49a41858
2 changed files with 0 additions and 6 deletions

View File

@ -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);

View File

@ -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;
}