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

Unified Diff: cc/resources/resource.h

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/raster_worker_pool_unittest.cc ('k') | cc/resources/resource_pool.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource.h
diff --git a/cc/resources/resource.h b/cc/resources/resource.h
index 24cb88a9f846fd656421f0c1a300c7a020133558..e9dd393a6a4e0b340ee27c84c3d6aa69e416c849 100644
--- a/cc/resources/resource.h
+++ b/cc/resources/resource.h
@@ -15,7 +15,7 @@
class CC_EXPORT Resource {
public:
Resource() : id_(0) {}
- Resource(unsigned id, const gfx::Size& size, ResourceFormat format)
+ Resource(unsigned id, gfx::Size size, ResourceFormat format)
: id_(id),
size_(size),
format_(format) {}
@@ -25,15 +25,14 @@
ResourceFormat format() const { return format_; }
size_t bytes() const;
- inline static size_t MemorySizeBytes(const gfx::Size& size,
- ResourceFormat format) {
+ inline static size_t MemorySizeBytes(gfx::Size size, ResourceFormat format) {
DCHECK_EQ(0u, (BitsPerPixel(format) * size.width() * size.height()) % 8);
return (BitsPerPixel(format) * size.width() * size.height()) / 8;
}
protected:
void set_id(ResourceProvider::ResourceId id) { id_ = id; }
- void set_dimensions(const gfx::Size& size, ResourceFormat format) {
+ void set_dimensions(gfx::Size size, ResourceFormat format) {
size_ = size;
format_ = format;
}
« no previous file with comments | « cc/resources/raster_worker_pool_unittest.cc ('k') | cc/resources/resource_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698