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

Unified Diff: src/core/SkTileGrid.h

Issue 670213002: Cut down SkBBH API more. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update tilegrid test 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
Index: src/core/SkTileGrid.h
diff --git a/src/core/SkTileGrid.h b/src/core/SkTileGrid.h
index fd7584fd9c6052093243b8be212c3a9ea00822e2..9abe6c7beac816f122705b23bf7cf4b2c99b1367 100644
--- a/src/core/SkTileGrid.h
+++ b/src/core/SkTileGrid.h
@@ -19,30 +19,18 @@
class SkTileGrid : public SkBBoxHierarchy {
public:
SkTileGrid(int xTiles, int yTiles, const SkTileGridFactory::TileGridInfo& info);
-
virtual ~SkTileGrid();
- /**
- * 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(unsigned opIndex, const SkRect& bounds, bool) SK_OVERRIDE;
-
- /**
- * 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<unsigned>* results) const SK_OVERRIDE;
+ void insert(SkAutoTMalloc<SkRect>* boundsArray, int N) SK_OVERRIDE;
+ void search(const SkRect& query, SkTDArray<unsigned>* results) const SK_OVERRIDE;
// For testing.
int tileCount(int x, int y) { return fTiles[y * fXTiles + x].count(); }
- virtual void reserve(unsigned opCount) SK_OVERRIDE;
- virtual void flushDeferredInserts() SK_OVERRIDE;
-
private:
+ void reserve(int);
+ void shrinkToFit();
+
void commonAdjust(SkRect*) const;
void userToGrid(const SkRect&, SkIRect* grid) const;

Powered by Google App Engine
This is Rietveld 408576698