OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #include "SkClipStack.h" | 8 #include "SkClipStack.h" |
9 #include "SkPath.h" | 9 #include "SkPath.h" |
10 #include "SkThread.h" | 10 #include "SkThread.h" |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 for (const Element* element = (const Element*)recIter.next(); | 399 for (const Element* element = (const Element*)recIter.next(); |
400 element != NULL; | 400 element != NULL; |
401 element = (const Element*)recIter.next()) { | 401 element = (const Element*)recIter.next()) { |
402 new (fDeque.push_back()) Element(*element); | 402 new (fDeque.push_back()) Element(*element); |
403 } | 403 } |
404 | 404 |
405 return *this; | 405 return *this; |
406 } | 406 } |
407 | 407 |
408 bool SkClipStack::operator==(const SkClipStack& b) const { | 408 bool SkClipStack::operator==(const SkClipStack& b) const { |
| 409 if (this->getTopmostGenID() == b.getTopmostGenID()) { |
| 410 return true; |
| 411 } |
409 if (fSaveCount != b.fSaveCount || | 412 if (fSaveCount != b.fSaveCount || |
410 fDeque.count() != b.fDeque.count()) { | 413 fDeque.count() != b.fDeque.count()) { |
411 return false; | 414 return false; |
412 } | 415 } |
413 SkDeque::F2BIter myIter(fDeque); | 416 SkDeque::F2BIter myIter(fDeque); |
414 SkDeque::F2BIter bIter(b.fDeque); | 417 SkDeque::F2BIter bIter(b.fDeque); |
415 const Element* myElement = (const Element*)myIter.next(); | 418 const Element* myElement = (const Element*)myIter.next(); |
416 const Element* bElement = (const Element*)bIter.next(); | 419 const Element* bElement = (const Element*)bIter.next(); |
417 | 420 |
418 while (myElement != NULL && bElement != NULL) { | 421 while (myElement != NULL && bElement != NULL) { |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 return kWideOpenGenID; | 730 return kWideOpenGenID; |
728 } | 731 } |
729 | 732 |
730 const Element* back = static_cast<const Element*>(fDeque.back()); | 733 const Element* back = static_cast<const Element*>(fDeque.back()); |
731 if (kInsideOut_BoundsType == back->fFiniteBoundType && back->fFiniteBound.is
Empty()) { | 734 if (kInsideOut_BoundsType == back->fFiniteBoundType && back->fFiniteBound.is
Empty()) { |
732 return kWideOpenGenID; | 735 return kWideOpenGenID; |
733 } | 736 } |
734 | 737 |
735 return back->getGenID(); | 738 return back->getGenID(); |
736 } | 739 } |
OLD | NEW |