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

Unified Diff: src/core/SkRTree.h

Issue 23480002: R-Tree -- Don't sort draw commands unless specified. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: s/order/sort. Changed default rtree to sorted and specified unsorted in factory functions Created 7 years, 4 months 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
Index: src/core/SkRTree.h
diff --git a/src/core/SkRTree.h b/src/core/SkRTree.h
index 2d11f28a5739a21c69da94c999db80562196ced9..54421de14c4c50bb6542c37566c66c73fee6c7c4 100644
--- a/src/core/SkRTree.h
+++ b/src/core/SkRTree.h
@@ -55,7 +55,8 @@ public:
* can provide an optional aspect ratio parameter. This allows the bulk-load algorithm to create
* better proportioned tiles of rectangles.
*/
- static SkRTree* Create(int minChildren, int maxChildren, SkScalar aspectRatio = 1);
+ static SkRTree* Create(int minChildren, int maxChildren, SkScalar aspectRatio = 1,
+ bool orderWhenBulkLoading = true);
reed1 2013/08/29 19:17:35 add a comment above for this new param?
virtual ~SkRTree();
/**
@@ -144,7 +145,7 @@ private:
}
};
- SkRTree(int minChildren, int maxChildren, SkScalar aspectRatio);
+ SkRTree(int minChildren, int maxChildren, SkScalar aspectRatio, bool orderWhenBulkLoading);
/**
* Recursively descend the tree to find an insertion position for 'branch', updates
@@ -184,6 +185,7 @@ private:
SkChunkAlloc fNodes;
SkTDArray<Branch> fDeferredInserts;
SkScalar fAspectRatio;
+ bool fSortWhenBulkLoading;
Node* allocateNode(uint16_t level);
« bench/RTreeBench.cpp ('K') | « src/core/SkPicture.cpp ('k') | src/core/SkRTree.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698