| 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" |
| 11 #include "SkRSXform.h" |
| 12 #include "SkSurface.h" |
| 11 | 13 |
| 12 static void make_bm(SkBitmap* bm) { | 14 static void make_bm(SkBitmap* bm) { |
| 13 bm->allocN32Pixels(100, 100); | 15 bm->allocN32Pixels(100, 100); |
| 14 bm->eraseColor(SK_ColorBLUE); | 16 bm->eraseColor(SK_ColorBLUE); |
| 15 | 17 |
| 16 SkCanvas canvas(*bm); | 18 SkCanvas canvas(*bm); |
| 17 SkPaint paint; | 19 SkPaint paint; |
| 18 paint.setAntiAlias(true); | 20 paint.setAntiAlias(true); |
| 19 paint.setColor(SK_ColorRED); | 21 paint.setColor(SK_ColorRED); |
| 20 canvas.drawCircle(50, 50, 50, paint); | 22 canvas.drawCircle(50, 50, 50, paint); |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 draw_2_bitmaps(canvas, bm, false, dx, dy, filter); | 88 draw_2_bitmaps(canvas, bm, false, dx, dy, filter); |
| 87 dy += bm.height() + 20; | 89 dy += bm.height() + 20; |
| 88 draw_2_bitmaps(canvas, bm, true, dx, dy); | 90 draw_2_bitmaps(canvas, bm, true, dx, dy); |
| 89 dy += bm.height() + 20; | 91 dy += bm.height() + 20; |
| 90 draw_2_bitmaps(canvas, bm, true, dx, dy, filter); | 92 draw_2_bitmaps(canvas, bm, true, dx, dy, filter); |
| 91 } | 93 } |
| 92 | 94 |
| 93 private: | 95 private: |
| 94 typedef GM INHERITED; | 96 typedef GM INHERITED; |
| 95 }; | 97 }; |
| 98 DEF_GM( return new SpriteBitmapGM; ) |
| 96 | 99 |
| 97 ////////////////////////////////////////////////////////////////////////////// | |
| 98 | |
| 99 DEF_GM( return new SpriteBitmapGM; ) | |
| OLD | NEW |