OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "gm.h" | 8 #include "gm.h" |
9 #include "SkBlurMask.h" | 9 #include "SkBlurMask.h" |
10 #include "SkBlurMaskFilter.h" | 10 #include "SkBlurMaskFilter.h" |
11 #include "SkCanvas.h" | 11 #include "SkCanvas.h" |
12 #include "SkDrawFilter.h" | 12 #include "SkDrawFilter.h" |
13 #include "SkPaint.h" | 13 #include "SkPaint.h" |
14 | 14 |
| 15 #ifdef SK_SUPPORT_LEGACY_DRAWFILTER |
| 16 |
15 /** | 17 /** |
16 * Initial test coverage for SkDrawFilter. | 18 * Initial test coverage for SkDrawFilter. |
17 * Draws two rectangles; if draw filters are broken, they will match. | 19 * Draws two rectangles; if draw filters are broken, they will match. |
18 * If draw filters are working correctly, the first will be blue and blurred, | 20 * If draw filters are working correctly, the first will be blue and blurred, |
19 * the second red and sharp. | 21 * the second red and sharp. |
20 */ | 22 */ |
21 | 23 |
22 namespace { | 24 namespace { |
23 class TestFilter : public SkDrawFilter { | 25 class TestFilter : public SkDrawFilter { |
24 public: | 26 public: |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 // Must unset if the DrawFilter is from the stack to avoid refcount erro
rs! | 65 // Must unset if the DrawFilter is from the stack to avoid refcount erro
rs! |
64 canvas->setDrawFilter(nullptr); | 66 canvas->setDrawFilter(nullptr); |
65 } | 67 } |
66 | 68 |
67 private: | 69 private: |
68 typedef GM INHERITED; | 70 typedef GM INHERITED; |
69 }; | 71 }; |
70 | 72 |
71 DEF_GM( return new DrawFilterGM; ) | 73 DEF_GM( return new DrawFilterGM; ) |
72 | 74 |
| 75 #endif |
OLD | NEW |