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

Side by Side Diff: samplecode/SampleFilterFuzz.cpp

Issue 1842193002: Update SkOffsetImageFilter to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT 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
« no previous file with comments | « include/effects/SkOffsetImageFilter.h ('k') | src/effects/SkOffsetImageFilter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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);
OLDNEW
« no previous file with comments | « include/effects/SkOffsetImageFilter.h ('k') | src/effects/SkOffsetImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698