aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-11-18 14:11:08 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-11-18 14:11:08 -0800
commit5aaef1ff1a18b420b3409ec31b44c2435a4ac988 (patch)
tree8ff9bcae8aff3b40e11b8081936d947ed26c727f /src/gpu
parentf9b1577d763988ebc043ddabf80674f71571ecff (diff)
simplify insertion methods for SkTLList
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/GrReducedClip.cpp6
-rw-r--r--src/gpu/GrStencilAndCoverTextContext.cpp2
2 files changed, 3 insertions, 5 deletions
diff --git a/src/gpu/GrReducedClip.cpp b/src/gpu/GrReducedClip.cpp
index 137c83e411..9a6a6149ad 100644
--- a/src/gpu/GrReducedClip.cpp
+++ b/src/gpu/GrReducedClip.cpp
@@ -206,9 +206,7 @@ static void reduced_stack_walker(const SkClipStack& stack,
if (isFlip) {
SkASSERT(SkRegion::kXOR_Op == element->getOp() ||
SkRegion::kReverseDifference_Op == element->getOp());
- SkNEW_INSERT_AT_LLIST_HEAD(result,
- Element,
- (queryBounds, SkRegion::kReverseDifference_Op, false));
+ result->addToHead(queryBounds, SkRegion::kReverseDifference_Op, false);
} else {
Element* newElement = result->addToHead(*element);
if (newElement->isAA()) {
@@ -386,7 +384,7 @@ void GrReducedClip::ReduceClipStack(const SkClipStack& stack,
// iior should only be true if aa/non-aa status matches among all elements.
SkClipStack::Iter iter(stack, SkClipStack::Iter::kTop_IterStart);
bool doAA = iter.prev()->isAA();
- SkNEW_INSERT_AT_LLIST_HEAD(result, Element, (isectRect, SkRegion::kReplace_Op, doAA));
+ result->addToHead(isectRect, SkRegion::kReplace_Op, doAA);
if (requiresAA) {
*requiresAA = doAA;
}
diff --git a/src/gpu/GrStencilAndCoverTextContext.cpp b/src/gpu/GrStencilAndCoverTextContext.cpp
index 5289d092c7..2c8773860e 100644
--- a/src/gpu/GrStencilAndCoverTextContext.cpp
+++ b/src/gpu/GrStencilAndCoverTextContext.cpp
@@ -207,7 +207,7 @@ void GrStencilAndCoverTextContext::TextBlob::init(const SkTextBlob* skBlob,
SkPaint runPaint(skPaint);
for (SkTextBlobRunIterator iter(skBlob); !iter.done(); iter.next()) {
iter.applyFontToPaint(&runPaint); // No need to re-seed the paint.
- TextRun* run = SkNEW_INSERT_AT_LLIST_TAIL(this, TextRun, (runPaint));
+ TextRun* run = this->addToTail(runPaint);
const char* text = reinterpret_cast<const char*>(iter.glyphs());
size_t byteLength = sizeof(uint16_t) * iter.glyphCount();