skia2/tests/Skbug6389.cpp
Michael Ludwig 55edb50262 Update tests to use new image filter factories
Bug: skia:9280
Change-Id: Id8253baa6ca387b6f2f0583f29b2c25cc1005545
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230880
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-05 15:15:45 +00:00

23 lines
753 B
C++

/*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "include/core/SkCanvas.h"
#include "include/core/SkMaskFilter.h"
#include "include/core/SkSurface.h"
#include "include/effects/SkImageFilters.h"
#include "tests/Test.h"
#include "tools/Resources.h"
DEF_TEST(skbug_6389, r) {
auto s = SkSurface::MakeRasterN32Premul(100, 100);
SkPaint p;
p.setMaskFilter(SkMaskFilter::MakeBlur(SkBlurStyle::kNormal_SkBlurStyle, 5));
p.setImageFilter(SkImageFilters::Image(GetResourceAsImage("images/mandrill_512.png"),
{0, 0, 0, 0}, {0, 0, 0, 0}, kNone_SkFilterQuality));
s->getCanvas()->drawPaint(p);
}