diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-14 03:07:28 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-14 03:07:28 +0000 |
commit | 60f06b1af0223cd7d8bafeb2dd9a54093992a39c (patch) | |
tree | 596ea0ece6b3589687309d62ac42261a7587215a /cc/resources/picture_layer_tiling.cc | |
parent | 643e58b5c1b0c869c6f51548d4ec9f7cabe83149 (diff) | |
download | chromium_src-60f06b1af0223cd7d8bafeb2dd9a54093992a39c.zip chromium_src-60f06b1af0223cd7d8bafeb2dd9a54093992a39c.tar.gz chromium_src-60f06b1af0223cd7d8bafeb2dd9a54093992a39c.tar.bz2 |
cc: Use ExpandRectIgnoringBordersToTileBoundsWithBordersEmpty.
When expanding the live tiles rect, we want to include border pixels
for all tiles that intersect the live tiles rect. It used to do this
by also including any tiles whose border pixels intersect the live
tiles rect, but that's excessive.
This adds ExpandRectIgnoringBordersToTileBoundsWithBordersEmpty and
uses it to expand the live tiles rect, the unit test
PictureLayerTilingIteratorTest.ResizeOverBorderPixelsDeletesTiles
covers this usage of the method.
The ExpandRectToTileBoundsWithBorders is no longer used, so remove it.
R=enne
BUG=386998
Review URL: https://codereview.chromium.org/385123006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282896 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/resources/picture_layer_tiling.cc')
-rw-r--r-- | cc/resources/picture_layer_tiling.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/cc/resources/picture_layer_tiling.cc b/cc/resources/picture_layer_tiling.cc index da24121..9a9c758 100644 --- a/cc/resources/picture_layer_tiling.cc +++ b/cc/resources/picture_layer_tiling.cc @@ -174,11 +174,9 @@ void PictureLayerTiling::UpdateTilesToCurrentPile( void PictureLayerTiling::Invalidate(const Region& layer_region) { std::vector<TileMapKey> new_tile_keys; - // TODO(danakj): What we really want is to ignore border pixels that intersect - // the rect when choosing which tiles it covers, then expand to those tiles - // plus their border pixels. gfx::Rect expanded_live_tiles_rect = - tiling_data_.ExpandRectToTileBounds(live_tiles_rect_); + tiling_data_.ExpandRectIgnoringBordersToTileBoundsWithBorders( + live_tiles_rect_); for (Region::Iterator iter(layer_region); iter.has_rect(); iter.next()) { gfx::Rect layer_rect = iter.rect(); gfx::Rect content_rect = |