Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Unified Diff: cc/resources/picture_pile.cc

Issue 196023015: Revert of cc: Replace recorded region with direct map lookup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/picture_layer_unittest.cc ('k') | cc/resources/picture_pile_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « cc/layers/picture_layer_unittest.cc ('k') | cc/resources/picture_pile_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698