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

Side by Side Diff: fuzz/FilterFuzz.cpp

Issue 1864843002: Update MagnifierImageFilter to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « bench/MagnifierBench.cpp ('k') | gm/imagemagnifier.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 "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 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 filter = cf ? SkColorFilterImageFilter::Make(std::move(cf), make_image_f ilter()) 572 filter = cf ? SkColorFilterImageFilter::Make(std::move(cf), make_image_f ilter())
573 : nullptr; 573 : nullptr;
574 break; 574 break;
575 } 575 }
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 = SkMagnifierImageFilter::Make(make_rect(),
583 make_scalar (true))); 583 make_scalar(true),
584 make_image_filter());
f(malita) 2016/04/07 13:33:42 Third arg should be nullptr for equivalence with e
robertphillips 2016/04/07 14:02:05 Right - I believe the prior behavior was incorrect
584 break; 585 break;
585 case DOWN_SAMPLE: 586 case DOWN_SAMPLE:
586 filter = sk_sp<SkImageFilter>(SkDownSampleImageFilter::Create(make_scala r())); 587 filter = sk_sp<SkImageFilter>(SkDownSampleImageFilter::Create(make_scala r()));
587 break; 588 break;
588 case XFERMODE: 589 case XFERMODE:
589 filter = SkXfermodeImageFilter::Make(SkXfermode::Make(make_xfermode()), 590 filter = SkXfermodeImageFilter::Make(SkXfermode::Make(make_xfermode()),
590 make_image_filter(), 591 make_image_filter(),
591 make_image_filter(), 592 make_image_filter(),
592 nullptr); 593 nullptr);
593 break; 594 break;
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 DEF_FUZZ(SerializedImageFilter, f) { 801 DEF_FUZZ(SerializedImageFilter, f) {
801 fuzz = f; 802 fuzz = f;
802 SkImageFilter* filter = make_serialized_image_filter(); 803 SkImageFilter* filter = make_serialized_image_filter();
803 804
804 SkPaint paint; 805 SkPaint paint;
805 SkSafeUnref(paint.setImageFilter(filter)); 806 SkSafeUnref(paint.setImageFilter(filter));
806 SkBitmap bitmap; 807 SkBitmap bitmap;
807 SkCanvas canvas(bitmap); 808 SkCanvas canvas(bitmap);
808 drawClippedBitmap(&canvas, 0, 0, paint); 809 drawClippedBitmap(&canvas, 0, 0, paint);
809 } 810 }
OLDNEW
« no previous file with comments | « bench/MagnifierBench.cpp ('k') | gm/imagemagnifier.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698