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

Unified Diff: ui/gfx/image_mac.mm

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
« ui/gfx/image.h ('K') | « ui/gfx/image.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/image_mac.mm
diff --git a/ui/gfx/image_mac.mm b/ui/gfx/image_mac.mm
index b3dc9776ebf135835754539f38873801a45368c4..0342b075326ac7b20b2b54454a1ecb178c5ca6a6 100644
--- a/ui/gfx/image_mac.mm
+++ b/ui/gfx/image_mac.mm
@@ -10,8 +10,15 @@
namespace gfx {
namespace internal {
-const SkBitmap* NSImageToSkBitmap(NSImage* image) {
- return new SkBitmap(::gfx::NSImageToSkBitmap(image, [image size], false));
+bool NSImageToSkBitmaps(NSImage* image, std::vector<const SkBitmap*>& bitmaps) {
+ for (NSImageRep* imageRep in [image representations]) {
+ SkBitmap bitmap(gfx::NSImageRepToSkBitmap(imageRep,
Robert Sesek 2011/04/15 20:27:20 Use a scoped_ptr<> here and .release() if you end
sail 2011/04/16 01:25:00 Done.
+ [imageRep size], false));
+ if (bitmap.isNull())
+ return false;
+ bitmaps.push_back(new SkBitmap(bitmap));
+ }
+ return true;
}
} // namespace internal
« ui/gfx/image.h ('K') | « ui/gfx/image.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698