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

Unified Diff: cc/picture_pile.cc

Issue 12383060: cc: Remove texture scaling and clear edge texels of a layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and expand base picture Created 7 years, 10 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/picture_pile.h ('k') | cc/picture_pile_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/picture_pile.cc
diff --git a/cc/picture_pile.cc b/cc/picture_pile.cc
index d94835a74ec5aa963045fff9cb6362368cc9dc17..b30d8c70a061da76f4432fbb5105ed9f32c01f2f 100644
--- a/cc/picture_pile.cc
+++ b/cc/picture_pile.cc
@@ -31,9 +31,12 @@ PicturePile::~PicturePile() {
void PicturePile::Update(
ContentLayerClient* painter,
+ SkColor background_color,
const Region& invalidation,
gfx::Rect visible_layer_rect,
RenderingStats* stats) {
+ background_color_ = background_color;
+
gfx::Rect interest_rect = visible_layer_rect;
interest_rect.Inset(
-kPixelDistanceToRecord,
@@ -82,8 +85,15 @@ void PicturePile::Update(
// Create a picture in this list if it doesn't exist.
PictureList& pic_list = picture_list_map_[iter.index()];
if (pic_list.empty()) {
- gfx::Rect tile =
- tiling_.TileBoundsWithBorder(iter.index_x(), iter.index_y());
+ // Inflate the base picture with a margin, similar to invalidations, so
+ // that when scaled down to at least min_contents_scale, the enclosed
+ // rect still includes content all the way to the edge of the layer.
+ gfx::Rect tile = tiling_.TileBounds(iter.index_x(), iter.index_y());
+ tile.Inset(
+ -buffer_pixels(),
+ -buffer_pixels(),
+ -buffer_pixels(),
+ -buffer_pixels());
scoped_refptr<Picture> base_picture = Picture::Create(tile);
pic_list.push_back(base_picture);
}
« no previous file with comments | « cc/picture_pile.h ('k') | cc/picture_pile_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698