diff options
author | Mike Reed <reed@google.com> | 2016-10-03 21:34:16 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-10-03 21:34:36 +0000 |
commit | 2cbcd12281ee807214df094964c584c78932e10b (patch) | |
tree | 456f2c92158b18a8b010cc6e5bb594b73fbb998e /fuzz | |
parent | 418374c0d27280f3a1161601ae5fab28a76a0d3c (diff) |
Revert "Revert "Revert "replace SkXfermode obj with SkBlendMode enum in paints"""
This reverts commit I86875511a13497112827cbaed1dbd7639e9e3d10.
legacy (100K) skp failure
Original change's description:
> Revert "Revert "replace SkXfermode obj with SkBlendMode enum in paints""
>
> This reverts commit ce02e7175872abde3721df9e5d3ec0ab8384cd8e.
>
> BUG=skia:
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2878
>
> Change-Id: I86875511a13497112827cbaed1dbd7639e9e3d10
> Reviewed-on: https://skia-review.googlesource.com/2878
> Reviewed-by: Matt Sarett <msarett@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
>
TBR=msarett@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: Ife6f0cf3a22b3e8cf885a188f7f44e1ff62e06a5
Reviewed-on: https://skia-review.googlesource.com/2881
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'fuzz')
-rw-r--r-- | fuzz/FilterFuzz.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fuzz/FilterFuzz.cpp b/fuzz/FilterFuzz.cpp index e6f9cb31cb..6b766a2b7c 100644 --- a/fuzz/FilterFuzz.cpp +++ b/fuzz/FilterFuzz.cpp @@ -154,8 +154,8 @@ static SkMatrix make_matrix() { return m; } -static SkBlendMode make_blendmode() { - return static_cast<SkBlendMode>(R((int)SkBlendMode::kLastMode+1)); +static SkXfermode::Mode make_xfermode() { + return static_cast<SkXfermode::Mode>(R(SkXfermode::kLastMode+1)); } static SkPaint::Align make_paint_align() { @@ -369,7 +369,7 @@ static sk_sp<SkColorFilter> make_color_filter() { return SkTableColorFilter::MakeARGB(tableA, tableR, tableG, tableB); } case 3: - return SkColorFilter::MakeModeFilter(make_color(), (SkXfermode::Mode)make_blendmode()); + return SkColorFilter::MakeModeFilter(make_color(), make_xfermode()); case 4: return SkColorMatrixFilter::MakeLightingFilter(make_color(), make_color()); case 5: @@ -505,7 +505,7 @@ static SkPaint make_paint() { paint.setStrokeCap(make_paint_cap()); paint.setStrokeJoin(make_paint_join()); paint.setColorFilter(make_color_filter()); - paint.setBlendMode(make_blendmode()); + paint.setXfermodeMode(make_xfermode()); paint.setPathEffect(make_path_effect()); paint.setMaskFilter(make_mask_filter()); @@ -540,7 +540,7 @@ static sk_sp<SkImageFilter> make_image_filter(bool canBeNull) { } enum { ALPHA_THRESHOLD, MERGE, COLOR, LUT3D, BLUR, MAGNIFIER, - BLENDMODE, OFFSET, MATRIX, MATRIX_CONVOLUTION, COMPOSE, + XFERMODE, OFFSET, MATRIX, MATRIX_CONVOLUTION, COMPOSE, DISTANT_LIGHT, POINT_LIGHT, SPOT_LIGHT, NOISE, DROP_SHADOW, MORPHOLOGY, BITMAP, DISPLACE, TILE, PICTURE, PAINT, NUM_FILTERS }; @@ -554,7 +554,7 @@ static sk_sp<SkImageFilter> make_image_filter(bool canBeNull) { case MERGE: filter = SkMergeImageFilter::Make(make_image_filter(), make_image_filter(), - (SkXfermode::Mode)make_blendmode()); + make_xfermode()); break; case COLOR: { sk_sp<SkColorFilter> cf(make_color_filter()); @@ -580,8 +580,8 @@ static sk_sp<SkImageFilter> make_image_filter(bool canBeNull) { make_scalar(true), make_image_filter()); break; - case BLENDMODE: - filter = SkXfermodeImageFilter::Make(make_blendmode(), + case XFERMODE: + filter = SkXfermodeImageFilter::Make(SkXfermode::Make(make_xfermode()), make_image_filter(), make_image_filter(), nullptr); |