aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-04-24 15:39:11 +0000
committerGravatar junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-04-24 15:39:11 +0000
commitd5cfdfffc8c63c6f1cceb46a9bcd5c555a7baa28 (patch)
tree7fa3a340c74657fd51c092c3b1853b2b25a5fded /src
parent48821fc31c3987a68268139850ebc1b8d326ade5 (diff)
Fixing numerical rounding edge case in SkTileGrid
BUG=https://code.google.com/p/chromium/issues/detail?id=234688 TEST=TileGrid skia unit test Review URL: https://codereview.chromium.org/13860011 git-svn-id: http://skia.googlecode.com/svn/trunk@8839 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r--src/core/SkTileGrid.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/SkTileGrid.cpp b/src/core/SkTileGrid.cpp
index 7a9c8eec6b..c39e21b356 100644
--- a/src/core/SkTileGrid.cpp
+++ b/src/core/SkTileGrid.cpp
@@ -81,9 +81,9 @@ void SkTileGrid::search(const SkIRect& query, SkTDArray<void*>* results) {
fInfo.fTileInterval.height();
tileStartX = SkPin32(tileStartX, 0, fXTileCount - 1);
- tileEndX = SkPin32(tileEndX, 1, fXTileCount);
+ tileEndX = SkPin32(tileEndX, tileStartX+1, fXTileCount);
tileStartY = SkPin32(tileStartY, 0, fYTileCount - 1);
- tileEndY = SkPin32(tileEndY, 1, fYTileCount);
+ tileEndY = SkPin32(tileEndY, tileStartY+1, fYTileCount);
int queryTileCount = (tileEndX - tileStartX) * (tileEndY - tileStartY);
SkASSERT(queryTileCount);