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

Unified Diff: cc/resources/resource.h

Issue 14301021: cc: Don't pass simple well-defined classes by reference. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/picture_pile_base.cc ('k') | cc/resources/resource.cc » ('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 8010722cc182adbcc8051a21d63098f8914141ba..1c658223649375835534122493f4e399a51f6e95 100644
--- a/cc/resources/resource.h
+++ b/cc/resources/resource.h
@@ -21,17 +21,20 @@ class CC_EXPORT Resource {
format_(format) {}
ResourceProvider::ResourceId id() const { return id_; }
- const gfx::Size& size() const { return size_; }
+ gfx::Size size() const { return size_; }
GLenum format() const { return format_; }
size_t bytes() const;
static size_t BytesPerPixel(GLenum format);
- static size_t MemorySizeBytes(const gfx::Size& size, GLenum format);
+ static size_t MemorySizeBytes(gfx::Size size, GLenum format);
protected:
void set_id(ResourceProvider::ResourceId id) { id_ = id; }
- void set_dimensions(const gfx::Size&, GLenum format);
+ void set_dimensions(gfx::Size size, GLenum format) {
+ size_ = size;
+ format_ = format;
+ }
private:
ResourceProvider::ResourceId id_;
« no previous file with comments | « cc/resources/picture_pile_base.cc ('k') | cc/resources/resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698