diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-02-04 15:09:16 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-02-04 15:09:16 +0000 |
commit | b511be5a9b6bf194062b79206ac1ec0204aed8ee (patch) | |
tree | 9df5745c07acc1177cf4584a3df0f84dae9585d7 /src/core/SkTLList.h | |
parent | 372b7a4f565354d2101092c6bac6f9550ad506fd (diff) |
Add rect clip to convex_poly_clip GM
BUG=skia:2051
R=robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/147793007
git-svn-id: http://skia.googlecode.com/svn/trunk@13300 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkTLList.h')
-rw-r--r-- | src/core/SkTLList.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/core/SkTLList.h b/src/core/SkTLList.h index 298ce516cc..99b5bc67d9 100644 --- a/src/core/SkTLList.h +++ b/src/core/SkTLList.h @@ -75,6 +75,15 @@ public: return reinterpret_cast<T*>(node->fObj); } + T* addToHead() { + this->validate(); + Node* node = this->createNode(); + fList.addToHead(node); + SkNEW_PLACEMENT(node->fObj, T); + this->validate(); + return reinterpret_cast<T*>(node->fObj); + } + T* addToTail(const T& t) { this->validate(); Node* node = this->createNode(); @@ -84,6 +93,15 @@ public: return reinterpret_cast<T*>(node->fObj); } + T* addToTail() { + this->validate(); + Node* node = this->createNode(); + fList.addToTail(node); + SkNEW_PLACEMENT(node->fObj, T); + this->validate(); + return reinterpret_cast<T*>(node->fObj); + } + /** Adds a new element to the list before the location indicated by the iterator. If the iterator refers to a NULL location then the new element is added at the tail */ T* addBefore(const T& t, const Iter& location) { |