| Index: ui/gfx/image_mac.mm
|
| diff --git a/ui/gfx/image_mac.mm b/ui/gfx/image_mac.mm
|
| index b3dc9776ebf135835754539f38873801a45368c4..544c214ec843f53898cf5254c4057dd51bcaff7e 100644
|
| --- a/ui/gfx/image_mac.mm
|
| +++ b/ui/gfx/image_mac.mm
|
| @@ -4,14 +4,22 @@
|
|
|
| #import <AppKit/AppKit.h>
|
|
|
| +#include "base/memory/scoped_ptr.h"
|
| #include "skia/ext/skia_utils_mac.h"
|
| #include "third_party/skia/include/core/SkBitmap.h"
|
|
|
| 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]) {
|
| + scoped_ptr<SkBitmap> bitmap(new SkBitmap(
|
| + gfx::NSImageRepToSkBitmap(imageRep, [imageRep size], false)));
|
| + if (bitmap->isNull())
|
| + return false;
|
| + bitmaps.push_back(bitmap.release());
|
| + }
|
| + return true;
|
| }
|
|
|
| } // namespace internal
|
|
|