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

Unified Diff: cc/resources/picture_pile_base.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_pile_base.h ('k') | cc/resources/picture_pile_impl.h » ('j') | 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 7d60dcafc6b6b72839790e8b4f13e976c9f09730..03f42107b529f6d202c92b53a4e6a7e15eb43eb8 100644
--- a/cc/resources/picture_pile_base.cc
+++ b/cc/resources/picture_pile_base.cc
@@ -188,7 +188,8 @@ bool PicturePileBase::HasRecordingAt(int x, int y) {
return !!found->second.GetPicture();
}
-bool PicturePileBase::CanRaster(float contents_scale, gfx::Rect content_rect) {
+bool PicturePileBase::CanRaster(float contents_scale,
+ const gfx::Rect& content_rect) {
if (tiling_.total_size().IsEmpty())
return false;
gfx::Rect layer_rect = gfx::ScaleToEnclosingRect(
@@ -202,7 +203,7 @@ gfx::Rect PicturePileBase::PaddedRect(const PictureMapKey& key) {
return PadRect(tile);
}
-gfx::Rect PicturePileBase::PadRect(gfx::Rect rect) {
+gfx::Rect PicturePileBase::PadRect(const gfx::Rect& rect) {
gfx::Rect padded_rect = rect;
padded_rect.Inset(
-buffer_pixels(), -buffer_pixels(), -buffer_pixels(), -buffer_pixels());
« no previous file with comments | « cc/resources/picture_pile_base.h ('k') | cc/resources/picture_pile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698