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

Unified Diff: cc/test/test_texture.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/test/test_texture.h ('k') | cc/test/tiled_layer_test_common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/test_texture.cc
diff --git a/cc/test/test_texture.cc b/cc/test/test_texture.cc
index 0f4f07cafbc3d800ef524d0243e2c5c09db1378c..8addc7920f9789e6a012dc0e64f2a19a4b48aa50 100644
--- a/cc/test/test_texture.cc
+++ b/cc/test/test_texture.cc
@@ -9,7 +9,7 @@
namespace cc {
-size_t TextureSizeBytes(gfx::Size size, ResourceFormat format) {
+size_t TextureSizeBytes(const gfx::Size& size, ResourceFormat format) {
unsigned int components_per_pixel = 4;
unsigned int bytes_per_component = 1;
return size.width() * size.height() * components_per_pixel *
@@ -28,7 +28,7 @@ TestTexture::TestTexture() : format(RGBA_8888) {
TestTexture::~TestTexture() {}
-void TestTexture::Reallocate(gfx::Size size, ResourceFormat format) {
+void TestTexture::Reallocate(const gfx::Size& size, ResourceFormat format) {
this->size = size;
this->format = format;
this->data.reset(new uint8_t[TextureSizeBytes(size, format)]);
« no previous file with comments | « cc/test/test_texture.h ('k') | cc/test/tiled_layer_test_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698