| 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 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 852 } | 852 } |
| 853 | 853 |
| 854 const Element* back = static_cast<const Element*>(fDeque.back()); | 854 const Element* back = static_cast<const Element*>(fDeque.back()); |
| 855 if (kInsideOut_BoundsType == back->fFiniteBoundType && back->fFiniteBound.is
Empty()) { | 855 if (kInsideOut_BoundsType == back->fFiniteBoundType && back->fFiniteBound.is
Empty()) { |
| 856 return kWideOpenGenID; | 856 return kWideOpenGenID; |
| 857 } | 857 } |
| 858 | 858 |
| 859 return back->getGenID(); | 859 return back->getGenID(); |
| 860 } | 860 } |
| 861 | 861 |
| 862 #ifdef SK_DEVELOPER | 862 #ifdef SK_DEBUG |
| 863 void SkClipStack::Element::dump() const { | 863 void SkClipStack::Element::dump() const { |
| 864 static const char* kTypeStrings[] = { | 864 static const char* kTypeStrings[] = { |
| 865 "empty", | 865 "empty", |
| 866 "rect", | 866 "rect", |
| 867 "rrect", | 867 "rrect", |
| 868 "path" | 868 "path" |
| 869 }; | 869 }; |
| 870 static_assert(0 == kEmpty_Type, "type_str"); | 870 static_assert(0 == kEmpty_Type, "type_str"); |
| 871 static_assert(1 == kRect_Type, "type_str"); | 871 static_assert(1 == kRect_Type, "type_str"); |
| 872 static_assert(2 == kRRect_Type, "type_str"); | 872 static_assert(2 == kRRect_Type, "type_str"); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 911 | 911 |
| 912 void SkClipStack::dump() const { | 912 void SkClipStack::dump() const { |
| 913 B2TIter iter(*this); | 913 B2TIter iter(*this); |
| 914 const Element* e; | 914 const Element* e; |
| 915 while ((e = iter.next())) { | 915 while ((e = iter.next())) { |
| 916 e->dump(); | 916 e->dump(); |
| 917 SkDebugf("\n"); | 917 SkDebugf("\n"); |
| 918 } | 918 } |
| 919 } | 919 } |
| 920 #endif | 920 #endif |
| OLD | NEW |