OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 #include "Fuzz.h" | 7 #include "Fuzz.h" |
8 #include "Sk1DPathEffect.h" | 8 #include "Sk1DPathEffect.h" |
9 #include "Sk2DPathEffect.h" | 9 #include "Sk2DPathEffect.h" |
10 #include "SkAlphaThresholdFilter.h" | 10 #include "SkAlphaThresholdFilter.h" |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
576 case BLUR: | 576 case BLUR: |
577 filter = SkBlurImageFilter::Make(make_scalar(true), | 577 filter = SkBlurImageFilter::Make(make_scalar(true), |
578 make_scalar(true), | 578 make_scalar(true), |
579 make_image_filter()); | 579 make_image_filter()); |
580 break; | 580 break; |
581 case MAGNIFIER: | 581 case MAGNIFIER: |
582 filter = sk_sp<SkImageFilter>(SkMagnifierImageFilter::Create(make_rect()
, | 582 filter = sk_sp<SkImageFilter>(SkMagnifierImageFilter::Create(make_rect()
, |
583 make_scalar
(true))); | 583 make_scalar
(true))); |
584 break; | 584 break; |
585 case DOWN_SAMPLE: | 585 case DOWN_SAMPLE: |
586 filter = sk_sp<SkImageFilter>(SkDownSampleImageFilter::Create(make_scala
r())); | 586 filter = SkDownSampleImageFilter::Make(make_scalar(), make_image_filter(
)); |
587 break; | 587 break; |
588 case XFERMODE: | 588 case XFERMODE: |
589 filter = SkXfermodeImageFilter::Make(SkXfermode::Make(make_xfermode()), | 589 filter = SkXfermodeImageFilter::Make(SkXfermode::Make(make_xfermode()), |
590 make_image_filter(), | 590 make_image_filter(), |
591 make_image_filter(), | 591 make_image_filter(), |
592 nullptr); | 592 nullptr); |
593 break; | 593 break; |
594 case OFFSET: | 594 case OFFSET: |
595 filter = SkOffsetImageFilter::Make(make_scalar(), make_scalar(), make_im
age_filter()); | 595 filter = SkOffsetImageFilter::Make(make_scalar(), make_scalar(), make_im
age_filter()); |
596 break; | 596 break; |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
800 DEF_FUZZ(SerializedImageFilter, f) { | 800 DEF_FUZZ(SerializedImageFilter, f) { |
801 fuzz = f; | 801 fuzz = f; |
802 SkImageFilter* filter = make_serialized_image_filter(); | 802 SkImageFilter* filter = make_serialized_image_filter(); |
803 | 803 |
804 SkPaint paint; | 804 SkPaint paint; |
805 SkSafeUnref(paint.setImageFilter(filter)); | 805 SkSafeUnref(paint.setImageFilter(filter)); |
806 SkBitmap bitmap; | 806 SkBitmap bitmap; |
807 SkCanvas canvas(bitmap); | 807 SkCanvas canvas(bitmap); |
808 drawClippedBitmap(&canvas, 0, 0, paint); | 808 drawClippedBitmap(&canvas, 0, 0, paint); |
809 } | 809 } |
OLD | NEW |