Hal Canary | 27ecd86 | 2017-03-21 14:00:35 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2017 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 8 | #include "include/core/SkCanvas.h" |
| 9 | #include "include/core/SkMaskFilter.h" |
| 10 | #include "include/core/SkSurface.h" |
| 11 | #include "include/effects/SkImageSource.h" |
| 12 | #include "tests/Test.h" |
| 13 | #include "tools/Resources.h" |
Hal Canary | 27ecd86 | 2017-03-21 14:00:35 -0700 | [diff] [blame] | 14 | |
| 15 | DEF_TEST(skbug_6389, r) { |
| 16 | auto s = SkSurface::MakeRasterN32Premul(100, 100); |
| 17 | SkPaint p; |
Mike Reed | 1be1f8d | 2018-03-14 13:01:17 -0400 | [diff] [blame] | 18 | p.setMaskFilter(SkMaskFilter::MakeBlur(SkBlurStyle::kNormal_SkBlurStyle, 5)); |
Hal Canary | c465d13 | 2017-12-08 10:21:31 -0500 | [diff] [blame] | 19 | p.setImageFilter(SkImageSource::Make(GetResourceAsImage("images/mandrill_512.png"), {0, 0, 0, 0}, |
Hal Canary | 27ecd86 | 2017-03-21 14:00:35 -0700 | [diff] [blame] | 20 | {0, 0, 0, 0}, (SkFilterQuality)0)); |
| 21 | s->getCanvas()->drawPaint(p); |
| 22 | } |