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:
parent
30d2cc6ff4
commit
eee606c7bf
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user