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

Unified Diff: src/core/SkTileGrid.h

Issue 845623002: Remove SkTileGrid (except for TileGridInfo). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: kill gridSupported Created 5 years, 11 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/SkBBHFactory.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
deleted file mode 100644
index 7e12a9d93e32f5a5835dc293044a362adc2e1266..0000000000000000000000000000000000000000
--- a/src/core/SkTileGrid.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2012 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef SkTileGrid_DEFINED
-#define SkTileGrid_DEFINED
-
-#include "SkBBHFactory.h"
-#include "SkBBoxHierarchy.h"
-
-/**
- * Subclass of SkBBoxHierarchy that stores elements in buckets that correspond
- * to tile regions, disposed in a regular grid. This is useful when the tile
- * structure that will be use in search() calls is known prior to insertion.
- */
-class SkTileGrid : public SkBBoxHierarchy {
-public:
- SkTileGrid(int xTiles, int yTiles, const SkTileGridFactory::TileGridInfo& info);
- virtual ~SkTileGrid();
-
- virtual void insert(SkAutoTMalloc<SkRect>* boundsArray, int N) SK_OVERRIDE;
- virtual 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 size_t bytesUsed() const SK_OVERRIDE;
-
-private:
- void reserve(int);
- void shrinkToFit();
-
- void commonAdjust(SkRect*) const;
- void userToGrid(const SkRect&, SkIRect* grid) const;
-
- const int fXTiles, fYTiles;
- const SkScalar fInvWidth, fInvHeight;
- const SkScalar fMarginWidth, fMarginHeight;
- const SkPoint fOffset;
- const SkRect fGridBounds;
-
- // (fXTiles * fYTiles) SkTDArrays, each listing ops overlapping that tile in order.
- SkTDArray<unsigned>* fTiles;
-
- typedef SkBBoxHierarchy INHERITED;
-};
-
-#endif
« no previous file with comments | « src/core/SkBBHFactory.cpp ('k') | src/core/SkTileGrid.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698