Change to fuzzer for new constructor

BUG=skia:
R=senorblanco@google.com, sugoi@google.com, senorblanco@chromium.org

Author: sugoi@chromium.org

Review URL: https://codereview.chromium.org/139613002

git-svn-id: http://skia.googlecode.com/svn/trunk@13099 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
commit-bot@chromium.org 2014-01-15 20:20:24 +00:00
parent 5f62ed7434
commit 43f4a55104

View File

@ -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:
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(),