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

Unified Diff: cc/layers/layer_impl.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_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 7444b7797feb3b4804242b55f7a78fb1449c68c5..f9e9f88fb7ac5f7e88485553b0e5ad8edf0981b6 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -366,7 +366,7 @@ ResourceProvider::ResourceId LayerImpl::ContentsResourceId() const {
return 0;
}
-void LayerImpl::SetSentScrollDelta(gfx::Vector2d sent_scroll_delta) {
+void LayerImpl::SetSentScrollDelta(const gfx::Vector2d& sent_scroll_delta) {
// Pending tree never has sent scroll deltas
DCHECK(layer_tree_impl()->IsActiveTree());
@@ -1087,11 +1087,11 @@ bool LayerImpl::IsExternalFlingActive() const {
scroll_offset_delegate_->IsExternalFlingActive();
}
-void LayerImpl::SetScrollOffset(gfx::Vector2d scroll_offset) {
+void LayerImpl::SetScrollOffset(const gfx::Vector2d& scroll_offset) {
SetScrollOffsetAndDelta(scroll_offset, ScrollDelta());
}
-void LayerImpl::SetScrollOffsetAndDelta(gfx::Vector2d scroll_offset,
+void LayerImpl::SetScrollOffsetAndDelta(const gfx::Vector2d& scroll_offset,
const gfx::Vector2dF& scroll_delta) {
bool changed = false;
@@ -1165,7 +1165,7 @@ void LayerImpl::DidBeginTracing() {}
void LayerImpl::ReleaseResources() {}
-void LayerImpl::SetMaxScrollOffset(gfx::Vector2d max_scroll_offset) {
+void LayerImpl::SetMaxScrollOffset(const gfx::Vector2d& max_scroll_offset) {
if (max_scroll_offset_ == max_scroll_offset)
return;
max_scroll_offset_ = max_scroll_offset;

Powered by Google App Engine
This is Rietveld 408576698