Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include "SkTileGrid.h" | 9 #include "SkTileGrid.h" |
| 10 | 10 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 114 | 114 |
| 115 void SkTileGrid::clear() { | 115 void SkTileGrid::clear() { |
| 116 for (int i = 0; i < fTileCount; i++) { | 116 for (int i = 0; i < fTileCount; i++) { |
| 117 fTileData[i].reset(); | 117 fTileData[i].reset(); |
| 118 } | 118 } |
| 119 } | 119 } |
| 120 | 120 |
| 121 int SkTileGrid::getCount() const { | 121 int SkTileGrid::getCount() const { |
| 122 return fInsertionCount; | 122 return fInsertionCount; |
| 123 } | 123 } |
| 124 | |
| 125 void SkTileGrid::rewindInserts() { | |
| 126 SkASSERT(fClient); | |
|
robertphillips
2013/03/14 18:55:44
ouch - every tile.
Justin Novosad
2013/03/14 20:04:14
You just gave me a good idea for a follow-up patch
| |
| 127 for (int i = 0; i < fTileCount; ++i) { | |
| 128 while (!fTileData[i].isEmpty() && fClient->shouldRewind(fTileData[i].top ())) { | |
| 129 fTileData[i].pop(); | |
| 130 } | |
| 131 } | |
| 132 } | |
| OLD | NEW |