• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/SkMaskFilter.h"
11 #include "include/core/SkPaint.h"
12 #include "include/core/SkRefCnt.h"
13 #include "include/core/SkSamplingOptions.h"
14 #include "include/core/SkSurface.h"
15 #include "include/effects/SkImageFilters.h"
16 #include "tests/Test.h"
17 #include "tools/Resources.h"
18 
DEF_TEST(skbug_6389,r)19 DEF_TEST(skbug_6389, r) {
20     auto s = SkSurface::MakeRasterN32Premul(100, 100);
21     SkPaint p;
22     p.setMaskFilter(SkMaskFilter::MakeBlur(SkBlurStyle::kNormal_SkBlurStyle, 5));
23     p.setImageFilter(SkImageFilters::Image(GetResourceAsImage("images/mandrill_512.png"),
24                                            {0, 0, 0, 0}, {0, 0, 0, 0}, SkSamplingOptions()));
25     s->getCanvas()->drawPaint(p);
26 }
27