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

Unified Diff: skia/ext/skia_utils_mac.h

Issue 118488: Add file icons to chrome://downloads/ on the Mac. Add Skia helper CGImageToSkBitmap(). (Closed)
Patch Set: Switch to using |-drawInRect:| rather than |-drawAtPoint:| Created 11 years, 6 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 | « chrome/browser/icon_manager_mac.mm ('k') | skia/ext/skia_utils_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/skia_utils_mac.h
diff --git a/skia/ext/skia_utils_mac.h b/skia/ext/skia_utils_mac.h
index b678abb9d73f66a56929a303c1a076be8abc4fe5..26b6f1602b949302c13908aeb2b467ac16be43c1 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,6 +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_
« no previous file with comments | « chrome/browser/icon_manager_mac.mm ('k') | skia/ext/skia_utils_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698