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

Unified Diff: cc/layers/layer_impl.cc

Issue 130443005: [#5] Pass gfx structs by const ref (gfx::Vector2dF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporated the review comments 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/layer_impl.h ('k') | cc/layers/layer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index a783a780c7dde9e85e8473e85e960c6e979a4c4e..7444b7797feb3b4804242b55f7a78fb1449c68c5 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -376,7 +376,7 @@ void LayerImpl::SetSentScrollDelta(gfx::Vector2d sent_scroll_delta) {
sent_scroll_delta_ = sent_scroll_delta;
}
-gfx::Vector2dF LayerImpl::ScrollBy(gfx::Vector2dF scroll) {
+gfx::Vector2dF LayerImpl::ScrollBy(const gfx::Vector2dF& scroll) {
DCHECK(scrollable());
gfx::Vector2dF min_delta = -scroll_offset_;
gfx::Vector2dF max_delta = max_scroll_offset_ - scroll_offset_;
@@ -731,7 +731,7 @@ void LayerImpl::OnTransformAnimated(const gfx::Transform& transform) {
SetTransform(transform);
}
-void LayerImpl::OnScrollOffsetAnimated(gfx::Vector2dF scroll_offset) {
+void LayerImpl::OnScrollOffsetAnimated(const gfx::Vector2dF& scroll_offset) {
// Only layers in the active tree should need to do anything here, since
// layers in the pending tree will find out about these changes as a
// result of the call to SetScrollDelta.
@@ -1092,7 +1092,7 @@ void LayerImpl::SetScrollOffset(gfx::Vector2d scroll_offset) {
}
void LayerImpl::SetScrollOffsetAndDelta(gfx::Vector2d scroll_offset,
- gfx::Vector2dF scroll_delta) {
+ const gfx::Vector2dF& scroll_delta) {
bool changed = false;
if (scroll_offset_ != scroll_offset) {
@@ -1139,7 +1139,7 @@ gfx::Vector2dF LayerImpl::ScrollDelta() const {
return scroll_delta_;
}
-void LayerImpl::SetScrollDelta(gfx::Vector2dF scroll_delta) {
+void LayerImpl::SetScrollDelta(const gfx::Vector2dF& scroll_delta) {
SetScrollOffsetAndDelta(scroll_offset_, scroll_delta);
}
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698