diff options
author | junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-02-08 21:56:16 +0000 |
---|---|---|
committer | junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-02-08 21:56:16 +0000 |
commit | 8d84b8f4207b72d0e54af039fcce1a633f0a7c9a (patch) | |
tree | d78e36f44873690664a504452428b4dce90ddb28 /src | |
parent | 994b52ea55e4c061c971f1f897155bb6b6cec943 (diff) |
Adding comments based on review https://codereview.appspot.com/7300072/
git-svn-id: http://skia.googlecode.com/svn/trunk@7686 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkTileGrid.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/SkTileGrid.cpp b/src/core/SkTileGrid.cpp index 51c40cc0af..25a1fa8873 100644 --- a/src/core/SkTileGrid.cpp +++ b/src/core/SkTileGrid.cpp @@ -56,6 +56,9 @@ void SkTileGrid::insert(void* data, const SkIRect& bounds, bool) { } void SkTileGrid::search(const SkIRect& query, SkTDArray<void*>* results) { + // Convert the query rectangle from device coordinates to tile coordinates + // by rounding outwards to the nearest tile boundary so that the resulting tile + // region includes the query rectangle. (using truncating division to "floor") int tileStartX = (query.left() + fBorderPixels) / fTileWidth; int tileEndX = (query.right() + fTileWidth - fBorderPixels) / fTileWidth; int tileStartY = (query.top() + fBorderPixels) / fTileHeight; |