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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 145313006: [#7] Pass gfx structs by const ref (gfx::Size) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl_unittest.cc
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index 479754128250cf59c2ba6c131b9b3bcb16035141..6825599edf4895afdf0b4c327a49fa78b93d7a67 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -204,7 +204,7 @@ class LayerTreeHostImplTest : public testing::Test,
}
LayerImpl* CreateScrollAndContentsLayers(LayerTreeImpl* layer_tree_impl,
- gfx::Size content_size) {
+ const gfx::Size& content_size) {
scoped_ptr<LayerImpl> root =
LayerImpl::Create(layer_tree_impl, 1);
root->SetBounds(content_size);
@@ -239,14 +239,14 @@ class LayerTreeHostImplTest : public testing::Test,
return scroll_layer;
}
- LayerImpl* SetupScrollAndContentsLayers(gfx::Size content_size) {
+ LayerImpl* SetupScrollAndContentsLayers(const gfx::Size& content_size) {
LayerImpl* scroll_layer = CreateScrollAndContentsLayers(
host_impl_->active_tree(), content_size);
host_impl_->active_tree()->DidBecomeActive();
return scroll_layer;
}
- scoped_ptr<LayerImpl> CreateScrollableLayer(int id, gfx::Size size) {
+ scoped_ptr<LayerImpl> CreateScrollableLayer(int id, const gfx::Size& size) {
scoped_ptr<LayerImpl> layer =
LayerImpl::Create(host_impl_->active_tree(), id);
layer->SetScrollable(true);
@@ -3169,7 +3169,7 @@ class LayerTreeHostImplViewportCoveredTest : public LayerTreeHostImplTest {
void set_gutter_quad_material(DrawQuad::Material material) {
gutter_quad_material_ = material;
}
- void set_gutter_texture_size(gfx::Size gutter_texture_size) {
+ void set_gutter_texture_size(const gfx::Size& gutter_texture_size) {
gutter_texture_size_ = gutter_texture_size;
}
@@ -3207,7 +3207,7 @@ class LayerTreeHostImplViewportCoveredTest : public LayerTreeHostImplTest {
}
}
- gfx::Size DipSizeToPixelSize(gfx::Size size) {
+ gfx::Size DipSizeToPixelSize(const gfx::Size& size) {
return gfx::ToRoundedSize(
gfx::ScaleSize(size, host_impl_->device_scale_factor()));
}
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698