| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkAtomics.h" | 8 #include "SkAtomics.h" |
| 9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
| 10 #include "SkClipStack.h" | 10 #include "SkClipStack.h" |
| (...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 704 prior->setEmpty(); | 704 prior->setEmpty(); |
| 705 return; | 705 return; |
| 706 } | 706 } |
| 707 break; | 707 break; |
| 708 } | 708 } |
| 709 } else if (SkRegion::kReplace_Op == element.getOp()) { | 709 } else if (SkRegion::kReplace_Op == element.getOp()) { |
| 710 this->restoreTo(fSaveCount - 1); | 710 this->restoreTo(fSaveCount - 1); |
| 711 prior = (Element*) fDeque.back(); | 711 prior = (Element*) fDeque.back(); |
| 712 } | 712 } |
| 713 } | 713 } |
| 714 Element* newElement = SkNEW_PLACEMENT_ARGS(fDeque.push_back(), Element, (ele
ment)); | 714 Element* newElement = new (fDeque.push_back()) Element(element); |
| 715 newElement->updateBoundAndGenID(prior); | 715 newElement->updateBoundAndGenID(prior); |
| 716 } | 716 } |
| 717 | 717 |
| 718 void SkClipStack::clipDevRRect(const SkRRect& rrect, SkRegion::Op op, bool doAA)
{ | 718 void SkClipStack::clipDevRRect(const SkRRect& rrect, SkRegion::Op op, bool doAA)
{ |
| 719 Element element(fSaveCount, rrect, op, doAA); | 719 Element element(fSaveCount, rrect, op, doAA); |
| 720 this->pushElement(element); | 720 this->pushElement(element); |
| 721 } | 721 } |
| 722 | 722 |
| 723 void SkClipStack::clipDevRect(const SkRect& rect, SkRegion::Op op, bool doAA) { | 723 void SkClipStack::clipDevRect(const SkRect& rect, SkRegion::Op op, bool doAA) { |
| 724 Element element(fSaveCount, rect, op, doAA); | 724 Element element(fSaveCount, rect, op, doAA); |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 906 | 906 |
| 907 void SkClipStack::dump() const { | 907 void SkClipStack::dump() const { |
| 908 B2TIter iter(*this); | 908 B2TIter iter(*this); |
| 909 const Element* e; | 909 const Element* e; |
| 910 while ((e = iter.next())) { | 910 while ((e = iter.next())) { |
| 911 e->dump(); | 911 e->dump(); |
| 912 SkDebugf("\n"); | 912 SkDebugf("\n"); |
| 913 } | 913 } |
| 914 } | 914 } |
| 915 #endif | 915 #endif |
| OLD | NEW |