diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-16 19:57:22 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-16 19:57:22 +0000 |
commit | 09c6dec4e18784861660f716d038035be9540601 (patch) | |
tree | b5e5419aff269cb15c13ea6a3eab0c90a527ef4a /skia/ext/skia_utils_mac.h | |
parent | 66980a010042f2e44efb21360e662daeae8c5668 (diff) | |
download | chromium_src-09c6dec4e18784861660f716d038035be9540601.zip chromium_src-09c6dec4e18784861660f716d038035be9540601.tar.gz chromium_src-09c6dec4e18784861660f716d038035be9540601.tar.bz2 |
Add file icons to chrome://downloads/ on the Mac. Add Skia helper
CGImageToSkBitmap().
Patch by Robert Sesek <rsesek@bluestatic.org>
Review URL: http://codereview.chromium.org/118488
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18517 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia/ext/skia_utils_mac.h')
-rw-r--r-- | skia/ext/skia_utils_mac.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/skia/ext/skia_utils_mac.h b/skia/ext/skia_utils_mac.h index b678abb..14cd17f 100644 --- a/skia/ext/skia_utils_mac.h +++ b/skia/ext/skia_utils_mac.h @@ -13,6 +13,12 @@ struct SkMatrix; struct SkIRect; struct SkPoint; struct SkRect; +class SkBitmap; +typedef struct _NSSize NSSize; + +#ifdef __OBJC__ +@class NSImage; +#endif namespace gfx { @@ -45,7 +51,14 @@ SkColor CGColorRefToSkColor(CGColorRef color); // Converts ARGB to CGColorRef. CGColorRef SkColorToCGColorRef(SkColor color); +// Converts a CGImage to a SkBitmap. +SkBitmap CGImageToSkBitmap(CGImageRef image); + +#ifdef __OBJC__ +// Draws an NSImage with a given size into a SkBitmap. +SkBitmap NSImageToSkBitmap(NSImage* image, NSSize size, bool is_opaque); +#endif + } // namespace gfx #endif // SKIA_EXT_SKIA_UTILS_MAC_H_ - |