Index: src/core/SkTileGrid.cpp |
diff --git a/src/core/SkTileGrid.cpp b/src/core/SkTileGrid.cpp |
index e285cccd0bff506a67614b4a3305a4fe1ffb1170..e023e3539b04d2b0fa72468cabcf44fd494af529 100644 |
--- a/src/core/SkTileGrid.cpp |
+++ b/src/core/SkTileGrid.cpp |
@@ -175,3 +175,12 @@ void SkTileGrid::search(const SkRect& originalQuery, SkTDArray<unsigned>* result |
} |
} |
+size_t SkTileGrid::bytesUsed() const { |
+ size_t byteCount = sizeof(SkTileGrid); |
+ |
+ for (int i = 0; i < fXTiles * fYTiles; i++) { |
+ byteCount = fTiles[i].reserved() * sizeof(unsigned); |
+ } |
+ |
+ return byteCount; |
+} |