From 4b32bd53c63b245707822ae83e3215863303bf43 Mon Sep 17 00:00:00 2001 From: "commit-bot@chromium.org" Date: Fri, 15 Mar 2013 15:06:03 +0000 Subject: 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 --validate --bbh --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 --- src/core/SkTileGrid.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/core/SkTileGrid.cpp') 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(); + } + } +} -- cgit v1.2.3