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

Unified Diff: cc/resources/ui_resource_bitmap.h

Issue 27973002: cc: Adding ETC1 support to UIResourceBitmap and ResourceProvider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: latest comments Created 7 years, 2 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/resource_provider_unittest.cc ('k') | cc/resources/ui_resource_bitmap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/ui_resource_bitmap.h
diff --git a/cc/resources/ui_resource_bitmap.h b/cc/resources/ui_resource_bitmap.h
index 78cb465812570f499c79d9ab53edd11c50666e7b..cae1d1c86ad1edd997daa6e77e4f9f0b41c40db9 100644
--- a/cc/resources/ui_resource_bitmap.h
+++ b/cc/resources/ui_resource_bitmap.h
@@ -24,7 +24,8 @@ namespace cc {
class CC_EXPORT UIResourceBitmap {
public:
enum UIResourceFormat {
- RGBA8
+ RGBA8,
+ ETC1
};
enum UIResourceWrapMode {
CLAMP_TO_EDGE,
@@ -34,12 +35,16 @@ class CC_EXPORT UIResourceBitmap {
gfx::Size GetSize() const { return size_; }
UIResourceFormat GetFormat() const { return format_; }
UIResourceWrapMode GetWrapMode() const { return wrap_mode_; }
+ void SetWrapMode(UIResourceWrapMode wrap_mode) { wrap_mode_ = wrap_mode; }
// The constructor for the UIResourceBitmap. User must ensure that |skbitmap|
// is immutable. The SkBitmap format should be in 32-bit RGBA. Wrap mode is
// unnecessary for most UI resources and is defaulted to CLAMP_TO_EDGE.
- UIResourceBitmap(const SkBitmap& skbitmap,
- UIResourceWrapMode wrap_mode = CLAMP_TO_EDGE);
+ explicit UIResourceBitmap(const SkBitmap& skbitmap);
+
+ UIResourceBitmap(const skia::RefPtr<SkPixelRef>& pixel_ref,
+ UIResourceFormat format,
+ gfx::Size size);
~UIResourceBitmap();
@@ -47,7 +52,6 @@ class CC_EXPORT UIResourceBitmap {
friend class AutoLockUIResourceBitmap;
void Create(const skia::RefPtr<SkPixelRef>& pixel_ref,
UIResourceFormat format,
- UIResourceWrapMode wrap_mode,
gfx::Size size);
skia::RefPtr<SkPixelRef> pixel_ref_;
« no previous file with comments | « cc/resources/resource_provider_unittest.cc ('k') | cc/resources/ui_resource_bitmap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698