aboutsummaryrefslogtreecommitdiffhomepage
path: root/fuzz/FuzzCanvas.cpp
diff options
context:
space:
mode:
authorGravatar Kevin Lubick <kjlubick@google.com>2017-03-14 17:20:24 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-14 21:49:32 +0000
commitdad29a059e11158c97e575747e7769a2a4fb9179 (patch)
tree1c408f71cba53dd98c6102bc70aa7f6b8d5354af /fuzz/FuzzCanvas.cpp
parent26c90e04797e15c37ec00e0f836292b8a207d294 (diff)
Fix uninitialized values in FuzzCanvas
BUG=skia: Change-Id: I45cb8a2d0695ec9a065ea9dd216e5d0220ad5a98 Reviewed-on: https://skia-review.googlesource.com/9690 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com>
Diffstat (limited to 'fuzz/FuzzCanvas.cpp')
-rw-r--r--fuzz/FuzzCanvas.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/fuzz/FuzzCanvas.cpp b/fuzz/FuzzCanvas.cpp
index afd61a1c4b..bfc90f535e 100644
--- a/fuzz/FuzzCanvas.cpp
+++ b/fuzz/FuzzCanvas.cpp
@@ -687,11 +687,11 @@ static sk_sp<SkImageFilter> make_fuzz_imageFilter(Fuzz* fuzz, int depth) {
case 1: {
SkScalar sigmaX, sigmaY;
sk_sp<SkImageFilter> input = make_fuzz_imageFilter(fuzz, depth - 1);
- SkImageFilter::CropRect cropRect;
bool useCropRect;
fuzz->next(&sigmaX, &sigmaY, &useCropRect);
+ SkImageFilter::CropRect cropRect;
if (useCropRect) {
- fuzz->next(&useCropRect);
+ fuzz->next(&cropRect);
}
return SkImageFilter::MakeBlur(sigmaX, sigmaY, std::move(input),
useCropRect ? &cropRect : nullptr);
@@ -707,11 +707,11 @@ static sk_sp<SkImageFilter> make_fuzz_imageFilter(Fuzz* fuzz, int depth) {
SkRegion region;
SkScalar innerMin, outerMax;
sk_sp<SkImageFilter> input = make_fuzz_imageFilter(fuzz, depth - 1);
- SkImageFilter::CropRect cropRect;
bool useCropRect;
fuzz->next(&region, &innerMin, &outerMax, &useCropRect);
+ SkImageFilter::CropRect cropRect;
if (useCropRect) {
- fuzz->next(&useCropRect);
+ fuzz->next(&cropRect);
}
return SkAlphaThresholdFilter::Make(region, innerMin, outerMax, std::move(input),
useCropRect ? &cropRect : nullptr);
@@ -725,7 +725,7 @@ static sk_sp<SkImageFilter> make_fuzz_imageFilter(Fuzz* fuzz, int depth) {
sk_sp<SkImageFilter> foreground = make_fuzz_imageFilter(fuzz, depth - 1);
SkImageFilter::CropRect cropRect;
if (useCropRect) {
- fuzz->next(&useCropRect);
+ fuzz->next(&cropRect);
}
return SkArithmeticImageFilter::Make(k1, k2, k3, k4, enforcePMColor,
std::move(background), std::move(foreground),
@@ -738,7 +738,7 @@ static sk_sp<SkImageFilter> make_fuzz_imageFilter(Fuzz* fuzz, int depth) {
SkImageFilter::CropRect cropRect;
fuzz->next(&useCropRect);
if (useCropRect) {
- fuzz->next(&useCropRect);
+ fuzz->next(&cropRect);
}
return SkColorFilterImageFilter::Make(std::move(cf), std::move(input),
useCropRect ? &cropRect : nullptr);
@@ -757,7 +757,7 @@ static sk_sp<SkImageFilter> make_fuzz_imageFilter(Fuzz* fuzz, int depth) {
fuzz->next(&scale, &useCropRect);
SkImageFilter::CropRect cropRect;
if (useCropRect) {
- fuzz->next(&useCropRect);
+ fuzz->next(&cropRect);
}
sk_sp<SkImageFilter> displacement = make_fuzz_imageFilter(fuzz, depth - 1);
sk_sp<SkImageFilter> color = make_fuzz_imageFilter(fuzz, depth - 1);
@@ -774,7 +774,7 @@ static sk_sp<SkImageFilter> make_fuzz_imageFilter(Fuzz* fuzz, int depth) {
fuzz->next(&dx, &dy, &sigmaX, &sigmaY, &color, &useCropRect);
SkImageFilter::CropRect cropRect;
if (useCropRect) {
- fuzz->next(&useCropRect);
+ fuzz->next(&cropRect);
}
sk_sp<SkImageFilter> input = make_fuzz_imageFilter(fuzz, depth - 1);
return SkDropShadowImageFilter::Make(dx, dy, sigmaX, sigmaY, color, shadowMode,
@@ -799,7 +799,7 @@ static sk_sp<SkImageFilter> make_fuzz_imageFilter(Fuzz* fuzz, int depth) {
SkImageFilter::CropRect cropRect;
fuzz->next(&srcRect, &inset, &useCropRect);
if (useCropRect) {
- fuzz->next(&useCropRect);
+ fuzz->next(&cropRect);
}
sk_sp<SkImageFilter> input = make_fuzz_imageFilter(fuzz, depth - 1);
return SkMagnifierImageFilter::Make(srcRect, inset, std::move(input),
@@ -822,7 +822,7 @@ static sk_sp<SkImageFilter> make_fuzz_imageFilter(Fuzz* fuzz, int depth) {
fuzz_enum_range(fuzz, &tileMode, 0, 2);
SkImageFilter::CropRect cropRect;
if (useCropRect) {
- fuzz->next(&useCropRect);
+ fuzz->next(&cropRect);
}
sk_sp<SkImageFilter> input = make_fuzz_imageFilter(fuzz, depth - 1);
return SkMatrixConvolutionImageFilter::Make(
@@ -837,7 +837,7 @@ static sk_sp<SkImageFilter> make_fuzz_imageFilter(Fuzz* fuzz, int depth) {
fuzz->next(&useCropRect, &blendMode);
SkImageFilter::CropRect cropRect;
if (useCropRect) {
- fuzz->next(&useCropRect);
+ fuzz->next(&cropRect);
}
return SkMergeImageFilter::Make(std::move(first), std::move(second), blendMode,
useCropRect ? &cropRect : nullptr);
@@ -856,7 +856,7 @@ static sk_sp<SkImageFilter> make_fuzz_imageFilter(Fuzz* fuzz, int depth) {
fuzz->next(&useCropRect);
SkImageFilter::CropRect cropRect;
if (useCropRect) {
- fuzz->next(&useCropRect);
+ fuzz->next(&cropRect);
}
return SkMergeImageFilter::MakeN(ifs, count, blendModes,
useCropRect ? &cropRect : nullptr);
@@ -868,7 +868,7 @@ static sk_sp<SkImageFilter> make_fuzz_imageFilter(Fuzz* fuzz, int depth) {
fuzz->next(&useCropRect);
SkImageFilter::CropRect cropRect;
if (useCropRect) {
- fuzz->next(&useCropRect);
+ fuzz->next(&cropRect);
}
sk_sp<SkImageFilter> input = make_fuzz_imageFilter(fuzz, depth - 1);
return SkDilateImageFilter::Make(rx, ry, std::move(input),
@@ -881,7 +881,7 @@ static sk_sp<SkImageFilter> make_fuzz_imageFilter(Fuzz* fuzz, int depth) {
fuzz->next(&useCropRect);
SkImageFilter::CropRect cropRect;
if (useCropRect) {
- fuzz->next(&useCropRect);
+ fuzz->next(&cropRect);
}
sk_sp<SkImageFilter> input = make_fuzz_imageFilter(fuzz, depth - 1);
return SkErodeImageFilter::Make(rx, ry, std::move(input),
@@ -894,7 +894,7 @@ static sk_sp<SkImageFilter> make_fuzz_imageFilter(Fuzz* fuzz, int depth) {
fuzz->next(&useCropRect);
SkImageFilter::CropRect cropRect;
if (useCropRect) {
- fuzz->next(&useCropRect);
+ fuzz->next(&cropRect);
}
sk_sp<SkImageFilter> input = make_fuzz_imageFilter(fuzz, depth - 1);
return SkOffsetImageFilter::Make(dx, dy, std::move(input),
@@ -907,7 +907,7 @@ static sk_sp<SkImageFilter> make_fuzz_imageFilter(Fuzz* fuzz, int depth) {
fuzz->next(&useCropRect);
SkImageFilter::CropRect cropRect;
if (useCropRect) {
- fuzz->next(&useCropRect);
+ fuzz->next(&cropRect);
}
return SkPaintImageFilter::Make(paint, useCropRect ? &cropRect : nullptr);
}
@@ -941,7 +941,7 @@ static sk_sp<SkImageFilter> make_fuzz_imageFilter(Fuzz* fuzz, int depth) {
fuzz->next(&useCropRect, &blendMode);
SkImageFilter::CropRect cropRect;
if (useCropRect) {
- fuzz->next(&useCropRect);
+ fuzz->next(&cropRect);
}
sk_sp<SkImageFilter> bg = make_fuzz_imageFilter(fuzz, depth - 1);
sk_sp<SkImageFilter> fg = make_fuzz_imageFilter(fuzz, depth - 1);