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
diff --git a/src/core/SkTileGrid.cpp b/src/core/SkTileGrid.cpp
index 84dc949..2eea6db 100644
--- a/src/core/SkTileGrid.cpp
+++ b/src/core/SkTileGrid.cpp
@@ -52,8 +52,8 @@
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);
}
}