| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "SkBlurImageFilter.h" | 10 #include "SkBlurImageFilter.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 } | 71 } |
| 72 | 72 |
| 73 virtual void onDraw(SkCanvas* canvas) { | 73 virtual void onDraw(SkCanvas* canvas) { |
| 74 SkBitmap bm; | 74 SkBitmap bm; |
| 75 make_bm(&bm); | 75 make_bm(&bm); |
| 76 | 76 |
| 77 int dx = 10; | 77 int dx = 10; |
| 78 int dy = 10; | 78 int dy = 10; |
| 79 | 79 |
| 80 SkScalar sigma = 8; | 80 SkScalar sigma = 8; |
| 81 SkAutoTUnref<SkImageFilter> filter(new SkBlurImageFilter(sigma, sigma)); | 81 SkAutoTUnref<SkImageFilter> filter(SkBlurImageFilter::Create(sigma, sigm
a)); |
| 82 | 82 |
| 83 draw_2_bitmaps(canvas, bm, false, dx, dy); | 83 draw_2_bitmaps(canvas, bm, false, dx, dy); |
| 84 dy += bm.height() + 20; | 84 dy += bm.height() + 20; |
| 85 draw_2_bitmaps(canvas, bm, false, dx, dy, filter); | 85 draw_2_bitmaps(canvas, bm, false, dx, dy, filter); |
| 86 dy += bm.height() + 20; | 86 dy += bm.height() + 20; |
| 87 draw_2_bitmaps(canvas, bm, true, dx, dy); | 87 draw_2_bitmaps(canvas, bm, true, dx, dy); |
| 88 dy += bm.height() + 20; | 88 dy += bm.height() + 20; |
| 89 draw_2_bitmaps(canvas, bm, true, dx, dy, filter); | 89 draw_2_bitmaps(canvas, bm, true, dx, dy, filter); |
| 90 } | 90 } |
| 91 | 91 |
| 92 private: | 92 private: |
| 93 typedef GM INHERITED; | 93 typedef GM INHERITED; |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 ////////////////////////////////////////////////////////////////////////////// | 96 ////////////////////////////////////////////////////////////////////////////// |
| 97 | 97 |
| 98 DEF_GM( return new SpriteBitmapGM; ) | 98 DEF_GM( return new SpriteBitmapGM; ) |
| OLD | NEW |