blob: d82a1462fbaafe3be37834051cb8fc70e18181e6 [file] [log] [blame]
Hal Canary27ecd862017-03-21 14:00:35 -07001/*
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
8#include "Resources.h"
Hal Canary27ecd862017-03-21 14:00:35 -07009#include "SkCanvas.h"
10#include "SkImageSource.h"
Mike Reed1be1f8d2018-03-14 13:01:17 -040011#include "SkMaskFilter.h"
Hal Canary27ecd862017-03-21 14:00:35 -070012#include "SkSurface.h"
13#include "Test.h"
14
15DEF_TEST(skbug_6389, r) {
16 auto s = SkSurface::MakeRasterN32Premul(100, 100);
17 SkPaint p;
Mike Reed1be1f8d2018-03-14 13:01:17 -040018 p.setMaskFilter(SkMaskFilter::MakeBlur(SkBlurStyle::kNormal_SkBlurStyle, 5));
Hal Canaryc465d132017-12-08 10:21:31 -050019 p.setImageFilter(SkImageSource::Make(GetResourceAsImage("images/mandrill_512.png"), {0, 0, 0, 0},
Hal Canary27ecd862017-03-21 14:00:35 -070020 {0, 0, 0, 0}, (SkFilterQuality)0));
21 s->getCanvas()->drawPaint(p);
22}