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

Unified Diff: src/core/SkRTree.h

Issue 617393004: BBHs: void* data -> unsigned data (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: bench Created 6 years, 3 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 8e980246aca2fe2fb1bbbc679825b2e3ec7e5185..0285d44e5a62ed5d007710afce7f12d3c2d487ac 100644
--- a/src/core/SkRTree.h
+++ b/src/core/SkRTree.h
@@ -67,7 +67,7 @@ public:
* @param bounds The corresponding bounding box
* @param defer Can this insert be deferred? (this may be ignored)
*/
- virtual void insert(void* data, const SkRect& bounds, bool defer = false) SK_OVERRIDE;
+ virtual void insert(unsigned data, const SkRect& bounds, bool defer = false) SK_OVERRIDE;
/**
* If any inserts have been deferred, this will add them into the tree
@@ -77,7 +77,7 @@ public:
/**
* Given a query rectangle, populates the passed-in array with the elements it intersects
*/
- virtual void search(const SkRect& query, SkTDArray<void*>* results) const SK_OVERRIDE;
+ virtual void search(const SkRect& query, SkTDArray<unsigned>* results) const SK_OVERRIDE;
virtual void clear() SK_OVERRIDE;
bool isEmpty() const { return 0 == fCount; }
@@ -94,8 +94,6 @@ public:
*/
virtual int getCount() const SK_OVERRIDE { return fCount; }
- virtual void rewindInserts() SK_OVERRIDE;
-
private:
struct Node;
@@ -106,7 +104,7 @@ private:
struct Branch {
union {
Node* subtree;
- void* data;
+ unsigned data;
} fChild;
SkIRect fBounds;
};
@@ -162,7 +160,7 @@ private:
int chooseSubtree(Node* root, Branch* branch);
SkIRect computeBounds(Node* n);
int distributeChildren(Branch* children);
- void search(Node* root, const SkIRect query, SkTDArray<void*>* results) const;
+ void search(Node* root, const SkIRect query, SkTDArray<unsigned>* results) const;
/**
* This performs a bottom-up bulk load using the STR (sort-tile-recursive) algorithm, this
« no previous file with comments | « src/core/SkBBoxHierarchy.h ('k') | src/core/SkRTree.cpp » ('j') | src/core/SkTileGrid.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698