| OLD | NEW | 
|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #import <AppKit/AppKit.h> | 5 #import <AppKit/AppKit.h> | 
| 6 | 6 | 
|  | 7 #include "base/memory/scoped_ptr.h" | 
| 7 #include "skia/ext/skia_utils_mac.h" | 8 #include "skia/ext/skia_utils_mac.h" | 
| 8 #include "third_party/skia/include/core/SkBitmap.h" | 9 #include "third_party/skia/include/core/SkBitmap.h" | 
| 9 | 10 | 
| 10 namespace gfx { | 11 namespace gfx { | 
| 11 namespace internal { | 12 namespace internal { | 
| 12 | 13 | 
| 13 const SkBitmap* NSImageToSkBitmap(NSImage* image) { | 14 bool NSImageToSkBitmaps(NSImage* image, std::vector<const SkBitmap*>& bitmaps) { | 
| 14   return new SkBitmap(::gfx::NSImageToSkBitmap(image, [image size], false)); | 15   for (NSImageRep* imageRep in [image representations]) { | 
|  | 16     scoped_ptr<SkBitmap> bitmap(new SkBitmap( | 
|  | 17         gfx::NSImageRepToSkBitmap(imageRep, [imageRep size], false))); | 
|  | 18     if (bitmap->isNull()) | 
|  | 19       return false; | 
|  | 20     bitmaps.push_back(bitmap.release()); | 
|  | 21   } | 
|  | 22   return true; | 
| 15 } | 23 } | 
| 16 | 24 | 
| 17 }  // namespace internal | 25 }  // namespace internal | 
| 18 }  // namespace gfx | 26 }  // namespace gfx | 
| OLD | NEW | 
|---|