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

Unified Diff: trunk/src/cc/base/tiling_data.cc

Issue 347493002: Revert 277964 "cc: In SyncFromActiveLayer, drop all tiles not in..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 6 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 | « trunk/src/cc/base/tiling_data.h ('k') | trunk/src/cc/base/tiling_data_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/cc/base/tiling_data.cc
===================================================================
--- trunk/src/cc/base/tiling_data.cc (revision 277979)
+++ trunk/src/cc/base/tiling_data.cc (working copy)
@@ -139,34 +139,22 @@
}
gfx::Rect TilingData::ExpandRectToTileBoundsWithBorders(
- const gfx::Rect& rect) const {
+ const gfx::Rect rect) const {
if (!rect.Intersects(tiling_rect_) || has_empty_bounds())
return gfx::Rect();
int index_x = FirstBorderTileXIndexFromSrcCoord(rect.x());
int index_y = FirstBorderTileYIndexFromSrcCoord(rect.y());
- int index_right = LastBorderTileXIndexFromSrcCoord(rect.right() - 1);
- int index_bottom = LastBorderTileYIndexFromSrcCoord(rect.bottom() - 1);
+ int index_right = LastBorderTileXIndexFromSrcCoord(rect.right());
+ int index_bottom = LastBorderTileYIndexFromSrcCoord(rect.bottom());
gfx::Rect rect_top_left(TileBoundsWithBorder(index_x, index_y));
gfx::Rect rect_bottom_right(TileBoundsWithBorder(index_right, index_bottom));
- return gfx::UnionRects(rect_top_left, rect_bottom_right);
+ gfx::Rect expanded(rect_top_left);
+ expanded.Union(rect_bottom_right);
+ return expanded;
}
-gfx::Rect TilingData::ExpandRectToTileBounds(const gfx::Rect& rect) const {
- if (!rect.Intersects(tiling_rect_) || has_empty_bounds())
- return gfx::Rect();
- int index_x = FirstBorderTileXIndexFromSrcCoord(rect.x());
- int index_y = FirstBorderTileYIndexFromSrcCoord(rect.y());
- int index_right = LastBorderTileXIndexFromSrcCoord(rect.right() - 1);
- int index_bottom = LastBorderTileYIndexFromSrcCoord(rect.bottom() - 1);
-
- gfx::Rect rect_top_left(TileBounds(index_x, index_y));
- gfx::Rect rect_bottom_right(TileBounds(index_right, index_bottom));
-
- return gfx::UnionRects(rect_top_left, rect_bottom_right);
-}
-
gfx::Rect TilingData::TileBounds(int i, int j) const {
AssertTile(i, j);
int max_texture_size_x = max_texture_size_.width() - 2 * border_texels_;
« no previous file with comments | « trunk/src/cc/base/tiling_data.h ('k') | trunk/src/cc/base/tiling_data_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698