Index: src/core/SkTileGrid.h |
diff --git a/src/core/SkTileGrid.h b/src/core/SkTileGrid.h |
index 1e34a61d522b1459988b86c3915ec5a17052f15e..97564c64ad51c64c2372779b5d02e3f3c150a25e 100644 |
--- a/src/core/SkTileGrid.h |
+++ b/src/core/SkTileGrid.h |
@@ -23,20 +23,20 @@ public: |
virtual ~SkTileGrid(); |
/** |
- * Insert a data pointer and corresponding bounding box |
- * @param data An arbitrary data pointer, may be NULL. |
+ * Insert a opIndex value and corresponding bounding box |
+ * @param opIndex |
* @param bounds The bounding box, should not be empty. |
* @param defer Ignored; SkTileGrid does not defer insertions. |
*/ |
- virtual void insert(void* data, const SkRect& bounds, bool) SK_OVERRIDE; |
+ virtual void insert(unsigned opIndex, const SkRect& bounds, bool) SK_OVERRIDE; |
virtual void flushDeferredInserts() SK_OVERRIDE {}; |
/** |
- * Populate 'results' with data pointers corresponding to bounding boxes that intersect 'query'. |
+ * Populate 'results' with opIndexes corresponding to bounding boxes that intersect 'query'. |
* This will be fastest if the query is an exact match to a single grid tile. |
*/ |
- 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; |
@@ -44,23 +44,16 @@ public: |
virtual int getDepth() const SK_OVERRIDE { return -1; } |
- virtual void rewindInserts() SK_OVERRIDE; |
- |
// For testing. |
int tileCount(int x, int y) { return fTiles[y * fXTiles + x].count(); } |
private: |
- struct Entry { |
- size_t order; // Insertion order. Used to preserve order when merging multiple tiles. |
- void* data; |
- }; |
- |
const int fXTiles, fYTiles; |
SkTileGridFactory::TileGridInfo fInfo; |
size_t fCount; |
- // (fXTiles * fYTiles) SkTDArrays, each listing data overlapping that tile in insertion order. |
- SkTDArray<Entry>* fTiles; |
+ // (fXTiles * fYTiles) SkTDArrays, each listing ops overlapping that tile in order. |
+ SkTDArray<unsigned>* fTiles; |
typedef SkBBoxHierarchy INHERITED; |
}; |