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

Side by Side Diff: gm/pictureshader.cpp

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT Created 5 years, 3 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/pictureimagegenerator.cpp ('k') | gm/pictureshadertile.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 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 9
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 174
175 SkScalar fTileSize; 175 SkScalar fTileSize;
176 SkScalar fSceneSize; 176 SkScalar fSceneSize;
177 177
178 SkAutoTUnref<SkPicture> fPicture; 178 SkAutoTUnref<SkPicture> fPicture;
179 SkBitmap fBitmap; 179 SkBitmap fBitmap;
180 180
181 typedef GM INHERITED; 181 typedef GM INHERITED;
182 }; 182 };
183 183
184 DEF_GM( return SkNEW_ARGS(PictureShaderGM, (50, 100)); ) 184 DEF_GM(return new PictureShaderGM(50, 100);)
185 185
186 DEF_SIMPLE_GM(tiled_picture_shader, canvas, 400, 400) { 186 DEF_SIMPLE_GM(tiled_picture_shader, canvas, 400, 400) {
187 // https://code.google.com/p/skia/issues/detail?id=3398 187 // https://code.google.com/p/skia/issues/detail?id=3398
188 SkRect tile = SkRect::MakeWH(100, 100); 188 SkRect tile = SkRect::MakeWH(100, 100);
189 189
190 SkPictureRecorder recorder; 190 SkPictureRecorder recorder;
191 SkCanvas* c = recorder.beginRecording(tile); 191 SkCanvas* c = recorder.beginRecording(tile);
192 192
193 SkRect r = tile; 193 SkRect r = tile;
194 r.inset(4, 4); 194 r.inset(4, 4);
(...skipping 15 matching lines...) Expand all
210 p.setColor(sk_tool_utils::color_to_565(0xFF8BC34A)); // green 210 p.setColor(sk_tool_utils::color_to_565(0xFF8BC34A)); // green
211 canvas->drawPaint(p); 211 canvas->drawPaint(p);
212 212
213 canvas->clipRect(SkRect::MakeXYWH(0, 0, 400, 350)); 213 canvas->clipRect(SkRect::MakeXYWH(0, 0, 400, 350));
214 p.setColor(sk_tool_utils::color_to_565(0xFFB6B6B6)); // gray 214 p.setColor(sk_tool_utils::color_to_565(0xFFB6B6B6)); // gray
215 canvas->drawPaint(p); 215 canvas->drawPaint(p);
216 p.setShader(shader.get()); 216 p.setShader(shader.get());
217 217
218 canvas->drawPaint(p); 218 canvas->drawPaint(p);
219 } 219 }
OLDNEW
« no previous file with comments | « gm/pictureimagegenerator.cpp ('k') | gm/pictureshadertile.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698