xref: /aosp_15_r20/external/skia/tests/Skbug6389.cpp (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
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 
8 #include "include/core/SkBlurTypes.h"
9 #include "include/core/SkCanvas.h"
10 #include "include/core/SkImageInfo.h"
11 #include "include/core/SkMaskFilter.h"
12 #include "include/core/SkPaint.h"
13 #include "include/core/SkRefCnt.h"
14 #include "include/core/SkSamplingOptions.h"
15 #include "include/core/SkSurface.h"
16 #include "include/effects/SkImageFilters.h"
17 #include "tests/Test.h"
18 #include "tools/DecodeUtils.h"
19 
DEF_TEST(skbug_6389,r)20 DEF_TEST(skbug_6389, r) {
21     auto s = SkSurfaces::Raster(SkImageInfo::MakeN32Premul(100, 100));
22     SkPaint p;
23     p.setMaskFilter(SkMaskFilter::MakeBlur(SkBlurStyle::kNormal_SkBlurStyle, 5));
24     p.setImageFilter(SkImageFilters::Image(ToolUtils::GetResourceAsImage("images/mandrill_512.png"),
25                                            {0, 0, 0, 0},
26                                            {0, 0, 0, 0},
27                                            SkSamplingOptions()));
28     s->getCanvas()->drawPaint(p);
29 }
30