Index: cc/resources/resource_provider_unittest.cc |
diff --git a/cc/resources/resource_provider_unittest.cc b/cc/resources/resource_provider_unittest.cc |
index f96982f189828803f535c5c001bda1c6b6bd5477..bce6d5adbdab38e20a1fc1f0ab1b335178c9b544 100644 |
--- a/cc/resources/resource_provider_unittest.cc |
+++ b/cc/resources/resource_provider_unittest.cc |
@@ -64,7 +64,7 @@ static void ReleaseSharedMemoryCallback( |
} |
static scoped_ptr<base::SharedMemory> CreateAndFillSharedMemory( |
- gfx::Size size, |
+ const gfx::Size& size, |
uint32_t value) { |
scoped_ptr<base::SharedMemory> shared_memory(new base::SharedMemory); |
CHECK(shared_memory->CreateAndMapAnonymous(4 * size.GetArea())); |
@@ -264,7 +264,9 @@ class ResourceProviderContext : public TestWebGraphicsContext3D { |
namespace_->textures.Replace(BoundTextureId(target), texture); |
} |
- void GetPixels(gfx::Size size, ResourceFormat format, uint8_t* pixels) { |
+ void GetPixels(const gfx::Size& size, |
+ ResourceFormat format, |
+ uint8_t* pixels) { |
CheckTextureIsBound(GL_TEXTURE_2D); |
base::AutoLock lock_for_texture_access(namespace_->lock); |
scoped_refptr<TestTexture> texture = BoundTexture(GL_TEXTURE_2D); |
@@ -279,7 +281,7 @@ class ResourceProviderContext : public TestWebGraphicsContext3D { |
last_waited_sync_point_(0) {} |
private: |
- void AllocateTexture(gfx::Size size, GLenum format) { |
+ void AllocateTexture(const gfx::Size& size, GLenum format) { |
CheckTextureIsBound(GL_TEXTURE_2D); |
ResourceFormat texture_format = RGBA_8888; |
switch (format) { |
@@ -340,7 +342,7 @@ class TestSharedBitmapManager : public SharedBitmapManager { |
TestSharedBitmapManager() : count_(0) {} |
virtual ~TestSharedBitmapManager() {} |
- virtual scoped_ptr<SharedBitmap> AllocateSharedBitmap(gfx::Size size) |
+ virtual scoped_ptr<SharedBitmap> AllocateSharedBitmap(const gfx::Size& size) |
OVERRIDE { |
scoped_ptr<base::SharedMemory> memory(new base::SharedMemory); |
memory->CreateAndMapAnonymous(size.GetArea() * 4); |
@@ -354,7 +356,7 @@ class TestSharedBitmapManager : public SharedBitmapManager { |
} |
virtual scoped_ptr<SharedBitmap> GetSharedBitmapFromId( |
- gfx::Size, |
+ const gfx::Size&, |
const SharedBitmapId& id) OVERRIDE { |
if (bitmap_map_.find(id) == bitmap_map_.end()) |
return scoped_ptr<SharedBitmap>(); |
@@ -381,7 +383,7 @@ class TestSharedBitmapManager : public SharedBitmapManager { |
void GetResourcePixels(ResourceProvider* resource_provider, |
ResourceProviderContext* context, |
ResourceProvider::ResourceId id, |
- gfx::Size size, |
+ const gfx::Size& size, |
ResourceFormat format, |
uint8_t* pixels) { |
switch (resource_provider->default_resource_type()) { |