Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Unified Diff: src/gpu/GrReducedClip.cpp

Issue 1459663002: simplify insertion methods for SkTLList (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix gcc? Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkTLList.h ('k') | src/gpu/GrStencilAndCoverTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrReducedClip.cpp
diff --git a/src/gpu/GrReducedClip.cpp b/src/gpu/GrReducedClip.cpp
index 137c83e411ec1af46779587099b9a5f6d4ecf820..9a6a6149add026cde688033908dfba96af5fc200 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;
}
« no previous file with comments | « src/core/SkTLList.h ('k') | src/gpu/GrStencilAndCoverTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698