Brian Salomon | 908bb23 | 2018-11-19 10:05:08 -0500 | [diff] [blame] | 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 | |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 8 | #include "gm/gm.h" |
Ben Wagner | 7fde8e1 | 2019-05-01 17:28:53 -0400 | [diff] [blame] | 9 | #include "include/core/SkBlendMode.h" |
| 10 | #include "include/core/SkBlurTypes.h" |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 11 | #include "include/core/SkCanvas.h" |
Ben Wagner | 7fde8e1 | 2019-05-01 17:28:53 -0400 | [diff] [blame] | 12 | #include "include/core/SkColor.h" |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 13 | #include "include/core/SkColorFilter.h" |
Ben Wagner | 7fde8e1 | 2019-05-01 17:28:53 -0400 | [diff] [blame] | 14 | #include "include/core/SkMaskFilter.h" |
| 15 | #include "include/core/SkMatrix.h" |
| 16 | #include "include/core/SkPaint.h" |
| 17 | #include "include/core/SkRect.h" |
Brian Salomon | 908bb23 | 2018-11-19 10:05:08 -0500 | [diff] [blame] | 18 | |
| 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)); |
Mike Reed | b286bc2 | 2019-04-08 16:23:20 -0400 | [diff] [blame] | 26 | paint.setColorFilter(SkColorFilters::Blend(SK_ColorBLACK, SkBlendMode::kSrcIn)); |
Brian Salomon | 908bb23 | 2018-11-19 10:05:08 -0500 | [diff] [blame] | 27 | canvas->drawRect(SkRect::MakeXYWH(0, 10, 200, 200), paint); |
| 28 | } |