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

Unified Diff: samplecode/SampleFuzz.cpp

Issue 23701006: Push sigma-based blur interface into our GMs/benches/tests/samplecode (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: cleaned up Created 7 years, 3 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 | « samplecode/SampleEmboss.cpp ('k') | samplecode/SampleSlides.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleFuzz.cpp
===================================================================
--- samplecode/SampleFuzz.cpp (revision 11108)
+++ samplecode/SampleFuzz.cpp (working copy)
@@ -59,21 +59,35 @@
float v = 0;
int sel;
- if (return_large == true && R(3) == 1) sel = R(6); else sel = R(4);
- if (return_undef == false && sel == 0) sel = 1;
+ if (return_large == true && R(3) == 1) {
+ sel = R(6);
+ } else {
+ sel = R(4);
+ }
- if (R(2) == 1) v = (float)R(100); else
+ if (return_undef == false && sel == 0) {
+ sel = 1;
+ }
- switch (sel) {
- case 0: break;
- case 1: v = 0; break;
- case 2: v = 0.000001f; break;
- case 3: v = 10000; break;
- case 4: v = 2000000000; break;
- case 5: v = huge(); break;
+ if (R(2) == 1) {
+ v = (float)R(100);
+ } else {
+
+ switch (sel) {
+ case 0: break;
+ case 1: v = 0; break;
+ case 2: v = 0.000001f; break;
+ case 3: v = 10000; break;
+ case 4: v = 2000000000; break;
+ case 5: v = huge(); break;
+ }
+
}
- if (R(4) == 1) v = -v;
+ if (R(4) == 1) {
+ v = -v;
+ }
+
return v;
}
@@ -176,7 +190,9 @@
case 7:
if (quick == true) break;
- SkSafeUnref(paint.setMaskFilter(SkBlurMaskFilter::Create(make_number(), SkBlurMaskFilter::kNormal_BlurStyle)));
+ SkSafeUnref(paint.setMaskFilter(SkBlurMaskFilter::Create(
+ SkBlurMaskFilter::kNormal_BlurStyle,
+ make_number())));
break;
case 8:
« no previous file with comments | « samplecode/SampleEmboss.cpp ('k') | samplecode/SampleSlides.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698