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

Side by Side Diff: src/gpu/GrTestUtils.cpp

Issue 1282333002: Fix to call SkDelete_array instead of SkDelete to fix ASAN error. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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 | « no previous file | no next file » | 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 "GrStrokeInfo.h" 8 #include "GrStrokeInfo.h"
9 #include "GrTestUtils.h" 9 #include "GrTestUtils.h"
10 #include "SkMatrix.h" 10 #include "SkMatrix.h"
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 dashInfo.fCount = random->nextRangeU(1, 50) * 2; 246 dashInfo.fCount = random->nextRangeU(1, 50) * 2;
247 dashInfo.fIntervals = SkNEW_ARRAY(SkScalar, dashInfo.fCount); 247 dashInfo.fIntervals = SkNEW_ARRAY(SkScalar, dashInfo.fCount);
248 SkScalar sum = 0; 248 SkScalar sum = 0;
249 for (int i = 0; i < dashInfo.fCount; i++) { 249 for (int i = 0; i < dashInfo.fCount; i++) {
250 dashInfo.fIntervals[i] = random->nextRangeScalar(SkDoubleToScalar(0.01), 250 dashInfo.fIntervals[i] = random->nextRangeScalar(SkDoubleToScalar(0.01),
251 SkDoubleToScalar(10.0)) ; 251 SkDoubleToScalar(10.0)) ;
252 sum += dashInfo.fIntervals[i]; 252 sum += dashInfo.fIntervals[i];
253 } 253 }
254 dashInfo.fPhase = random->nextRangeScalar(0, sum); 254 dashInfo.fPhase = random->nextRangeScalar(0, sum);
255 strokeInfo.setDashInfo(dashInfo); 255 strokeInfo.setDashInfo(dashInfo);
256 SkDELETE(dashInfo.fIntervals); 256 SkDELETE_ARRAY(dashInfo.fIntervals);
257 return strokeInfo; 257 return strokeInfo;
258 } 258 }
259 259
260 }; 260 };
261 261
262 #endif 262 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698