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

Side by Side Diff: gm/convex_all_line_paths.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/constcolorprocessor.cpp ('k') | gm/convexpolyclip.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 "gm.h" 8 #include "gm.h"
9 #include "SkPathPriv.h" 9 #include "SkPathPriv.h"
10 10
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 numPts = 20; 204 numPts = 20;
205 break; 205 break;
206 case 8: 206 case 8:
207 numPts = 100; 207 numPts = 100;
208 break; 208 break;
209 default: 209 default:
210 numPts = 3; 210 numPts = 3;
211 break; 211 break;
212 } 212 }
213 213
214 data.reset(SkNEW_ARRAY(SkPoint, numPts)); 214 data.reset(new SkPoint[numPts]);
215 215
216 create_ngon(numPts, data.get(), width, height); 216 create_ngon(numPts, data.get(), width, height);
217 points = data.get(); 217 points = data.get();
218 } 218 }
219 219
220 SkPath path; 220 SkPath path;
221 221
222 if (SkPath::kCW_Direction == dir) { 222 if (SkPath::kCW_Direction == dir) {
223 path.moveTo(points[0]); 223 path.moveTo(points[0]);
224 for (int i = 1; i < numPts; ++i) { 224 for (int i = 1; i < numPts; ++i) {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 static const int kNumPaths = 20; 310 static const int kNumPaths = 20;
311 static const int kMaxPathHeight = 100; 311 static const int kMaxPathHeight = 100;
312 static const int kGMWidth = 512; 312 static const int kGMWidth = 512;
313 static const int kGMHeight = 512; 313 static const int kGMHeight = 512;
314 314
315 typedef GM INHERITED; 315 typedef GM INHERITED;
316 }; 316 };
317 317
318 ////////////////////////////////////////////////////////////////////////////// 318 //////////////////////////////////////////////////////////////////////////////
319 319
320 DEF_GM( return SkNEW(ConvexLineOnlyPathsGM); ) 320 DEF_GM(return new ConvexLineOnlyPathsGM;)
321
322 } 321 }
OLDNEW
« no previous file with comments | « gm/constcolorprocessor.cpp ('k') | gm/convexpolyclip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698