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

Unified Diff: cc/layers/layer.cc

Issue 132163009: [#6]Pass gfx structs by const ref (gfx::Vector2d) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index f5850067c415af5bc11f9495d2933533904a32e7..3ca01a741a3ba01ecc728334a3f8c6b0aebadcd0 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -677,7 +677,7 @@ void Layer::RemoveClipChild(Layer* child) {
SetNeedsCommit();
}
-void Layer::SetScrollOffset(gfx::Vector2d scroll_offset) {
+void Layer::SetScrollOffset(const gfx::Vector2d& scroll_offset) {
DCHECK(IsPropertyChangeAllowed());
if (scroll_offset_ == scroll_offset)
return;
@@ -685,7 +685,7 @@ void Layer::SetScrollOffset(gfx::Vector2d scroll_offset) {
SetNeedsCommit();
}
-void Layer::SetScrollOffsetFromImplSide(gfx::Vector2d scroll_offset) {
+void Layer::SetScrollOffsetFromImplSide(const gfx::Vector2d& scroll_offset) {
DCHECK(IsPropertyChangeAllowed());
// This function only gets called during a BeginMainFrame, so there
// is no need to call SetNeedsUpdate here.
@@ -700,7 +700,7 @@ void Layer::SetScrollOffsetFromImplSide(gfx::Vector2d scroll_offset) {
// "this" may have been destroyed during the process.
}
-void Layer::SetMaxScrollOffset(gfx::Vector2d max_scroll_offset) {
+void Layer::SetMaxScrollOffset(const gfx::Vector2d& max_scroll_offset) {
DCHECK(IsPropertyChangeAllowed());
if (max_scroll_offset_ == max_scroll_offset)
return;

Powered by Google App Engine
This is Rietveld 408576698