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

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: rebase on TOT Created 6 years, 10 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/tiled_layer.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 e21cc13e29422256bdb597a456ea2cae5b08dbf1..a06884d7a2300b339767c00002dadfe19648e96f 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -367,7 +367,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());
@@ -1054,11 +1054,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;
@@ -1478,5 +1478,4 @@ scoped_ptr<base::Value> LayerImpl::AsValue() const {
void LayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) {
benchmark->RunOnLayer(this);
}
-
} // namespace cc
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/tiled_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698