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

Unified Diff: cc/resources/picture_pile_base.cc

Issue 78883002: Cluster invalidation rectangles into coherent regions to lessen SkPicture re-recording (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Final round of nits Created 7 years, 1 month 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.h ('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_base.cc
diff --git a/cc/resources/picture_pile_base.cc b/cc/resources/picture_pile_base.cc
index b6e1aa590533f39d6f8940db0ec890484f1f564b..5e38c045501ead78b9ad59d09c4cb6bd0fc89044 100644
--- a/cc/resources/picture_pile_base.cc
+++ b/cc/resources/picture_pile_base.cc
@@ -190,9 +190,14 @@ bool PicturePileBase::CanRaster(float contents_scale, gfx::Rect content_rect) {
gfx::Rect PicturePileBase::PaddedRect(const PictureMapKey& key) {
gfx::Rect tile = tiling_.TileBounds(key.first, key.second);
- tile.Inset(
+ return PadRect(tile);
+}
+
+gfx::Rect PicturePileBase::PadRect(gfx::Rect rect) {
+ gfx::Rect padded_rect = rect;
+ padded_rect.Inset(
-buffer_pixels(), -buffer_pixels(), -buffer_pixels(), -buffer_pixels());
- return tile;
+ return padded_rect;
}
scoped_ptr<base::Value> PicturePileBase::AsValue() const {
« no previous file with comments | « cc/resources/picture_pile_base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698