0

cc: Fix invalidation problems in impl-side painting

The PictureLayerTiling iterator used to stop when it hit a null tile
rather than iterating through null tiles.  So, some invalidations were
ignored because the iterator would hit a null tile from a previous
invalidation rect on the same frame and abort.

This is fixed by making the PictureLayerTiling iterator walk over all i,
j pairs, regardless of whether there is a tile there or not.  The
PictureLayerTilingSet iteration is also made robust to this possibility.

R=nduca@chromium.org
BUG=165246, 165336


Review URL: https://chromiumcodereview.appspot.com/11555002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172519 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
enne@chromium.org
2012-12-12 04:06:10 +00:00
parent 678ff64f0d
commit 976389f542
2 changed files with 2 additions and 2 deletions

@ -63,7 +63,7 @@ class CC_EXPORT PictureLayerTiling {
Tile* operator*() const { return current_tile_; }
Iterator& operator++();
operator bool() const { return current_tile_; }
operator bool() const { return tile_j_ <= bottom_; }
private:
PictureLayerTiling* tiling_;

@ -112,7 +112,7 @@ PictureLayerTilingSet::Iterator& PictureLayerTilingSet::Iterator::operator++() {
// Loop until we find a valid place to stop.
while (true) {
while (tiling_iter_ && !tiling_iter_->GetResourceId()) {
while (tiling_iter_ && (!*tiling_iter_ || !tiling_iter_->GetResourceId())) {
missing_region_.Union(tiling_iter_.geometry_rect());
++tiling_iter_;
}