Index: cc/resources/picture_pile.cc |
diff --git a/cc/resources/picture_pile.cc b/cc/resources/picture_pile.cc |
index abd18f69bc312c8530decfcef737c1624132314c..43b13c577941531cebac25736e7ba2003c5b1e93 100644 |
--- a/cc/resources/picture_pile.cc |
+++ b/cc/resources/picture_pile.cc |
@@ -164,8 +164,6 @@ |
-kPixelDistanceToRecord, |
-kPixelDistanceToRecord, |
-kPixelDistanceToRecord); |
- recorded_viewport_ = interest_rect; |
- recorded_viewport_.Intersect(gfx::Rect(size())); |
bool invalidated = false; |
for (Region::Iterator i(invalidation); i.has_rect(); i.next()) { |
@@ -207,8 +205,11 @@ |
std::vector<gfx::Rect> record_rects; |
ClusterTiles(invalid_tiles, &record_rects); |
- if (record_rects.empty()) |
+ if (record_rects.empty()) { |
+ if (invalidated) |
+ UpdateRecordedRegion(); |
return invalidated; |
+ } |
for (std::vector<gfx::Rect>::iterator it = record_rects.begin(); |
it != record_rects.end(); |
@@ -244,7 +245,6 @@ |
stats_instrumentation->AddRecord(best_duration, recorded_pixel_count); |
} |
- bool found_tile_for_recorded_picture = false; |
for (TilingData::Iterator it(&tiling_, record_rect); |
it; ++it) { |
const PictureMapKey& key = it.index(); |
@@ -252,13 +252,11 @@ |
if (record_rect.Contains(tile)) { |
PictureInfo& info = picture_map_[key]; |
info.SetPicture(picture); |
- found_tile_for_recorded_picture = true; |
} |
} |
- DCHECK(found_tile_for_recorded_picture); |
- } |
- |
- has_any_recordings_ = true; |
+ } |
+ |
+ UpdateRecordedRegion(); |
return true; |
} |