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

Unified Diff: cc/resources/picture_pile_impl.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_pile_base.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture_pile_impl.cc
diff --git a/cc/resources/picture_pile_impl.cc b/cc/resources/picture_pile_impl.cc
index 2ee6517c20632023d4482069d953a93a7a3baae6..55a394f17c9bd7cfb4ca7c65bbd18ff765ef73de 100644
--- a/cc/resources/picture_pile_impl.cc
+++ b/cc/resources/picture_pile_impl.cc
@@ -170,8 +170,10 @@ void PicturePileImpl::CoalesceRasters(const gfx::Rect& canvas_rect,
// that and subtract chunk rects to get the region that we need to subtract
// from the canvas. Then, we can use clipRect with difference op to subtract
// each rect in the region.
- for (TilingData::Iterator tile_iter(&tiling_, layer_rect);
- tile_iter; ++tile_iter) {
+ bool include_borders = true;
+ for (TilingData::Iterator tile_iter(&tiling_, layer_rect, include_borders);
+ tile_iter;
+ ++tile_iter) {
PictureMap::iterator map_iter = picture_map_.find(tile_iter.index());
if (map_iter == picture_map_.end())
continue;
@@ -350,9 +352,11 @@ PicturePileImpl::PixelRefIterator::PixelRefIterator(
float contents_scale,
const PicturePileImpl* picture_pile)
: picture_pile_(picture_pile),
- layer_rect_(gfx::ScaleToEnclosingRect(
- content_rect, 1.f / contents_scale)),
- tile_iterator_(&picture_pile_->tiling_, layer_rect_) {
+ layer_rect_(
+ gfx::ScaleToEnclosingRect(content_rect, 1.f / contents_scale)),
+ tile_iterator_(&picture_pile_->tiling_, layer_rect_, true) {
+ // TODO(enne): tile iterator should not include borders
+
// Early out if there isn't a single tile.
if (!tile_iterator_)
return;
« no previous file with comments | « cc/resources/picture_pile_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698