Index: cc/resources/resource.h |
diff --git a/cc/resources/resource.h b/cc/resources/resource.h |
index 1c658223649375835534122493f4e399a51f6e95..b4d96da5a0cf724915c8aded7cf366757809c19b 100644 |
--- a/cc/resources/resource.h |
+++ b/cc/resources/resource.h |
@@ -15,10 +15,14 @@ namespace cc { |
class CC_EXPORT Resource { |
public: |
Resource() : id_(0) {} |
- Resource(unsigned id, gfx::Size size, GLenum format) |
+ Resource(unsigned id, |
+ gfx::Size size, |
+ GLenum format, |
+ ResourceProvider::TextureType type) |
: id_(id), |
size_(size), |
- format_(format) {} |
+ format_(format), |
epennerAtGoogle
2013/09/11 19:21:04
In what case can format vary independently from Ty
kaanb
2013/09/12 07:53:44
Done.
|
+ type_(type) {} |
ResourceProvider::ResourceId id() const { return id_; } |
gfx::Size size() const { return size_; } |
@@ -26,8 +30,8 @@ class CC_EXPORT Resource { |
size_t bytes() const; |
- static size_t BytesPerPixel(GLenum format); |
- static size_t MemorySizeBytes(gfx::Size size, GLenum format); |
+ static size_t MemorySizeBytes( |
+ gfx::Size size, GLenum format, ResourceProvider::TextureType type); |
protected: |
void set_id(ResourceProvider::ResourceId id) { id_ = id; } |
@@ -40,6 +44,7 @@ class CC_EXPORT Resource { |
ResourceProvider::ResourceId id_; |
gfx::Size size_; |
GLenum format_; |
+ ResourceProvider::TextureType type_; |
DISALLOW_COPY_AND_ASSIGN(Resource); |
}; |