Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Side by Side Diff: gm/repeated_bitmap.cpp

Issue 1810813003: update callsites for Make image factories (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: start to take advantage of sk_sp drawImage Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gm/rectangletexture.cpp ('k') | gm/resizeimagefilter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « gm/rectangletexture.cpp ('k') | gm/resizeimagefilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698