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

Unified Diff: cc/layers/render_surface.h

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/layers/picture_layer_unittest.cc ('k') | cc/layers/render_surface_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/render_surface.h
diff --git a/cc/layers/render_surface.h b/cc/layers/render_surface.h
index ef9ba2297366fe1ba38786b76f9e7a821e501f7e..b0da4e99f4cb0fb68c6047f24582c65d1f92afe7 100644
--- a/cc/layers/render_surface.h
+++ b/cc/layers/render_surface.h
@@ -29,7 +29,9 @@ class CC_EXPORT RenderSurface {
// reflection.
gfx::RectF DrawableContentRect() const;
- void SetContentRect(gfx::Rect content_rect) { content_rect_ = content_rect; }
+ void SetContentRect(const gfx::Rect& content_rect) {
+ content_rect_ = content_rect;
+ }
gfx::Rect content_rect() const { return content_rect_; }
void SetDrawOpacity(float opacity) { draw_opacity_ = opacity; }
@@ -84,7 +86,7 @@ class CC_EXPORT RenderSurface {
void SetIsClipped(bool is_clipped) { is_clipped_ = is_clipped; }
gfx::Rect clip_rect() const { return clip_rect_; }
- void SetClipRect(gfx::Rect clip_rect) { clip_rect_ = clip_rect; }
+ void SetClipRect(const gfx::Rect& clip_rect) { clip_rect_ = clip_rect; }
// When false, the RenderSurface does not contribute to another target
// RenderSurface that is being drawn for the current frame. It could still be
« no previous file with comments | « cc/layers/picture_layer_unittest.cc ('k') | cc/layers/render_surface_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698