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

Side by Side Diff: samplecode/SampleFilterFuzz.cpp

Issue 1832223002: switch xfermodes over to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 4 years, 8 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 unified diff | Download patch
OLDNEW
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
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
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);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698