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

Unified Diff: cc/resource.h

Issue 11412022: Switched cc::Resource and cc::ScopedResource to Chrome coding style. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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/prioritized_resource.cc ('k') | cc/resource.cc » ('j') | cc/resource.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resource.h
diff --git a/cc/resource.h b/cc/resource.h
index 773b7a36101679bda8446932da35c7e191750acb..2d2441ef85948327dfdb33f1c2a66074477ace36 100644
--- a/cc/resource.h
+++ b/cc/resource.h
@@ -13,31 +13,30 @@
namespace cc {
class CC_EXPORT Resource {
-public:
- Resource() : m_id(0) { }
- Resource(unsigned id, gfx::Size size, GLenum format)
- : m_id(id)
- , m_size(size)
- , m_format(format) { }
+ public:
+ Resource() : id_(0) { }
+ Resource(unsigned id, gfx::Size size, GLenum format)
+ : id_(id), size_(size), format_(format) { }
- ResourceProvider::ResourceId id() const { return m_id; }
- const gfx::Size& size() const { return m_size; }
- GLenum format() const { return m_format; }
+ ResourceProvider::ResourceId id() const { return id_; }
+ const gfx::Size& size() const { return size_; }
+ GLenum format() const { return format_; }
- void setId(ResourceProvider::ResourceId id) { m_id = id; }
- void setDimensions(const gfx::Size&, GLenum format);
+ size_t bytes() const;
- size_t bytes() const;
+ static size_t BytesPerPixel(GLenum format);
+ static size_t MemorySizeBytes(const gfx::Size& size, GLenum format);
- static size_t bytesPerPixel(GLenum format);
- static size_t memorySizeBytes(const gfx::Size&, GLenum format);
+ protected:
+ void set_id(ResourceProvider::ResourceId id) { id_ = id; }
+ void set_dimensions(const gfx::Size&, GLenum format);
-private:
- ResourceProvider::ResourceId m_id;
- gfx::Size m_size;
- GLenum m_format;
+ private:
+ ResourceProvider::ResourceId id_;
+ gfx::Size size_;
+ GLenum format_;
};
-}
+} // namespace cc
#endif // CC_RESOURCE_H_
« no previous file with comments | « cc/prioritized_resource.cc ('k') | cc/resource.cc » ('j') | cc/resource.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698