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

Unified Diff: cc/resources/resource.h

Issue 21159007: cc: Adding support for RGBA_4444 tile textures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix raster-on-demand codepath Created 7 years, 3 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
Index: cc/resources/resource.h
diff --git a/cc/resources/resource.h b/cc/resources/resource.h
index 1c658223649375835534122493f4e399a51f6e95..aa4219e7c0e0e884fb831940bce622bddee01d99 100644
--- a/cc/resources/resource.h
+++ b/cc/resources/resource.h
@@ -15,10 +15,11 @@ 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, bool is_16_bit_resource)
: id_(id),
size_(size),
- format_(format) {}
+ format_(format),
+ is_16_bit_resource_(is_16_bit_resource) {}
ResourceProvider::ResourceId id() const { return id_; }
gfx::Size size() const { return size_; }
@@ -26,8 +27,9 @@ 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 BytesPerPixel(GLenum format, bool is_16_bit_resource);
+ static size_t MemorySizeBytes(
+ gfx::Size size, GLenum format, bool is_16_bit_resource);
protected:
void set_id(ResourceProvider::ResourceId id) { id_ = id; }
@@ -40,6 +42,7 @@ class CC_EXPORT Resource {
ResourceProvider::ResourceId id_;
gfx::Size size_;
GLenum format_;
+ bool is_16_bit_resource_;
DISALLOW_COPY_AND_ASSIGN(Resource);
};

Powered by Google App Engine
This is Rietveld 408576698