Add fuzzer option for Blur w/o occluder
I hypothesize that some backends look at the occluder and may have accidentally (on purpose) been avoiding the linked bug. Bug: skia:7956 Change-Id: If8d1de099f778b2faaa2c5ed4c562047b0dd14e7 Reviewed-on: https://skia-review.googlesource.com/131922 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Hal Canary <halcanary@google.com>
This commit is contained in:
parent
74b390d6b1
commit
1b1a557d25
@ -498,13 +498,17 @@ static sk_sp<SkMaskFilter> make_fuzz_maskfilter(Fuzz* fuzz) {
|
||||
SkScalar sigma;
|
||||
fuzz->next(&sigma);
|
||||
SkRect occluder{0.0f, 0.0f, 0.0f, 0.0f};
|
||||
if (make_fuzz_t<bool>(fuzz)) {
|
||||
bool useOccluder;
|
||||
fuzz->next(&useOccluder);
|
||||
if (useOccluder) {
|
||||
fuzz->next(&occluder);
|
||||
}
|
||||
uint32_t flags;
|
||||
fuzz->nextRange(&flags, 0, 1);
|
||||
bool respectCTM = flags != 0;
|
||||
return SkMaskFilter::MakeBlur(blurStyle, sigma, occluder, respectCTM);
|
||||
bool respectCTM;
|
||||
fuzz->next(&respectCTM);
|
||||
if (useOccluder) {
|
||||
return SkMaskFilter::MakeBlur(blurStyle, sigma, occluder, respectCTM);
|
||||
}
|
||||
return SkMaskFilter::MakeBlur(blurStyle, sigma, respectCTM);
|
||||
}
|
||||
default:
|
||||
SkASSERT(false);
|
||||
|
Loading…
Reference in New Issue
Block a user