diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-15 15:06:03 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-15 15:06:03 +0000 |
commit | 4b32bd53c63b245707822ae83e3215863303bf43 (patch) | |
tree | 65b7a903a262019d5f0c4d7d42a2eeffbf253d0f /src/core/SkTileGrid.cpp | |
parent | 8b5144f366db1dd88ac420b38b6871aea0ae8ca4 (diff) |
Fixing SkPicture command pattern optimizations to make them work correctly with bounding box hierarchies
BUG=https://code.google.com/p/chromium/issues/detail?id=180645
TEST=render_pictures -r <skp_dir> --validate --bbh <grid|rtree> --mode tile 256 256
Author: junov@chromium.org
Reviewed By: robertphillips@google.com
Review URL: https://chromiumcodereview.appspot.com/12817011
git-svn-id: http://skia.googlecode.com/svn/trunk@8171 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkTileGrid.cpp')
-rw-r--r-- | src/core/SkTileGrid.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/SkTileGrid.cpp b/src/core/SkTileGrid.cpp index 7b901e9b3b..641a03179c 100644 --- a/src/core/SkTileGrid.cpp +++ b/src/core/SkTileGrid.cpp @@ -121,3 +121,12 @@ void SkTileGrid::clear() { int SkTileGrid::getCount() const { return fInsertionCount; } + +void SkTileGrid::rewindInserts() { + SkASSERT(fClient); + for (int i = 0; i < fTileCount; ++i) { + while (!fTileData[i].isEmpty() && fClient->shouldRewind(fTileData[i].top())) { + fTileData[i].pop(); + } + } +} |