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

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: 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/SkTileGrid.h
diff --git a/src/core/SkTileGrid.h b/src/core/SkTileGrid.h
index 1e34a61d522b1459988b86c3915ec5a17052f15e..ae20c29edb14739c926921323ad4b2deb57cf81a 100644
--- a/src/core/SkTileGrid.h
+++ b/src/core/SkTileGrid.h
@@ -28,7 +28,7 @@ public:
* @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 data, const SkRect& bounds, bool) SK_OVERRIDE;
virtual void flushDeferredInserts() SK_OVERRIDE {};
@@ -36,7 +36,7 @@ public:
* Populate 'results' with data pointers 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;
+ SkTDArray<unsigned>* fTiles;
typedef SkBBoxHierarchy INHERITED;
};
« no previous file with comments | « src/core/SkRecordDraw.cpp ('k') | src/core/SkTileGrid.cpp » ('j') | src/core/SkTileGrid.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698