OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkColorFilter.h" | 10 #include "SkColorFilter.h" |
11 #include "SkColorPriv.h" | 11 #include "SkColorPriv.h" |
12 #include "SkShader.h" | 12 #include "SkShader.h" |
13 | 13 |
14 #include "SkBlurImageFilter.h" | 14 #include "SkBlurImageFilter.h" |
15 #include "SkMorphologyImageFilter.h" | 15 #include "SkMorphologyImageFilter.h" |
16 #include "SkColorFilterImageFilter.h" | 16 #include "SkColorFilterImageFilter.h" |
17 #include "SkMergeImageFilter.h" | 17 #include "SkMergeImageFilter.h" |
18 #include "SkOffsetImageFilter.h" | 18 #include "SkOffsetImageFilter.h" |
19 #include "SkTestImageFilters.h" | |
20 | 19 |
21 /////////////////////////////////////////////////////////////////////////////// | 20 /////////////////////////////////////////////////////////////////////////////// |
22 | 21 |
23 static void draw_paint(SkCanvas* canvas, const SkRect& r, sk_sp<SkImageFilter> i
mf) { | 22 static void draw_paint(SkCanvas* canvas, const SkRect& r, sk_sp<SkImageFilter> i
mf) { |
24 SkPaint paint; | 23 SkPaint paint; |
25 paint.setImageFilter(std::move(imf)); | 24 paint.setImageFilter(std::move(imf)); |
26 paint.setColor(SK_ColorBLACK); | 25 paint.setColor(SK_ColorBLACK); |
27 canvas->save(); | 26 canvas->save(); |
28 canvas->clipRect(r); | 27 canvas->clipRect(r); |
29 canvas->drawPaint(paint); | 28 canvas->drawPaint(paint); |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 } | 170 } |
172 | 171 |
173 private: | 172 private: |
174 SkBitmap fCheckerboard; | 173 SkBitmap fCheckerboard; |
175 typedef GM INHERITED; | 174 typedef GM INHERITED; |
176 }; | 175 }; |
177 | 176 |
178 /////////////////////////////////////////////////////////////////////////////// | 177 /////////////////////////////////////////////////////////////////////////////// |
179 | 178 |
180 DEF_GM( return new ImageFiltersCroppedGM; ) | 179 DEF_GM( return new ImageFiltersCroppedGM; ) |
OLD | NEW |