skia2/tests/skbug6389.cpp
Hal Canary c465d13e6f resources: orgainize directory.
Should make it easier to ask just for images.

Change-Id: If821743dc924c4bfbc6b2b2d29b14affde7b3afd
Reviewed-on: https://skia-review.googlesource.com/82684
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2017-12-08 17:16:00 +00:00

24 lines
766 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 "Resources.h"
#include "SkBlurMaskFilter.h"
#include "SkCanvas.h"
#include "SkImageSource.h"
#include "SkSurface.h"
#include "Test.h"
DEF_TEST(skbug_6389, r) {
auto s = SkSurface::MakeRasterN32Premul(100, 100);
SkPaint p;
p.setMaskFilter(SkBlurMaskFilter::Make(SkBlurStyle::kNormal_SkBlurStyle, 5,
SkBlurMaskFilter::kHighQuality_BlurFlag));
p.setImageFilter(SkImageSource::Make(GetResourceAsImage("images/mandrill_512.png"), {0, 0, 0, 0},
{0, 0, 0, 0}, (SkFilterQuality)0));
s->getCanvas()->drawPaint(p);
}