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

Unified Diff: cc/resources/picture_layer_tiling.cc

Issue 93663004: [#2] Pass gfx structs by const ref (gfx::Rect, gfx::RectF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT, fix builds on non-linux platforms! Created 6 years, 11 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_layer_tiling.h ('k') | cc/resources/picture_layer_tiling_set.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture_layer_tiling.cc
diff --git a/cc/resources/picture_layer_tiling.cc b/cc/resources/picture_layer_tiling.cc
index 1aa3567e0a382825edba879cf0915445f6481b1e..5304127b5072f9297481cacb839a6c46df61bc8c 100644
--- a/cc/resources/picture_layer_tiling.cc
+++ b/cc/resources/picture_layer_tiling.cc
@@ -102,7 +102,7 @@ void PictureLayerTiling::CreateTile(int i,
}
Region PictureLayerTiling::OpaqueRegionInContentRect(
- gfx::Rect content_rect) const {
+ const gfx::Rect& content_rect) const {
Region opaque_region;
// TODO(enne): implement me
return opaque_region;
@@ -195,7 +195,7 @@ PictureLayerTiling::CoverageIterator::CoverageIterator()
PictureLayerTiling::CoverageIterator::CoverageIterator(
const PictureLayerTiling* tiling,
float dest_scale,
- gfx::Rect dest_rect)
+ const gfx::Rect& dest_rect)
: tiling_(tiling),
dest_rect_(dest_rect),
dest_to_content_scale_(0),
@@ -342,8 +342,8 @@ void PictureLayerTiling::Reset() {
void PictureLayerTiling::UpdateTilePriorities(
WhichTree tree,
gfx::Size device_viewport,
- gfx::Rect viewport_in_layer_space,
- gfx::Rect visible_layer_rect,
+ const gfx::Rect& viewport_in_layer_space,
+ const gfx::Rect& visible_layer_rect,
gfx::Size last_layer_bounds,
gfx::Size current_layer_bounds,
float last_layer_contents_scale,
@@ -559,7 +559,7 @@ void PictureLayerTiling::UpdateTilePriorities(
}
void PictureLayerTiling::SetLiveTilesRect(
- gfx::Rect new_live_tiles_rect) {
+ const gfx::Rect& new_live_tiles_rect) {
DCHECK(new_live_tiles_rect.IsEmpty() ||
ContentRect().Contains(new_live_tiles_rect));
if (live_tiles_rect_ == new_live_tiles_rect)
@@ -676,9 +676,9 @@ int ComputeExpansionDelta(int num_x_edges, int num_y_edges,
} // namespace
gfx::Rect PictureLayerTiling::ExpandRectEquallyToAreaBoundedBy(
- gfx::Rect starting_rect,
+ const gfx::Rect& starting_rect,
int64 target_area,
- gfx::Rect bounding_rect,
+ const gfx::Rect& bounding_rect,
RectExpansionCache* cache) {
if (starting_rect.IsEmpty())
return starting_rect;
« no previous file with comments | « cc/resources/picture_layer_tiling.h ('k') | cc/resources/picture_layer_tiling_set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698