Index: src/core/SkTileGrid.cpp |
diff --git a/src/core/SkTileGrid.cpp b/src/core/SkTileGrid.cpp |
index 84dc949b36727fe4ac0b9fb74c56dbf2115f0c4a..17102f50e2f75929f9e63cc71f8c55e33a5c0de1 100644 |
--- a/src/core/SkTileGrid.cpp |
+++ b/src/core/SkTileGrid.cpp |
@@ -23,15 +23,13 @@ |
SkDELETE_ARRAY(fTiles); |
} |
-void SkTileGrid::insert(void* data, const SkRect& fbounds, bool) { |
- SkASSERT(!fbounds.isEmpty()); |
- SkIRect dilatedBounds; |
- if (fbounds.isLargest()) { |
- // Dilating the largest SkIRect will overflow. Other nearly-largest rects may overflow too, |
- // but we don't make active use of them like we do the largest. |
- dilatedBounds.setLargest(); |
- } else { |
- fbounds.roundOut(&dilatedBounds); |
+void SkTileGrid::insert(void* data, const SkIRect& bounds, bool) { |
+ SkASSERT(!bounds.isEmpty()); |
+ SkIRect dilatedBounds = bounds; |
+ |
+ // Dilating the largest SkIRect will overflow. Other nearly-largest rects may overflow too, |
+ // but we don't make active use of them like we do the largest. |
+ if (!bounds.isLargest()) { |
dilatedBounds.outset(fInfo.fMargin.width(), fInfo.fMargin.height()); |
dilatedBounds.offset(fInfo.fOffset); |
} |
@@ -69,9 +67,8 @@ |
// require 512 tiles of size 256 x 256 pixels. |
static const int kStackAllocationTileCount = 1024; |
-void SkTileGrid::search(const SkRect& query, SkTDArray<void*>* results) const { |
- SkIRect adjusted; |
- query.roundOut(&adjusted); |
+void SkTileGrid::search(const SkIRect& query, SkTDArray<void*>* results) const { |
+ SkIRect adjusted = query; |
// The inset is to counteract the outset that was applied in 'insert' |
// The outset/inset is to optimize for lookups of size |