aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Jim Van Verth <jvanverth@google.com>2018-07-17 14:13:47 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-07-17 18:47:11 +0000
commit8bb0db3d07450880d346d808018708416c928657 (patch)
tree7c529429ea3499a0ad02eb4010180729919d7426 /src/core
parent92eaa3cafd09aa4b93a23a601c40dc74cd94f0c7 (diff)
Add some optimizations to PolyUtils
* Switch inset/offset code to use a linked list rather than an array * Use std::set to store active edge list for IsSimplePolygon rather than array * Pre-alloc the priority queue for IsSimplePolygon * When adding radial curves, expand the array all at once rather than pushing one at a time. Bug: skia: Change-Id: I692f8c29c500c41ec1d1be39d924d8a752676bf4 Reviewed-on: https://skia-review.googlesource.com/140787 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/SkTDPQueue.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/SkTDPQueue.h b/src/core/SkTDPQueue.h
index 5dca4910ed..6e2a09ca8a 100644
--- a/src/core/SkTDPQueue.h
+++ b/src/core/SkTDPQueue.h
@@ -30,6 +30,7 @@ template <typename T,
class SkTDPQueue {
public:
SkTDPQueue() {}
+ SkTDPQueue(int reserve) { fArray.setReserve(reserve); }
SkTDPQueue(SkTDPQueue&&) = default;
SkTDPQueue& operator =(SkTDPQueue&&) = default;