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

Unified Diff: cc/resources/picture_pile.cc

Issue 202753002: cc: Add a tiling iterator that doesn't include borders (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: danakj review 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/resources/picture_layer_tiling.cc ('k') | cc/resources/picture_pile_base.cc » ('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 43b13c577941531cebac25736e7ba2003c5b1e93..35d026f225ddb6a3a245048da2ee9657bc504092 100644
--- a/cc/resources/picture_pile.cc
+++ b/cc/resources/picture_pile.cc
@@ -170,8 +170,10 @@ bool PicturePile::Update(
gfx::Rect invalidation = i.rect();
// Split this inflated invalidation across tile boundaries and apply it
// to all tiles that it touches.
- for (TilingData::Iterator iter(&tiling_, invalidation);
- iter; ++iter) {
+ bool include_borders = true;
+ for (TilingData::Iterator iter(&tiling_, invalidation, include_borders);
+ iter;
+ ++iter) {
const PictureMapKey& key = iter.index();
PictureMap::iterator picture_it = picture_map_.find(key);
@@ -186,9 +188,9 @@ bool PicturePile::Update(
// Make a list of all invalid tiles; we will attempt to
// cluster these into multiple invalidation regions.
std::vector<gfx::Rect> invalid_tiles;
-
- for (TilingData::Iterator it(&tiling_, interest_rect);
- it; ++it) {
+ bool include_borders = true;
+ for (TilingData::Iterator it(&tiling_, interest_rect, include_borders); it;
+ ++it) {
const PictureMapKey& key = it.index();
PictureInfo& info = picture_map_[key];
@@ -245,8 +247,9 @@ bool PicturePile::Update(
stats_instrumentation->AddRecord(best_duration, recorded_pixel_count);
}
- for (TilingData::Iterator it(&tiling_, record_rect);
- it; ++it) {
+ bool include_borders = true;
+ for (TilingData::Iterator it(&tiling_, record_rect, include_borders); it;
+ ++it) {
const PictureMapKey& key = it.index();
gfx::Rect tile = PaddedRect(key);
if (record_rect.Contains(tile)) {
« no previous file with comments | « cc/resources/picture_layer_tiling.cc ('k') | cc/resources/picture_pile_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698