| 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 "Resources.h" | 8 #include "Resources.h" |
| 9 #include "SkImage.h" | 9 #include "SkImage.h" |
| 10 #include "gm.h" | 10 #include "gm.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 canvas->translate(96.0f + 192.0f * i, 96.0f + 192.0f * j); | 28 canvas->translate(96.0f + 192.0f * i, 96.0f + 192.0f * j); |
| 29 canvas->rotate(18.0f * (i + 4 * j)); | 29 canvas->rotate(18.0f * (i + 4 * j)); |
| 30 canvas->drawRect(rect, paint); | 30 canvas->drawRect(rect, paint); |
| 31 canvas->scale(scale, scale); | 31 canvas->scale(scale, scale); |
| 32 canvas->drawImage(image, point[0], point[1]); | 32 canvas->drawImage(image, point[0], point[1]); |
| 33 } | 33 } |
| 34 } | 34 } |
| 35 } | 35 } |
| 36 | 36 |
| 37 DEF_SIMPLE_GM(repeated_bitmap, canvas, 576, 576) { | 37 DEF_SIMPLE_GM(repeated_bitmap, canvas, 576, 576) { |
| 38 SkAutoTUnref<SkImage> image(GetResourceAsImage("randPixels.png")); | 38 draw_rotated_image(canvas, GetResourceAsImage("randPixels.png").get()); |
| 39 draw_rotated_image(canvas, image); | |
| 40 } | 39 } |
| 41 | 40 |
| 42 DEF_SIMPLE_GM(repeated_bitmap_jpg, canvas, 576, 576) { | 41 DEF_SIMPLE_GM(repeated_bitmap_jpg, canvas, 576, 576) { |
| 43 SkAutoTUnref<SkImage> image(GetResourceAsImage("color_wheel.jpg")); | 42 draw_rotated_image(canvas, GetResourceAsImage("color_wheel.jpg").get()); |
| 44 draw_rotated_image(canvas, image); | |
| 45 } | 43 } |
| OLD | NEW |