aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PathOpsCubicIntersectionTest.cpp
diff options
context:
space:
mode:
authorGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-06-17 14:10:36 +0000
committerGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-06-17 14:10:36 +0000
commitd892bd8ba676d34d4ce4a73ac7aad88e102fad70 (patch)
treef8b35e6d7582800ef622fc796ef4077163763a05 /tests/PathOpsCubicIntersectionTest.cpp
parentacb3d88cf84adf367c173a7a33cd3b0c379291dc (diff)
convert pathops to use SkSTArray where possible.
Replace SkTDArray with SkTArray and use SkSTArray when the probable array size is known. In a couple of places (spans, chases) the arrays are constructed using insert() so SkTArrays can't be used for now. Also, add an optimization to cubic subdivide if either end is zero or one. BUG= Review URL: https://codereview.chromium.org/16951017 git-svn-id: http://skia.googlecode.com/svn/trunk@9635 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/PathOpsCubicIntersectionTest.cpp')
-rw-r--r--tests/PathOpsCubicIntersectionTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/PathOpsCubicIntersectionTest.cpp b/tests/PathOpsCubicIntersectionTest.cpp
index b0d6bd881b..7f5f4cd040 100644
--- a/tests/PathOpsCubicIntersectionTest.cpp
+++ b/tests/PathOpsCubicIntersectionTest.cpp
@@ -244,7 +244,7 @@ static void oneOff(skiatest::Reporter* reporter, const SkDCubic& cubic1, const S
cubic2[0].fX, cubic2[0].fY, cubic2[1].fX, cubic2[1].fY,
cubic2[2].fX, cubic2[2].fY, cubic2[3].fX, cubic2[3].fY);
#endif
- SkTDArray<SkDQuad> quads1;
+ SkTArray<SkDQuad, true> quads1;
CubicToQuads(cubic1, cubic1.calcPrecision(), quads1);
#if ONE_OFF_DEBUG
SkDebugf("computed quadratics set 1\n");
@@ -254,7 +254,7 @@ static void oneOff(skiatest::Reporter* reporter, const SkDCubic& cubic1, const S
q[1].fX, q[1].fY, q[2].fX, q[2].fY);
}
#endif
- SkTDArray<SkDQuad> quads2;
+ SkTArray<SkDQuad, true> quads2;
CubicToQuads(cubic2, cubic2.calcPrecision(), quads2);
#if ONE_OFF_DEBUG
SkDebugf("computed quadratics set 2\n");