aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTestUtils.cpp
diff options
context:
space:
mode:
authorGravatar egdaniel <egdaniel@google.com>2015-08-10 10:06:43 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-08-10 10:06:43 -0700
commit9d144ac15f26c0148dbcb82dd5aa1a348cb912ee (patch)
tree88a3d32611b444646e8d21a018453c6796e841fd /src/gpu/GrTestUtils.cpp
parentd6b99cc6b84b3ec864221cbe9945d203bd9eb072 (diff)
This is a speculative fix for the crash on IOS
Diffstat (limited to 'src/gpu/GrTestUtils.cpp')
-rw-r--r--src/gpu/GrTestUtils.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gpu/GrTestUtils.cpp b/src/gpu/GrTestUtils.cpp
index da9fc106b3..ba70ef6cb9 100644
--- a/src/gpu/GrTestUtils.cpp
+++ b/src/gpu/GrTestUtils.cpp
@@ -244,19 +244,16 @@ GrStrokeInfo TestStrokeInfo(SkRandom* random) {
randomize_stroke_rec(&strokeInfo, random);
SkPathEffect::DashInfo dashInfo;
dashInfo.fCount = random->nextRangeU(1, 50) * 2;
- SkAutoTMalloc<SkScalar> intervals(dashInfo.fCount);
- dashInfo.fIntervals = intervals.get();
+ dashInfo.fIntervals = SkNEW_ARRAY(SkScalar, dashInfo.fCount);
SkScalar sum = 0;
for (int i = 0; i < dashInfo.fCount; i++) {
- #if defined(SK_BUILD_FOR_IOS)
- SkDebugf("&dashInfo.fIntervals[%d] = %p\n", i, &dashInfo.fIntervals[i]);
- #endif
dashInfo.fIntervals[i] = random->nextRangeScalar(SkDoubleToScalar(0.01),
SkDoubleToScalar(10.0));
sum += dashInfo.fIntervals[i];
}
dashInfo.fPhase = random->nextRangeScalar(0, sum);
strokeInfo.setDashInfo(dashInfo);
+ SkDELETE(dashInfo.fIntervals);
return strokeInfo;
}