1 /*
2 * Copyright 2018 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 "gm/gm.h"
9 #include "include/core/SkBlendMode.h"
10 #include "include/core/SkBlurTypes.h"
11 #include "include/core/SkCanvas.h"
12 #include "include/core/SkColor.h"
13 #include "include/core/SkColorFilter.h"
14 #include "include/core/SkMaskFilter.h"
15 #include "include/core/SkMatrix.h"
16 #include "include/core/SkPaint.h"
17 #include "include/core/SkRect.h"
18
DEF_SIMPLE_GM(crbug_899512, canvas, 520, 520)19 DEF_SIMPLE_GM(crbug_899512, canvas, 520, 520) {
20 // comment this line below to solve the problem
21 SkMatrix matrix;
22 matrix.setAll(-1, 0, 220, 0, 1, 0, 0, 0, 1);
23 canvas->concat(matrix);
24 SkPaint paint;
25 paint.setMaskFilter(SkMaskFilter::MakeBlur(kNormal_SkBlurStyle, 6.2735f, false));
26 paint.setColorFilter(SkColorFilters::Blend(SK_ColorBLACK, SkBlendMode::kSrcIn));
27 canvas->drawRect(SkRect::MakeXYWH(0, 10, 200, 200), paint);
28 }
29