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

Unified Diff: samplecode/SampleFilterFuzz.cpp

Issue 139613002: Adding change for new constructor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Same code, trying to upload again Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleFilterFuzz.cpp
diff --git a/samplecode/SampleFilterFuzz.cpp b/samplecode/SampleFilterFuzz.cpp
index 8fa147aca4d9fd6e42756cee2f033521f8981ae6..e31f512c7e352b6b259f3d8b603b7bbf71b15d21 100644
--- a/samplecode/SampleFilterFuzz.cpp
+++ b/samplecode/SampleFilterFuzz.cpp
@@ -251,15 +251,20 @@ static SkImageFilter* make_image_filter(bool canBeNull = true) {
make_scalar(true), make_color(), make_image_filter());
break;
case MORPHOLOGY:
- if (R(2) == 1)
+ if (R(2) == 1) {
filter = new SkDilateImageFilter(R(static_cast<float>(kBitmapSize)),
R(static_cast<float>(kBitmapSize)), make_image_filter());
- else
+ } else {
filter = new SkErodeImageFilter(R(static_cast<float>(kBitmapSize)),
R(static_cast<float>(kBitmapSize)), make_image_filter());
+ }
break;
case BITMAP:
- filter = new SkBitmapSource(make_bitmap());
+ if (R(2) == 1) {
+ filter = new SkBitmapSource(make_bitmap(), make_rect(), make_rect());
+ } else {
+ filter = new SkBitmapSource(make_bitmap());
+ }
break;
case DISPLACE:
filter = new SkDisplacementMapEffect(make_channel_selector_type(),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698