diff options
author | 2012-03-05 18:24:07 +0000 | |
---|---|---|
committer | 2012-03-05 18:24:07 +0000 | |
commit | 68a5b260e2045070ed0796af98624c3769f590c5 (patch) | |
tree | 8a4c5d6435c778f1dede5f8d637544be42992a8b | |
parent | 9b1517edc7eb3e116902a3b3da447a73aaa56585 (diff) |
Prealloc space for ~10 segments in GrAAConvexPathRenderer
Review URL: http://codereview.appspot.com/5726058/
git-svn-id: http://skia.googlecode.com/svn/trunk@3317 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | src/gpu/GrAAConvexPathRenderer.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gpu/GrAAConvexPathRenderer.cpp b/src/gpu/GrAAConvexPathRenderer.cpp index 657dfc1ee2..7a11316c0e 100644 --- a/src/gpu/GrAAConvexPathRenderer.cpp +++ b/src/gpu/GrAAConvexPathRenderer.cpp @@ -465,7 +465,10 @@ bool GrAAConvexPathRenderer::onDrawPath(const SkPath& origPath, int vCount; int iCount; - SegmentArray segments; + enum { + kPreallocSegmentCnt = 512 / sizeof(Segment), + }; + SkSTArray<kPreallocSegmentCnt, Segment, true> segments; SkPoint fanPt; if (!get_segments(path, &segments, &fanPt, &vCount, &iCount)) { return false; |