Swap iteration order in TileGrid::insert().

Was looking at performance here (it's the record hotspot) and noticed we
iterate through the grid out of order.  This is a tiny little thing, but it's
probably orthogonal to any other performance improvements we'll make in here.

BUG=skia:
R=robertphillips@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/598933004
This commit is contained in:
mtklein 2014-09-24 08:59:37 -07:00 committed by Commit bot
parent 30d2cc6ff4
commit eee606c7bf

View File

@ -52,8 +52,8 @@ void SkTileGrid::insert(void* data, const SkRect& fbounds, bool) {
fYTiles - 1));
Entry entry = { fCount++, data };
for (int x = minX; x <= maxX; x++) {
for (int y = minY; y <= maxY; y++) {
for (int y = minY; y <= maxY; y++) {
for (int x = minX; x <= maxX; x++) {
fTiles[y * fXTiles + x].push(entry);
}
}