bool makeMatrix(Fuzz* fuzz, SkMatrix* m) {
SkScalar scaleX, skewX, transX, skewY, scaleY, transY, persp0, persp1, persp2;
- if (!fuzz->next<SkScalar>(&scaleX) ||
- !fuzz->next<SkScalar>(&skewX) ||
- !fuzz->next<SkScalar>(&transX) ||
- !fuzz->next<SkScalar>(&skewY) ||
- !fuzz->next<SkScalar>(&scaleY) ||
- !fuzz->next<SkScalar>(&transY) ||
- !fuzz->next<SkScalar>(&persp0) ||
- !fuzz->next<SkScalar>(&persp1) ||
- !fuzz->next<SkScalar>(&persp2)) {
+ if (!fuzz->next(&scaleX) ||
+ !fuzz->next(&skewX) ||
+ !fuzz->next(&transX) ||
+ !fuzz->next(&skewY) ||
+ !fuzz->next(&scaleY) ||
+ !fuzz->next(&transY) ||
+ !fuzz->next(&persp0) ||
+ !fuzz->next(&persp1) ||
+ !fuzz->next(&persp2)) {
return false;
}
m->setAll(scaleX, skewX, transX, skewY, scaleY, transY, persp0, persp1, persp2);
t_colors = new SkColor[t_count];
t_pos = new SkScalar[t_count];
for (uint32_t i = 0; i < t_count; i++) {
- fuzz->next<SkColor>(&t_colors[i]);
- fuzz->next<SkScalar>(&t_pos[i]);
+ fuzz->next(&t_colors[i]);
+ fuzz->next(&t_pos[i]);
}
if (t_count == 0) {
void fuzzLinearGradient(Fuzz* fuzz) {
SkScalar a, b, c, d;
bool useLocalMatrix, useGlobalMatrix;
- if (!fuzz->next<SkScalar>(&a) ||
- !fuzz->next<SkScalar>(&b) ||
- !fuzz->next<SkScalar>(&c) ||
- !fuzz->next<SkScalar>(&d) ||
- !fuzz->next<bool>(&useLocalMatrix) ||
- !fuzz->next<bool>(&useGlobalMatrix)) {
+ if (!fuzz->next(&a) ||
+ !fuzz->next(&b) ||
+ !fuzz->next(&c) ||
+ !fuzz->next(&d) ||
+ !fuzz->next(&useLocalMatrix) ||
+ !fuzz->next(&useGlobalMatrix)) {
return;
}
SkPoint pts[2] = {SkPoint::Make(a,b), SkPoint::Make(c, d)};
void fuzzRadialGradient(Fuzz* fuzz) {
SkScalar a, b, radius;
bool useLocalMatrix, useGlobalMatrix;
- if (!fuzz->next<SkScalar>(&a) ||
- !fuzz->next<SkScalar>(&b) ||
- !fuzz->next<SkScalar>(&radius) ||
- !fuzz->next<bool>(&useLocalMatrix) ||
- !fuzz->next<bool>(&useGlobalMatrix)) {
+ if (!fuzz->next(&a) ||
+ !fuzz->next(&b) ||
+ !fuzz->next(&radius) ||
+ !fuzz->next(&useLocalMatrix) ||
+ !fuzz->next(&useGlobalMatrix)) {
return;
}
SkPoint center = SkPoint::Make(a,b);
void fuzzTwoPointConicalGradient(Fuzz* fuzz) {
SkScalar a, b, startRadius, c, d, endRadius;
bool useLocalMatrix, useGlobalMatrix;
- if (!fuzz->next<SkScalar>(&a) ||
- !fuzz->next<SkScalar>(&b) ||
- !fuzz->next<SkScalar>(&startRadius) ||
- !fuzz->next<SkScalar>(&c) ||
- !fuzz->next<SkScalar>(&d) ||
- !fuzz->next<SkScalar>(&endRadius) ||
- !fuzz->next<bool>(&useLocalMatrix) ||
- !fuzz->next<bool>(&useGlobalMatrix)) {
+ if (!fuzz->next(&a) ||
+ !fuzz->next(&b) ||
+ !fuzz->next(&startRadius) ||
+ !fuzz->next(&c) ||
+ !fuzz->next(&d) ||
+ !fuzz->next(&endRadius) ||
+ !fuzz->next(&useLocalMatrix) ||
+ !fuzz->next(&useGlobalMatrix)) {
return;
}
SkPoint start = SkPoint::Make(a, b);
void fuzzSweepGradient(Fuzz* fuzz) {
SkScalar cx, cy;
bool useLocalMatrix, useGlobalMatrix;
- if (!fuzz->next<SkScalar>(&cx) ||
- !fuzz->next<SkScalar>(&cy) ||
- !fuzz->next<bool>(&useLocalMatrix) ||
- !fuzz->next<bool>(&useGlobalMatrix)) {
+ if (!fuzz->next(&cx) ||
+ !fuzz->next(&cy) ||
+ !fuzz->next(&useLocalMatrix) ||
+ !fuzz->next(&useGlobalMatrix)) {
return;
}
DEF_FUZZ(Gradients, fuzz) {
uint8_t i;
- if (!fuzz->next<uint8_t>(&i)) {
+ if (!fuzz->next(&i)) {
return;
}