| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "SkBlurImageFilter.h" | 9 #include "SkBlurImageFilter.h" |
| 10 #include "SkDropShadowImageFilter.h" | 10 #include "SkDropShadowImageFilter.h" |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 add_paint(dsif, paints); | 143 add_paint(dsif, paints); |
| 144 } | 144 } |
| 145 | 145 |
| 146 { | 146 { |
| 147 SkAutoTUnref<SkImageFilter> bif(SkBlurImageFilter::Create(3, 3, source))
; | 147 SkAutoTUnref<SkImageFilter> bif(SkBlurImageFilter::Create(3, 3, source))
; |
| 148 | 148 |
| 149 add_paint(bif, paints); | 149 add_paint(bif, paints); |
| 150 } | 150 } |
| 151 | 151 |
| 152 { | 152 { |
| 153 SkAutoTUnref<SkImageFilter> oif(SkOffsetImageFilter::Create(15, 15, sour
ce)); | 153 sk_sp<SkImageFilter> oif(SkOffsetImageFilter::Make(15, 15, |
| 154 sk_ref_sp<SkImageFilt
er>(source))); |
| 154 | 155 |
| 155 add_paint(oif, paints); | 156 add_paint(oif.get(), paints); |
| 156 } | 157 } |
| 157 } | 158 } |
| 158 | 159 |
| 159 // This GM visualizes the fast bounds for various combinations of geometry | 160 // This GM visualizes the fast bounds for various combinations of geometry |
| 160 // and image filter | 161 // and image filter |
| 161 class ImageFilterFastBoundGM : public GM { | 162 class ImageFilterFastBoundGM : public GM { |
| 162 public: | 163 public: |
| 163 ImageFilterFastBoundGM() { | 164 ImageFilterFastBoundGM() { |
| 164 this->setBGColor(sk_tool_utils::color_to_565(0xFFCCCCCC)); | 165 this->setBGColor(sk_tool_utils::color_to_565(0xFFCCCCCC)); |
| 165 } | 166 } |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 } | 328 } |
| 328 | 329 |
| 329 private: | 330 private: |
| 330 typedef GM INHERITED; | 331 typedef GM INHERITED; |
| 331 }; | 332 }; |
| 332 | 333 |
| 333 ////////////////////////////////////////////////////////////////////////////// | 334 ////////////////////////////////////////////////////////////////////////////// |
| 334 | 335 |
| 335 DEF_GM(return new ImageFilterFastBoundGM;) | 336 DEF_GM(return new ImageFilterFastBoundGM;) |
| 336 } | 337 } |
| OLD | NEW |