Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Unified Diff: fuzz/FuzzGradients.cpp

Issue 2447823002: Fix fuzzer's bools to be 0 or 1 only (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fuzz/Fuzz.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fuzz/FuzzGradients.cpp
diff --git a/fuzz/FuzzGradients.cpp b/fuzz/FuzzGradients.cpp
index d24bdbe0579a1a4fba23559bb2b39679945c3bd4..98026b3e0da21b0c5c9c7d9f26a43567bd1539d9 100644
--- a/fuzz/FuzzGradients.cpp
+++ b/fuzz/FuzzGradients.cpp
@@ -80,8 +80,8 @@ void fuzzLinearGradient(Fuzz* fuzz) {
!fuzz->next<SkScalar>(&b) ||
!fuzz->next<SkScalar>(&c) ||
!fuzz->next<SkScalar>(&d) ||
- !fuzz->next<bool>(&useLocalMatrix) ||
- !fuzz->next<bool>(&useGlobalMatrix)) {
+ !fuzz->next(&useLocalMatrix) ||
mtklein_C 2016/10/24 17:45:10 This code reads inconsistently, before this CL and
kjlubick 2016/10/24 18:27:01 All the types removed and the || are lined up as w
+ !fuzz->next(&useGlobalMatrix)) {
return;
}
SkPoint pts[2] = {SkPoint::Make(a,b), SkPoint::Make(c, d)};
@@ -127,8 +127,8 @@ void fuzzRadialGradient(Fuzz* fuzz) {
if (!fuzz->next<SkScalar>(&a) ||
!fuzz->next<SkScalar>(&b) ||
!fuzz->next<SkScalar>(&radius) ||
- !fuzz->next<bool>(&useLocalMatrix) ||
- !fuzz->next<bool>(&useGlobalMatrix)) {
+ !fuzz->next(&useLocalMatrix) ||
+ !fuzz->next(&useGlobalMatrix)) {
return;
}
SkPoint center = SkPoint::Make(a,b);
@@ -178,8 +178,8 @@ void fuzzTwoPointConicalGradient(Fuzz* fuzz) {
!fuzz->next<SkScalar>(&c) ||
!fuzz->next<SkScalar>(&d) ||
!fuzz->next<SkScalar>(&endRadius) ||
- !fuzz->next<bool>(&useLocalMatrix) ||
- !fuzz->next<bool>(&useGlobalMatrix)) {
+ !fuzz->next(&useLocalMatrix) ||
+ !fuzz->next(&useGlobalMatrix)) {
return;
}
SkPoint start = SkPoint::Make(a, b);
@@ -225,8 +225,8 @@ void fuzzSweepGradient(Fuzz* fuzz) {
bool useLocalMatrix, useGlobalMatrix;
if (!fuzz->next<SkScalar>(&cx) ||
!fuzz->next<SkScalar>(&cy) ||
- !fuzz->next<bool>(&useLocalMatrix) ||
- !fuzz->next<bool>(&useGlobalMatrix)) {
+ !fuzz->next(&useLocalMatrix) ||
+ !fuzz->next(&useGlobalMatrix)) {
return;
}
« no previous file with comments | « fuzz/Fuzz.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698