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

Unified Diff: skia/ext/skia_utils_mac.h

Issue 6849030: Add support for multi resolution icons (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed touchui Created 9 years, 8 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: skia/ext/skia_utils_mac.h
diff --git a/skia/ext/skia_utils_mac.h b/skia/ext/skia_utils_mac.h
index 05516430190ca625b69e681261d866325d4b2c61..04d4a1d38c671c427eded37dd2d8b39f15ad3251 100644
--- a/skia/ext/skia_utils_mac.h
+++ b/skia/ext/skia_utils_mac.h
@@ -7,6 +7,7 @@
#pragma once
#include <CoreGraphics/CGColor.h>
+#include <vector>
#include "third_party/skia/include/core/SkColor.h"
@@ -23,8 +24,10 @@ typedef struct _NSSize NSSize;
#ifdef __OBJC__
@class NSImage;
+@class NSImageRep;
#else
class NSImage;
+class NSImageRep;
#endif
namespace gfx {
@@ -64,6 +67,9 @@ SkBitmap CGImageToSkBitmap(CGImageRef image);
// Draws an NSImage with a given size into a SkBitmap.
SkBitmap NSImageToSkBitmap(NSImage* image, NSSize size, bool is_opaque);
+// Draws an NSImageRep with a given size into a SkBitmap.
+SkBitmap NSImageRepToSkBitmap(NSImageRep* image, NSSize size, bool is_opaque);
Robert Sesek 2011/04/15 20:27:20 This needs a unit test
sail 2011/04/16 01:25:00 Done.
+
// Given an SkBitmap and a color space, return an autoreleased NSImage.
NSImage* SkBitmapToNSImageWithColorSpace(const SkBitmap& icon,
CGColorSpaceRef colorSpace);
@@ -73,6 +79,10 @@ NSImage* SkBitmapToNSImageWithColorSpace(const SkBitmap& icon,
// TODO(thakis): Remove this -- http://crbug.com/69432
NSImage* SkBitmapToNSImage(const SkBitmap& icon);
+// Given a vector of SkBitmaps, return an NSImage with each bitmap added
+// as a representation.
+NSImage* SkBitmapsToNSImage(const std::vector<const SkBitmap*>& bitmaps);
Robert Sesek 2011/04/15 20:27:20 This needs a unit test
sail 2011/04/16 01:25:00 Done. Ouch, thanks for asking me to do a unit test
+
// Returns |[NSImage imageNamed:@"NSApplicationIcon"]| as SkBitmap.
SkBitmap AppplicationIconAtSize(int size);

Powered by Google App Engine
This is Rietveld 408576698