Chromium Code Reviews| Index: src/core/SkQuadTree.cpp |
| diff --git a/src/core/SkQuadTree.cpp b/src/core/SkQuadTree.cpp |
| index fb02e68c5f265f9f3d025e6b01b072934a7ad9d5..a11613d08b0260e1a65808f5a0373e6a41a59a00 100644 |
| --- a/src/core/SkQuadTree.cpp |
| +++ b/src/core/SkQuadTree.cpp |
| @@ -46,8 +46,7 @@ static U8CPU child_intersect(const SkIRect& query, const SkIPoint& split) { |
| return intersect; |
| } |
| -SkQuadTree::SkQuadTree(const SkIRect& bounds) |
| - : fRoot(NULL) { |
| +SkQuadTree::SkQuadTree(const SkIRect& bounds) : fRoot(NULL) { |
| SkASSERT((bounds.width() * bounds.height()) > 0); |
| fRootBounds = bounds; |
| } |
| @@ -178,11 +177,14 @@ void SkQuadTree::search(const SkIRect& query, SkTDArray<void*>* results) { |
| } |
| void SkQuadTree::clear() { |
| + this->flushDeferredInserts(); |
| if (NULL != fRoot) { |
| this->clear(fRoot); |
| fNodePool.release(fRoot); |
| fRoot = NULL; |
| } |
| + SkASSERT(fEntryPool.allocated() == fEntryPool.available()); |
|
djsollen
2014/05/09 14:23:08
should we add this here as well.
SkASSERT(0 == fD
|
| + SkASSERT(fNodePool.allocated() == fNodePool.available()); |
| } |
| int SkQuadTree::getDepth() const { |