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

Unified Diff: tests/PathOpsTestCommon.cpp

Issue 16951017: convert pathops to use SkSTArray where possible. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: pathops use SkTArray Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/PathOpsTestCommon.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathOpsTestCommon.cpp
diff --git a/tests/PathOpsTestCommon.cpp b/tests/PathOpsTestCommon.cpp
index aab7d6ea254959548e6e4eb8833f0f874c538426..4356b42414774c327751f33228072a6883476f9f 100644
--- a/tests/PathOpsTestCommon.cpp
+++ b/tests/PathOpsTestCommon.cpp
@@ -7,12 +7,12 @@
#include "PathOpsTestCommon.h"
#include "SkPathOpsCubic.h"
-void CubicToQuads(const SkDCubic& cubic, double precision, SkTDArray<SkDQuad>& quads) {
- SkTDArray<double> ts;
+void CubicToQuads(const SkDCubic& cubic, double precision, SkTArray<SkDQuad, true>& quads) {
+ SkTArray<double, true> ts;
cubic.toQuadraticTs(precision, &ts);
if (ts.count() <= 0) {
SkDQuad quad = cubic.toQuad();
- *quads.append() = quad;
+ quads.push_back(quad);
return;
}
double tStart = 0;
@@ -20,7 +20,7 @@ void CubicToQuads(const SkDCubic& cubic, double precision, SkTDArray<SkDQuad>& q
const double tEnd = i1 < ts.count() ? ts[i1] : 1;
SkDCubic part = cubic.subDivide(tStart, tEnd);
SkDQuad quad = part.toQuad();
- *quads.append() = quad;
+ quads.push_back(quad);
tStart = tEnd;
}
}
« no previous file with comments | « tests/PathOpsTestCommon.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698