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 "SampleCode.h" | 7 #include "SampleCode.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 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 break; | 598 break; |
599 case XFERMODE: { | 599 case XFERMODE: { |
600 sk_sp<SkImageFilter> subFilter1(make_image_filter()); | 600 sk_sp<SkImageFilter> subFilter1(make_image_filter()); |
601 sk_sp<SkImageFilter> subFilter2(make_image_filter()); | 601 sk_sp<SkImageFilter> subFilter2(make_image_filter()); |
602 filter = SkXfermodeImageFilter::Make(SkXfermode::Make(make_xfermode()), | 602 filter = SkXfermodeImageFilter::Make(SkXfermode::Make(make_xfermode()), |
603 subFilter1.get(), | 603 subFilter1.get(), |
604 subFilter2.get(), | 604 subFilter2.get(), |
605 nullptr); | 605 nullptr); |
606 break; | 606 break; |
607 } | 607 } |
608 case OFFSET: { | 608 case OFFSET: |
609 sk_sp<SkImageFilter> subFilter(make_image_filter()); | 609 filter = SkOffsetImageFilter::Make(make_scalar(), make_scalar(), make_im
age_filter()); |
610 filter = sk_sp<SkImageFilter>(SkOffsetImageFilter::Create(make_scalar(),
make_scalar(), | |
611 subFilter.get(
))); | |
612 break; | 610 break; |
613 } | |
614 case MATRIX: { | 611 case MATRIX: { |
615 sk_sp<SkImageFilter> subFilter(make_image_filter()); | 612 sk_sp<SkImageFilter> subFilter(make_image_filter()); |
616 filter = sk_sp<SkImageFilter>(SkImageFilter::CreateMatrixFilter(make_mat
rix(), | 613 filter = sk_sp<SkImageFilter>(SkImageFilter::CreateMatrixFilter(make_mat
rix(), |
617 (SkFilte
rQuality)R(4), | 614 (SkFilte
rQuality)R(4), |
618 subFilte
r.get())); | 615 subFilte
r.get())); |
619 break; | 616 break; |
620 } | 617 } |
621 case MATRIX_CONVOLUTION: { | 618 case MATRIX_CONVOLUTION: { |
622 SkImageFilter::CropRect cropR(SkRect::MakeWH(SkIntToScalar(kBitmapSize), | 619 SkImageFilter::CropRect cropR(SkRect::MakeWH(SkIntToScalar(kBitmapSize), |
623 SkIntToScalar(kBitmapSize))
); | 620 SkIntToScalar(kBitmapSize))
); |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
869 } | 866 } |
870 | 867 |
871 private: | 868 private: |
872 typedef SkView INHERITED; | 869 typedef SkView INHERITED; |
873 }; | 870 }; |
874 | 871 |
875 ////////////////////////////////////////////////////////////////////////////// | 872 ////////////////////////////////////////////////////////////////////////////// |
876 | 873 |
877 static SkView* MyFactory() { return new ImageFilterFuzzView; } | 874 static SkView* MyFactory() { return new ImageFilterFuzzView; } |
878 static SkViewRegister reg(MyFactory); | 875 static SkViewRegister reg(MyFactory); |
OLD | NEW |