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

Unified Diff: cc/resources/resource_provider_unittest.cc

Issue 142863008: Revert of [#7] Pass gfx structs by const ref (gfx::Size) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/resource_provider.cc ('k') | cc/resources/scoped_resource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource_provider_unittest.cc
diff --git a/cc/resources/resource_provider_unittest.cc b/cc/resources/resource_provider_unittest.cc
index bce6d5adbdab38e20a1fc1f0ab1b335178c9b544..f96982f189828803f535c5c001bda1c6b6bd5477 100644
--- a/cc/resources/resource_provider_unittest.cc
+++ b/cc/resources/resource_provider_unittest.cc
@@ -64,7 +64,7 @@
}
static scoped_ptr<base::SharedMemory> CreateAndFillSharedMemory(
- const gfx::Size& size,
+ gfx::Size size,
uint32_t value) {
scoped_ptr<base::SharedMemory> shared_memory(new base::SharedMemory);
CHECK(shared_memory->CreateAndMapAnonymous(4 * size.GetArea()));
@@ -264,9 +264,7 @@
namespace_->textures.Replace(BoundTextureId(target), texture);
}
- void GetPixels(const gfx::Size& size,
- ResourceFormat format,
- uint8_t* pixels) {
+ void GetPixels(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);
@@ -281,7 +279,7 @@
last_waited_sync_point_(0) {}
private:
- void AllocateTexture(const gfx::Size& size, GLenum format) {
+ void AllocateTexture(gfx::Size size, GLenum format) {
CheckTextureIsBound(GL_TEXTURE_2D);
ResourceFormat texture_format = RGBA_8888;
switch (format) {
@@ -342,7 +340,7 @@
TestSharedBitmapManager() : count_(0) {}
virtual ~TestSharedBitmapManager() {}
- virtual scoped_ptr<SharedBitmap> AllocateSharedBitmap(const gfx::Size& size)
+ virtual scoped_ptr<SharedBitmap> AllocateSharedBitmap(gfx::Size size)
OVERRIDE {
scoped_ptr<base::SharedMemory> memory(new base::SharedMemory);
memory->CreateAndMapAnonymous(size.GetArea() * 4);
@@ -356,7 +354,7 @@
}
virtual scoped_ptr<SharedBitmap> GetSharedBitmapFromId(
- const gfx::Size&,
+ gfx::Size,
const SharedBitmapId& id) OVERRIDE {
if (bitmap_map_.find(id) == bitmap_map_.end())
return scoped_ptr<SharedBitmap>();
@@ -383,7 +381,7 @@
void GetResourcePixels(ResourceProvider* resource_provider,
ResourceProviderContext* context,
ResourceProvider::ResourceId id,
- const gfx::Size& size,
+ gfx::Size size,
ResourceFormat format,
uint8_t* pixels) {
switch (resource_provider->default_resource_type()) {
« no previous file with comments | « cc/resources/resource_provider.cc ('k') | cc/resources/scoped_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698