summaryrefslogtreecommitdiffstats
path: root/cc/resources/resource.h
diff options
context:
space:
mode:
Diffstat (limited to 'cc/resources/resource.h')
-rw-r--r--cc/resources/resource.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/cc/resources/resource.h b/cc/resources/resource.h
index 24cb88a..e9dd393a 100644
--- a/cc/resources/resource.h
+++ b/cc/resources/resource.h
@@ -15,7 +15,7 @@ namespace cc {
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 @@ class CC_EXPORT Resource {
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;
}