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

Unified Diff: src/core/SkTileGrid.h

Issue 617393004: BBHs: void* data -> unsigned data (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: The rest Created 6 years, 2 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
« no previous file with comments | « src/core/SkRecordDraw.cpp ('k') | src/core/SkTileGrid.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
};
« no previous file with comments | « src/core/SkRecordDraw.cpp ('k') | src/core/SkTileGrid.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698