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

Unified Diff: cc/resources/layer_tiling_data.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/resources/layer_tiling_data.h ('k') | cc/resources/layer_updater.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/layer_tiling_data.cc
diff --git a/cc/resources/layer_tiling_data.cc b/cc/resources/layer_tiling_data.cc
index e9caf9bb5fc28aa934d2312c55fc923603a518e2..ccbb6d0148194cc6ea8d8ee2f2b44cadabcf9e99 100644
--- a/cc/resources/layer_tiling_data.cc
+++ b/cc/resources/layer_tiling_data.cc
@@ -10,19 +10,20 @@
namespace cc {
-scoped_ptr<LayerTilingData> LayerTilingData::Create(gfx::Size tile_size,
+scoped_ptr<LayerTilingData> LayerTilingData::Create(const gfx::Size& tile_size,
BorderTexelOption border) {
return make_scoped_ptr(new LayerTilingData(tile_size, border));
}
-LayerTilingData::LayerTilingData(gfx::Size tile_size, BorderTexelOption border)
+LayerTilingData::LayerTilingData(const gfx::Size& tile_size,
+ BorderTexelOption border)
: tiling_data_(tile_size, gfx::Size(), border == HAS_BORDER_TEXELS) {
SetTileSize(tile_size);
}
LayerTilingData::~LayerTilingData() {}
-void LayerTilingData::SetTileSize(gfx::Size size) {
+void LayerTilingData::SetTileSize(const gfx::Size& size) {
if (tile_size() == size)
return;
@@ -111,7 +112,7 @@ Region LayerTilingData::OpaqueRegionInContentRect(
return opaque_region;
}
-void LayerTilingData::SetBounds(gfx::Size size) {
+void LayerTilingData::SetBounds(const gfx::Size& size) {
tiling_data_.SetTotalSize(size);
if (size.IsEmpty()) {
tiles_.clear();
« no previous file with comments | « cc/resources/layer_tiling_data.h ('k') | cc/resources/layer_updater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698