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 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 case BLUR: | 575 case BLUR: |
576 filter = SkBlurImageFilter::Create(make_scalar(true), make_scalar(true),
make_image_filter()); | 576 filter = SkBlurImageFilter::Create(make_scalar(true), make_scalar(true),
make_image_filter()); |
577 break; | 577 break; |
578 case MAGNIFIER: | 578 case MAGNIFIER: |
579 filter = SkMagnifierImageFilter::Create(make_rect(), make_scalar(true)); | 579 filter = SkMagnifierImageFilter::Create(make_rect(), make_scalar(true)); |
580 break; | 580 break; |
581 case DOWN_SAMPLE: | 581 case DOWN_SAMPLE: |
582 filter = SkDownSampleImageFilter::Create(make_scalar()); | 582 filter = SkDownSampleImageFilter::Create(make_scalar()); |
583 break; | 583 break; |
584 case XFERMODE: | 584 case XFERMODE: |
585 { | 585 filter = SkXfermodeImageFilter::Make(SkXfermode::Make(make_xfermode()), |
586 SkAutoTUnref<SkXfermode> mode(SkXfermode::Create(make_xfermode())); | 586 make_image_filter(), make_image_fil
ter(), |
587 filter = SkXfermodeImageFilter::Create(mode, make_image_filter(), make_i
mage_filter()); | 587 nullptr).release(); |
588 } | |
589 break; | 588 break; |
590 case OFFSET: | 589 case OFFSET: |
591 filter = SkOffsetImageFilter::Create(make_scalar(), make_scalar(), make_
image_filter()); | 590 filter = SkOffsetImageFilter::Create(make_scalar(), make_scalar(), make_
image_filter()); |
592 break; | 591 break; |
593 case MATRIX: | 592 case MATRIX: |
594 filter = SkImageFilter::CreateMatrixFilter(make_matrix(), | 593 filter = SkImageFilter::CreateMatrixFilter(make_matrix(), |
595 (SkFilterQuality)R(4), | 594 (SkFilterQuality)R(4), |
596 make_image_filter()); | 595 make_image_filter()); |
597 break; | 596 break; |
598 case MATRIX_CONVOLUTION: | 597 case MATRIX_CONVOLUTION: |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 } | 804 } |
806 | 805 |
807 private: | 806 private: |
808 typedef SkView INHERITED; | 807 typedef SkView INHERITED; |
809 }; | 808 }; |
810 | 809 |
811 ////////////////////////////////////////////////////////////////////////////// | 810 ////////////////////////////////////////////////////////////////////////////// |
812 | 811 |
813 static SkView* MyFactory() { return new ImageFilterFuzzView; } | 812 static SkView* MyFactory() { return new ImageFilterFuzzView; } |
814 static SkViewRegister reg(MyFactory); | 813 static SkViewRegister reg(MyFactory); |
OLD | NEW |