summaryrefslogtreecommitdiffstats
path: root/ui/gfx/image/image.h
diff options
context:
space:
mode:
authorpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-10 15:06:56 +0000
committerpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-10 15:06:56 +0000
commit00bb2e6c0aedd827a2134e4d62fc6dfc1250fb39 (patch)
tree30063c1f0d75c9807aaf9dabfa932f64c9af5413 /ui/gfx/image/image.h
parent8848edb12734050359fcc3ca38615de29d09030b (diff)
downloadchromium_src-00bb2e6c0aedd827a2134e4d62fc6dfc1250fb39.zip
chromium_src-00bb2e6c0aedd827a2134e4d62fc6dfc1250fb39.tar.gz
chromium_src-00bb2e6c0aedd827a2134e4d62fc6dfc1250fb39.tar.bz2
This patch makes ImageSkia more like SkBitmap. The goal is to make swapping from SkBitmap to ImageSkia easier.
Notable changes: - ImageSkia can be cheaply copied - Added extractSubset, will remove after SkBitmaps have been converted to ImageSkia - Modified API to look more like SkBitmap Review URL: https://chromiumcodereview.appspot.com/10245003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136304 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/image/image.h')
-rw-r--r--ui/gfx/image/image.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/gfx/image/image.h b/ui/gfx/image/image.h
index 9c0e6eb..b5bb3bf 100644
--- a/ui/gfx/image/image.h
+++ b/ui/gfx/image/image.h
@@ -62,6 +62,9 @@ class UI_EXPORT Image {
// Creates an empty image with no representations.
Image();
+ // Creates a new image with the default representation.
+ explicit Image(const ImageSkia& image);
+
// Creates a new image with the default representation. The object will take
// ownership of the image.
explicit Image(const SkBitmap* bitmap);
@@ -70,10 +73,6 @@ class UI_EXPORT Image {
// representation.
explicit Image(const SkBitmap& bitmap);
- // To create an Image that supports multiple resolutions pass a vector
- // of bitmaps, one for each resolution.
- explicit Image(const std::vector<const SkBitmap*>& bitmaps);
-
#if defined(TOOLKIT_GTK)
// Does not increase |pixbuf|'s reference count; expects to take ownership.
explicit Image(GdkPixbuf* pixbuf);
@@ -112,6 +111,7 @@ class UI_EXPORT Image {
// backing pixels are shared amongst all copies (a fact of each of the
// converted representations, rather than a limitation imposed by Image) and
// so the result should be considered immutable.
+ ImageSkia* CopyImageSkia() const;
SkBitmap* CopySkBitmap() const;
#if defined(TOOLKIT_GTK)
GdkPixbuf* CopyGdkPixbuf() const;