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

Side by Side Diff: fuzz/FuzzPaeth.cpp

Issue 1581203003: some fuzz hacking (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: unused Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « fuzz/Fuzz.h ('k') | fuzz/fuzz.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "Fuzz.h" 8 #include "Fuzz.h"
9 9
10 // This really is just an example Fuzz*.cpp file. 10 // This really is just an example Fuzz*.cpp file.
(...skipping 15 matching lines...) Expand all
26 int min = SkTMin(a,b), 26 int min = SkTMin(a,b),
27 max = SkTMax(a,b); 27 max = SkTMax(a,b);
28 int delta = (max-min)/3; 28 int delta = (max-min)/3;
29 29
30 if (c <= min+delta) return max; 30 if (c <= min+delta) return max;
31 if (c >= max-delta) return min; 31 if (c >= max-delta) return min;
32 return c; 32 return c;
33 } 33 }
34 34
35 DEF_FUZZ(Paeth, fuzz) { 35 DEF_FUZZ(Paeth, fuzz) {
36 int a = fuzz->nextU(), 36 auto a = fuzz->nextB(),
37 b = fuzz->nextU(), 37 b = fuzz->nextB(),
38 c = fuzz->nextU(); 38 c = fuzz->nextB();
39 ASSERT(paeth_alt(a,b,c) == paeth_std(a,b,c)); 39 ASSERT(paeth_alt(a,b,c) == paeth_std(a,b,c));
40 } 40 }
OLDNEW
« no previous file with comments | « fuzz/Fuzz.h ('k') | fuzz/fuzz.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698