diff options
author | junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-04-24 15:39:11 +0000 |
---|---|---|
committer | junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-04-24 15:39:11 +0000 |
commit | d5cfdfffc8c63c6f1cceb46a9bcd5c555a7baa28 (patch) | |
tree | 7fa3a340c74657fd51c092c3b1853b2b25a5fded /src | |
parent | 48821fc31c3987a68268139850ebc1b8d326ade5 (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.cpp | 4 |
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); |