Skbug6389.cpp 745 B

12345678910111213141516171819202122
  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. #include "include/core/SkCanvas.h"
  8. #include "include/core/SkMaskFilter.h"
  9. #include "include/core/SkSurface.h"
  10. #include "include/effects/SkImageSource.h"
  11. #include "tests/Test.h"
  12. #include "tools/Resources.h"
  13. DEF_TEST(skbug_6389, r) {
  14. auto s = SkSurface::MakeRasterN32Premul(100, 100);
  15. SkPaint p;
  16. p.setMaskFilter(SkMaskFilter::MakeBlur(SkBlurStyle::kNormal_SkBlurStyle, 5));
  17. p.setImageFilter(SkImageSource::Make(GetResourceAsImage("images/mandrill_512.png"), {0, 0, 0, 0},
  18. {0, 0, 0, 0}, (SkFilterQuality)0));
  19. s->getCanvas()->drawPaint(p);
  20. }